123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRSO22800" position="absolute 0 0 1200 771" titletext="물품이동내역(물품보내는부서)" oninit="SMRSO22800_oninit" onload="SMRSO22800_onload">
- <Layouts>
- <Layout>
- <Static id="caption6" text="물품이동내역(물품보내는부서)" class="tit_1" position="absolute 0 0 243 25"/>
- <Shape id="line17" class="line_6" position="absolute 0 36 1195 42" anchor="left top right"/>
- <Button id="btn_help" taborder="1" text="도움말" class="btn4" position="absolute 1070 15 1138 37" anchor="top right" onclick="btn_help_onclick"/>
- <Button id="btn_save" taborder="2" text="저장" class="btn4" position="absolute 1138 15 1194 37" anchor="top right" onclick="btn_save_onclick"/>
- <Div id="grp_search" taborder="3" class="div_SA2" position="absolute 0 40 1195 80" anchor="left top right">
- <Layouts>
- <Layout>
- <Button id="btn_search" taborder="6" text="조회" class="btn1" position="absolute 1129 8 1185 30" anchor="top right" onclick="grp_search_btn_search_onclick"/>
- <Combo id="cmb_instcd" taborder="7" innerdataset="@ds_main_init" codecolumn="cnstcd" datacolumn="cnstnm" class="combo_default" enable="false" position="absolute 67 10 203 29" anchor="default"/>
- <Static id="cap_instcd" text="기관:" class="search_name" position="absolute 13 11 99 28" anchor="default"/>
- <Calendar id="ipt_movefromdd" taborder="8" autoselect="true" autoskip="true" position="absolute 695 10 780 29" mask="yyyy-mm-dd" anchor="default"/>
- <Static id="caption20" text="부서:" class="search_name" position="absolute 235 11 316 28" anchor="default"/>
- <Shape id="line30" linetype="vertical" class="line_4" position="absolute 1113 7 1119 32" anchor="top right"/>
- <Button id="btn_delivedeptcd" taborder="9" class="icon_search" position="absolute 397 11 413 27" anchor="default" onclick="grp_search_btn_delivedeptcd_onclick"/>
- <Edit id="ipt_fromdeptcd" taborder="10" autoselect="true" autoskip="true" class="input_default" position="absolute 290 10 395 29" anchor="default" onkeydown="grp_search_ipt_fromdeptcd_onkeydown"/>
- <Edit id="opt_fromdeptcd" taborder="11" readonly="true" class="output" position="absolute 415 10 571 29" anchor="default"/>
- <Static id="caption9" text="이동일자:" class="search_name" position="absolute 614 11 700 28" anchor="default"/>
- <Calendar id="ipt_movetodd" taborder="12" autoselect="true" autoskip="true" position="absolute 800 10 885 29" mask="yyyy-mm-dd" anchor="default"/>
- <Static id="caption2" text="~" position="absolute 785 11 805 31" anchor="default"/>
- </Layout>
- </Layouts>
- </Div>
- <Button id="btn_del" taborder="4" text="행삭제" class="btn2" position="absolute 1142 88 1195 107" anchor="top right" onclick="btn_del_onclick"/>
- <Static id="caption4" text="이동요청내역(물품보내는부서)" class="tit_2" position="absolute 0 91 215 112"/>
- <Button id="btn_add" taborder="5" text="행추가" class="btn2" position="absolute 1088 88 1141 107" anchor="top right" onclick="btn_add_onclick"/>
- <Shape id="line3" class="line_10" position="absolute 0 107 1195 113" anchor="left top right"/>
- <Grid id="grd_movereqlist" class="datagrid2" taborder="6" binddataset="ds_main_movereq_movereqlist" autoenter="select" useinputpanel="false" cellsizingtype="col" autofittype="col" position="absolute 0 112 1195 762" anchor="all" onexpanddown="grd_movereqlist_onexpanddown">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="23"/>
- <Column size="103"/>
- <Column size="125"/>
- <Column size="206"/>
- <Column size="201"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="170"/>
- <Column size="170"/>
- <Column size="60"/>
- <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="caption1"/>
- <Cell col="11" text="caption2"/>
- <Cell col="12"/>
- <Cell col="13"/>
- <Cell col="14"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" displaytype="date" edittype="none" text="bind:movedd" editautoselect="true" editautoskip="true" calendardisplaynulltype="nulltext" enable="false"/>
- <Cell col="2" displaytype="text" edittype="expr:getRowType(currow) == '2' ? 'text' : 'none'" text="bind:goodcd" editautoselect="true" editautoskip="true" expandshow="show" enable="false"/>
- <Cell col="3" text="bind:goodhngnm" editautoselect="true" editautoskip="true"/>
- <Cell col="4" text="bind:goodspec" editautoselect="true" editautoskip="true"/>
- <Cell col="5" text="bind:jaegoqty" editautoselect="true" editautoskip="true"/>
- <Cell col="6" displaytype="text" edittype="text" style="align:center middle;" text="bind:moveqty" editautoselect="true" editautoskip="true"/>
- <Cell col="7" displaytype="text" edittype="expr:getRowType(currow) == '2' ? 'text' : 'none'" text="bind:fromdeptnm" editautoselect="true" editautoskip="true" expandshow="show" enable="false"/>
- <Cell col="8" displaytype="text" edittype="expr:getRowType(currow) == '2' ? 'text' : 'none'" text="bind:todeptnm" editautoselect="true" editautoskip="true" expandshow="show" enable="false"/>
- <Cell col="9" displaytype="combo" edittype="combo" style="align:center middle;" text="bind:movegubun" editautoselect="true" editautoskip="true" combodataset="ds_cmb_movegubun" combocodecol="value" combodatacol="label"/>
- <Cell col="10" text="bind:instcd"/>
- <Cell col="11" text="bind:moveno"/>
- <Cell col="12" text="bind:fromdeptcd"/>
- <Cell col="13" text="bind:todeptcd"/>
- <Cell col="14" text="bind:allsizespecid"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="btn_jaego" taborder="7" text="부서재고" class="btn2" position="absolute 1023 88 1087 107" anchor="top right" onclick="btn_jaego_onclick"/>
- <Static id="cap_magam" position="absolute 240 84 635 104"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_send_search" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_send_search_oncolumnchanged">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256"/>
- <Column id="fromdeptcd" type="STRING" size="256"/>
- <Column id="fromdeptnm" type="STRING" size="256"/>
- <Column id="movefromdd" type="STRING" size="256"/>
- <Column id="movetodd" type="STRING" size="256"/>
- <Column id="movegubun" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="fromdeptcd"/>
- <Col id="fromdeptnm"/>
- <Col id="movefromdd"/>
- <Col id="movetodd"/>
- <Col id="movegubun">1</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_movereq_movereqlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_movereq_movereqlist_oncolumnchanged">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256" sumtext="기관"/>
- <Column id="goodcd" type="STRING" size="256" sumtext="물품코드"/>
- <Column id="fromdeptcd" type="STRING" size="256" sumtext="From부서"/>
- <Column id="fromdeptnm" type="STRING" size="256" sumtext="From부서"/>
- <Column id="goodhngnm" type="STRING" size="256" sumtext="물품명"/>
- <Column id="goodspec" type="STRING" size="256" sumtext="규격"/>
- <Column id="movedd" type="STRING" size="256" sumtext="이동일자"/>
- <Column id="moveno" type="STRING" size="256" sumtext="이동번호"/>
- <Column id="movegubun" type="STRING" size="256" sumtext="이동구분"/>
- <Column id="todeptcd" type="STRING" size="256" sumtext="To부서"/>
- <Column id="todeptnm" type="STRING" size="256" sumtext="To부서"/>
- <Column id="moveqty" type="STRING" size="256" sumtext="이동수량"/>
- <Column id="jaegoqty" type="STRING" size="256" sumtext="현재고량"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_cmb_movegubun" 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">Y</Col>
- <Col id="value">1</Col>
- </Row>
- <Row>
- <Col id="label">N</Col>
- <Col id="value">0</Col>
- </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_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/>
- </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"/>
- </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>
- <Dataset id="ds_popgood" 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="wareflag" type="STRING" size="256"/>
- <Column id="delivedd" type="STRING" size="256"/>
- <Column id="basedd" type="STRING" size="256"/>
- <Column id="selectyn" type="STRING" size="256"/>
- <Column id="goodcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="wareflag"/>
- <Col id="delivedd"/>
- <Col id="basedd"/>
- <Col id="selectyn"/>
- <Col id="goodcd"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_popdelive" 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="delivedd" type="STRING" size="256"/>
- <Column id="delivedeptcd" type="STRING" size="256"/>
- <Column id="delivedeptnm" type="STRING" size="256"/>
- <Column id="opener" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="delivedd"/>
- <Col id="delivedeptcd"/>
- <Col id="delivedeptnm"/>
- <Col id="opener"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_popreq" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="count" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_popsubdata_stocklist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="goodcd" type="STRING" size="256"/>
- <Column id="goodnm" type="STRING" size="256"/>
- <Column id="goodspec" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_jaego_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="goodcd" type="STRING" size="256"/>
- <Column id="ymd" type="STRING" size="256"/>
- <Column id="fromdeptcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="goodcd"/>
- <Col id="ymd"/>
- <Col id="fromdeptcd"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_jaego_value" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="jaegoqty" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_popgood_goodlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="goodcd" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_main_good_gooddetail" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="goodcd" type="STRING" size="256"/>
- <Column id="goodnm" type="STRING" size="256"/>
- <Column id="goodspec" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_search.cmb_instcd" propid="value" datasetid="ds_send_search" columnid="instcd"/>
- <BindItem id="item1" compid="grp_search.ipt_fromdeptcd" propid="value" datasetid="ds_send_search" columnid="fromdeptcd"/>
- <BindItem id="item2" compid="grp_search.opt_fromdeptcd" propid="value" datasetid="ds_send_search" columnid="fromdeptnm"/>
- <BindItem id="item3" compid="grp_search.ipt_movefromdd" propid="value" datasetid="ds_send_search" columnid="movefromdd"/>
- <BindItem id="item4" compid="grp_search.ipt_movetodd" propid="value" datasetid="ds_send_search" columnid="movetodd"/>
- </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 SMRSO22800_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMRSO22800_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_movereqlist);
- grdf_setRowTypeIcon(grd_movereqlist);
-
- misfComboInstCdListMulti("grp_search.cmb_instcd",utlf_getCurrentDate(),"","N");
-
- ds_send_search.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
- ds_send_search.setColumn(0, "movefromdd", utlf_getCurrentDate());
- ds_send_search.setColumn(0, "movetodd", utlf_getCurrentDate());
-
- var instcd = ds_send_search.getColumn(0, "instcd");
-
- if(instcd == "031")
- {
- ds_send_search.setColumn(0, "fromdeptcd", sysf_getUserInfo("dutunitcd"));
- ds_send_search.setColumn(0, "fromdeptnm", sysf_getUserInfo("dutunitnm"));
- }
- else
- {
- ds_send_search.setColumn(0, "fromdeptcd", sysf_getUserInfo("dutplcecd"));
- ds_send_search.setColumn(0, "fromdeptnm", sysf_getUserInfo("dutplcenm"));
- }
- }
- function ds_send_search_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid == "fromdeptcd")
- {
- grp_search.ipt_fromdeptcd.value = e.newvalue;
- grp_search.ipt_fromdeptcd.setFocus();
-
- misfValidationCheck("02", "", "fromdeptcd,fromdeptnm" );
- }
- }
- function grp_search_ipt_fromdeptcd_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode == 13)
- {
- obj.updateToDataset();
- }
- }
- function grp_search_btn_delivedeptcd_onclick(obj:Button, e:ClickEventInfo)
- {
- misfOpenPopUpList("02", ds_send_search,"", "fromdeptcd,fromdeptnm");
- }
- function grp_search_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- if(utlf_isNull(grp_search.opt_fromdeptcd.value))
- {
- sysf_messageBox("부서가 선택되지 않았습니다. \n\n먼저 부서를 선택하십시요.", "E999", "");
- grp_search.ipt_fromdeptcd.setFocus();
- return;
- }
- if(String(grp_search.ipt_movefromdd.value).length < 8)
- {
- sysf_messageBox("이동일자가 선택되지 않았거나 잘못되었습니다. \n\n먼저 이동일자를 선택하십시요.", "E999", "");
- grp_search.ipt_movefromdd.setFocus();
- return;
- }
- if(String(grp_search.ipt_movetodd.value).length < 8)
- {
- sysf_messageBox("이동일자가 선택되지 않았거나 잘못되었습니다. \n\n먼저 이동일자를 선택하십시요.", "E999", "");
- grp_search.ipt_movetodd.setFocus();
- return;
- }
-
- misfGridInit(grd_movereqlist);
-
- var oParam = {};
- oParam.id = "TRRSO22801";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetMoveReqList";
- oParam.inds = "req=ds_send_search";
- oParam.outds = "ds_main_movereq_movereqlist=movereqlist";
- oParam.async = false;
- oParam.callback = "cf_TRRSO22801";
- tranf_submit(oParam);
- }
- function cf_TRRSO22801(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- ds_magamsearch.setColumn(0, "instcd", ds_send_search.getColumn(0, "instcd"));
- ds_magamsearch.setColumn(0, "dd", ds_send_search.getColumn(0, "movefromdd"));
- ds_magamsearch.setColumn(0, "deptcd", ds_send_search.getColumn(0, "fromdeptcd"));
-
- cap_magam.text = "";
-
- var oParam = {};
- oParam.id = "TRRSO21003";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetDistriDeptJaegoMagamChk";
- oParam.inds = "req=ds_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.text = "물류마감이 되어있습니다.";
- }
- else
- {
- cap_magam.text = "";
-
- var oParam = {};
- oParam.id = "TRRSO21002";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetDeptJaegoMagamChk";
- oParam.inds = "req=ds_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.text = "해당부서는 현재 마감되어있습니다.";
- }
- else
- {
- cap_magam.text = "";
- }
- }
- }
- function fGetGoodDetail()
- {
- for(var k = 0; k < ds_popgood_goodlist.rowcount; k++)
- {
- var bDup = false;
-
- for(var i = 0; i < ds_main_movereq_movereqlist.rowcount; i++)
- {
- if( ds_main_movereq_movereqlist.getColumn(i, "goodcd") == ds_popgood_goodlist.getColumn(k, "goodcd"))
- {
- sysf_messageBox("물품코드가 중복되었습니다. [" + utlf_transEmptyToNull(ds_main_movereq_movereqlist.getColumn(i, "goodcd")) + "] ", "E999", "");
- bDup = true;
- continue;
- }
- }
-
- if( bDup == false )
- {
- ds_popgood.setColumn(0, "goodcd", ds_popgood_goodlist.getColumn(k, "goodcd"))
-
- var oParam = {};
- oParam.id = "TRRSO20104";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetGoodDetail";
- oParam.inds = "req=ds_popgood";
- oParam.outds = "ds_main_good_gooddetail=gooddetail";
- oParam.async = false;
- oParam.callback = "cf_TRRSO20104";
- tranf_submit(oParam);
- }
- }
- }
- function cf_TRRSO20104(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- if(!utlf_isNull(ds_main_movereq_movereqlist.getColumn(ds_main_movereq_movereqlist.rowcount-1, "goodcd")))
- {
- btn_add.click();
- }
- ds_main_movereq_movereqlist.setColumn(ds_main_movereq_movereqlist.rowcount-1, "goodcd", ds_main_good_gooddetail.getColumn(0, "goodcd"));
- ds_main_movereq_movereqlist.setColumn(ds_main_movereq_movereqlist.rowcount-1, "goodhngnm", ds_main_good_gooddetail.getColumn(0, "goodnm"));
- ds_main_movereq_movereqlist.setColumn(ds_main_movereq_movereqlist.rowcount-1, "goodspec", ds_main_good_gooddetail.getColumn(0, "goodspec"));
- ds_main_movereq_movereqlist.setColumn(ds_main_movereq_movereqlist.rowcount-1, "moveqty", "0");
-
- if(!utlf_isNull(ds_main_movereq_movereqlist.getColumn(ds_main_movereq_movereqlist.rowposition, "goodhngnm")))
- {
- ds_jaego_search.setColumn(0, "goodcd", ds_main_movereq_movereqlist.getColumn(ds_main_movereq_movereqlist.rowposition, "goodcd"));
- ds_jaego_search.setColumn(0, "ymd", ds_main_movereq_movereqlist.getColumn(ds_main_movereq_movereqlist.rowposition, "movedd"));
- ds_jaego_search.setColumn(0, "instcd", ds_main_movereq_movereqlist.getColumn(ds_main_movereq_movereqlist.rowposition, "instcd"));
- ds_jaego_search.setColumn(0, "fromdeptcd", ds_main_movereq_movereqlist.getColumn(ds_main_movereq_movereqlist.rowposition, "fromdeptcd"));
-
- var oParam = {};
- oParam.id = "TRRSO22802";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetMoveReqNowJaegoList";
- oParam.inds = "req=ds_jaego_search";
- oParam.outds = "ds_jaego_value=value";
- oParam.async = false;
- //oParam.callback = "cf_TRRSO22802";
- tranf_submit(oParam);
-
- var jaego = ds_jaego_value.getColumn(0, "jaegoqty");
- ds_main_movereq_movereqlist.setColumn(ds_main_movereq_movereqlist.rowposition, "jaegoqty", jaego);
- }
- }
- }
- function ds_main_movereq_movereqlist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid == "moveqty")
- {
- var jaegoqty = obj.getColumn(e.row, "jaegoqty");
- var moveqty = obj.getColumn(e.row, "moveqty");
-
- if(parseFloat(jaegoqty) < parseFloat(moveqty))
- {
- sysf_messageBox("이동수량이 현재고량보다 많을 수는 없습니다.", "I999", "");
-
- obj.setColumn(e.row, "moveqty", "0");
- }
- }
- }
- function btn_help_onclick(obj:Button, e:ClickEventInfo)
- {
- frmf_modal("SMRSO22801", "SMRSO22801", "", "", "", "", "", "", "", "", "", "", "M");
- }
- function btn_jaego_onclick(obj:Button, e:ClickEventInfo)
- {
- if(utlf_isNull(grp_search.ipt_fromdeptcd.value))
- {
- sysf_messageBox("부서가 선택되지 않았습니다. \n\n먼저 부서를 선택하십시요.", "E999", "");
- grp_search.ipt_fromdeptcd.setFocus();
- return;
- }
-
- ds_popdelive.setColumn(0, "instcd", grp_search.cmb_instcd.value);
- ds_popdelive.setColumn(0, "delivedd", grp_search.ipt_movefromdd.value);
- ds_popdelive.setColumn(0, "delivedeptcd", grp_search.ipt_fromdeptcd.value);
- ds_popdelive.setColumn(0, "delivedeptnm", grp_search.opt_fromdeptcd.value);
- ds_popdelive.setColumn(0, "opener", "jaego");
- ds_popreq.setColumn(0, "count", "0");
-
- var objArg = new Object();
- objArg.arg_ds_popdata = ds_popdelive;
-
- frmf_modal("SMRSO21450", "SMRSO21450", objArg, "", "", "", "", "", "", "", "", "", "M");
- var cnt = ds_popreq.getColumn(0, "count");
- var mrows = ds_main_movereq_movereqlist.rowcount;
- var mcnt = parseInt(mrows)+parseInt(cnt);
- var j = 0;
-
- for(var i = mrows ; i < mcnt-1 ; i++)
- {
- ds_main_movereq_movereqlist.addRow();
-
- ds_main_movereq_movereqlist.setColumn(i, "goodcd", ds_popsubdata_stocklist.getColumn(j, "goodcd"));
- ds_main_movereq_movereqlist.setColumn(i, "goodhngnm", ds_popsubdata_stocklist.getColumn(j, "goodnm"));
- ds_main_movereq_movereqlist.setColumn(i, "goodspec", ds_popsubdata_stocklist.getColumn(j, "goodspec"));
- ds_main_movereq_movereqlist.setColumn(i, "moveqty", "0");
- ds_main_movereq_movereqlist.setColumn(i, "instcd", grp_search.cmb_instcd.value);
- ds_main_movereq_movereqlist.setColumn(i, "movedd", grp_search.ipt_movefromdd.value);
- ds_main_movereq_movereqlist.setColumn(i, "fromdeptcd", grp_search.ipt_fromdeptcd.value);
- ds_main_movereq_movereqlist.setColumn(i, "fromdeptnm", grp_search.opt_fromdeptcd.value);
- ds_main_movereq_movereqlist.setColumn(i, "movegubun", "1");
-
- ds_jaego_search.setColumn(0, "goodcd", ds_popsubdata_stocklist.getColumn(j, "goodcd"));
- ds_jaego_search.setColumn(0, "ymd", grp_search.ipt_movefromdd.value);
- ds_jaego_search.setColumn(0, "instcd", grp_search.cmb_instcd.value);
- ds_jaego_search.setColumn(0, "fromdeptcd", grp_search.ipt_fromdeptcd.value);
-
- var oParam = {};
- oParam.id = "TRRSO22802";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetMoveReqNowJaegoList";
- oParam.inds = "req=ds_jaego_search";
- oParam.outds = "ds_jaego_value=value";
- oParam.async = false;
- //oParam.callback = "cf_TRRSO22802";
- tranf_submit(oParam);
- var jaego = ds_jaego_value.getColumn(0, "jaegoqty");
-
- ds_main_movereq_movereqlist.setColumn(i, "jaegoqty", jaego);
- j++;
- }
- }
- function btn_add_onclick(obj:Button, e:ClickEventInfo)
- {
- var addRow = ds_main_movereq_movereqlist.addRow();
-
- // grd_movereqlist.setCellProperty("Body", grd_movereqlist.getBindCellIndex("Body", "goodcd"), "edittype", "text");
- // grd_movereqlist.setCellProperty("Body", grd_movereqlist.getBindCellIndex("Body", "fromdeptnm"), "edittype", "text");
- // grd_movereqlist.setCellProperty("Body", grd_movereqlist.getBindCellIndex("Body", "todeptnm"), "edittype", "text");
-
- ds_main_movereq_movereqlist.setColumn(addRow, "instcd", grp_search.cmb_instcd.value);
- ds_main_movereq_movereqlist.setColumn(addRow, "movedd", grp_search.ipt_movefromdd.value);
- ds_main_movereq_movereqlist.setColumn(addRow, "fromdeptcd", grp_search.ipt_fromdeptcd.value);
- ds_main_movereq_movereqlist.setColumn(addRow, "fromdeptnm", grp_search.opt_fromdeptcd.value);
- ds_main_movereq_movereqlist.setColumn(addRow, "movegubun", "1");
- }
- function btn_del_onclick(obj:Button, e:ClickEventInfo)
- {
- if(ds_main_movereq_movereqlist.getRowType(ds_main_movereq_movereqlist.rowposition) == "2")
- {
- ds_main_movereq_movereqlist.deleteRow(ds_main_movereq_movereqlist.rowposition);
- }
- else
- {
- ds_main_movereq_movereqlist.updatecontrol = false;
- ds_main_movereq_movereqlist.setRowType(ds_main_movereq_movereqlist.rowposition, "d");
- ds_main_movereq_movereqlist.updatecontrol = true;
- }
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- for(var i = 0 ; i < ds_main_movereq_movereqlist.rowcount; i++)
- {
- var todeptnm = ds_main_movereq_movereqlist.getColumn(i, "todeptnm");
-
- if(utlf_isNull(todeptnm))
- {
- sysf_messageBox(i+"번째줄 물품받는부서가 없습니다. 확인해주십시오.", "E999", "");
- return;
- }
- }
-
- if(ds_main_movereq_movereqlist.rowcount != 0)
- {
- var instcd = ds_main_movereq_movereqlist.getColumn(0, "instcd");
- var dd = ds_main_movereq_movereqlist.getColumn(0, "movedd");
- var fromdeptcd = ds_main_movereq_movereqlist.getColumn(0, "fromdeptcd");
- var todeptcd = ds_main_movereq_movereqlist.getColumn(0, "todeptcd");
-
- if(utlf_isNull(instcd))
- {
- ds_magamsearch.setColumn(0, "instcd", ds_send_search.getColumn(0, "instcd"));
- ds_magamsearch.setColumn(0, "dd", ds_send_search.getColumn(0, "movefromdd"));
- ds_magamsearch.setColumn(0, "deptcd", ds_send_search.getColumn(0, "fromdeptcd"));
- }
- else
- {
- ds_magamsearch.setColumn(0, "instcd", instcd);
- ds_magamsearch.setColumn(0, "dd", dd);
- ds_magamsearch.setColumn(0, "deptcd", fromdeptcd);
- }
-
- cap_magam.text = "";
-
- var oParam = {};
- oParam.id = "TRRSO21003";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetDistriDeptJaegoMagamChk";
- oParam.inds = "req=ds_magamsearch";
- oParam.outds = "ds_distrimagam=distrimagam";
- oParam.async = false;
- oParam.callback = "cf_TRRSO21003_1";
- tranf_submit(oParam);
- }
- else
- {
- return;
- }
-
- var oParam = {};
- oParam.id = "TXRSO22801";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqExeMoveReqList";
- oParam.inds = "movereqlist=ds_main_movereq_movereqlist:u";
- oParam.outds = "";
- oParam.async = false;
- oParam.callback = "cf_TXRSO22801";
- tranf_submit(oParam);
- }
- function cf_TXRSO22801(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- grp_search.btn_search.click();
- }
- }
- function cf_TRRSO21003_1(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- var endyn = ds_distrimagam.getColumn(0, "endyn");
-
- if(endyn == "Y")
- {
- cap_magam.text = "물류마감이 되어있습니다.";
- sysf_messageBox("물류마감이 되어 저장이 불가능합니다.", "E999", "");
- return;
- }
- else
- {
- cap_magam.text = "";
-
- var oParam = {};
- oParam.id = "TRRSO21002";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetDeptJaegoMagamChk";
- oParam.inds = "req=ds_magamsearch";
- oParam.outds = "ds_magam=magam";
- oParam.async = false;
- oParam.callback = "cf_TRRSO21002_1";
- tranf_submit(oParam);
- }
- }
- }
- function cf_TRRSO21002_1(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- var magamyn = ds_magam.getColumn(0, "magamyn");
- if(magamyn == "Y")
- {
- cap_magam.text = "해당부서는 현재 마감되어있습니다.";
- sysf_messageBox("물품보내는부서가 마감이 되어 저장이 불가능합니다.", "E999", "");
- }
- else
- {
- cap_magam.text = "";
- }
- }
- }
- function grd_movereqlist_onexpanddown(obj:Grid, e:GridMouseEventInfo)
- {
- if(e.col == 2)
- {
- ds_popgood.setColumn(0, "instcd", grp_search.cmb_instcd.value);
- ds_popgood.setColumn(0, "delivedd", grp_search.ipt_movefromdd.value);
- ds_popgood.setColumn(0, "basedd", grp_search.ipt_movefromdd.value);
- ds_popgood.setColumn(0, "selectyn", "");
-
- var objArg = new Object();
- objArg.arg_ds_popdata = ds_popgood;
-
- frmf_modal("SPRSO20700", "SPRSO20700", objArg, "", "", "", "", "", "", "", "", "", "M");
-
- if(ds_popgood.getColumn(0, "selectyn") == "Y")
- {
- fGetGoodDetail();
- grd_movereqlist.setCellPos(grd_movereqlist.getBindCellIndex("body", "moveqty"));
- grd_movereqlist.showEditor(true);
- }
- }
- else if(e.col == 7)
- {
- misfOpenPopUpList("02", grd_movereqlist,"", "fromdeptcd,fromdeptnm") ;
- }
- else if(e.col == 8)
- {
- misfOpenPopUpList("02", grd_movereqlist,"", "todeptcd,todeptnm") ;
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|