123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRSO23200" position="absolute 0 0 1201 786" titletext="부서창고반납" oninit="SMRSO23200_oninit" onload="SMRSO23200_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_save" taborder="1" text="저장" class="btn4" position="absolute 1138 15 1194 37" anchor="top right" onclick="btn_save_onclick"/>
- <Div id="grp_search" taborder="2" class="div_SA2" position="absolute 0 40 1195 100" anchor="left top right">
- <Layouts>
- <Layout width="1195" height="60">
- <Button id="btn_search" taborder="6" text="조회" class="btn1" position="absolute 1128 20 1184 42" 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 135 8 360 27"/>
- <Static id="cap_instcd" text="기관:" class="search_name" position="absolute 13 9 145 26"/>
- <Calendar id="ipt_fromdd" taborder="8" autoselect="true" autoskip="true" position="absolute 462 8 563 27" mask="yyyy-mm-dd"/>
- <Static id="caption20" text="물품보내는부서:" class="search_name" position="absolute 13 33 131 50"/>
- <Shape id="line30" linetype="vertical" class="line_4" position="absolute 1112 5 1118 55" anchor="top right"/>
- <Button id="btn_delivedeptcd" taborder="9" class="icon_search" position="absolute 217 35 233 51" onclick="grp_search_btn_delivedeptcd_onclick"/>
- <Edit id="ipt_fromdeptcd" taborder="10" autoselect="true" autoskip="true" class="input_default" position="absolute 135 33 215 52" onkeydown="grp_search_ipt_fromdeptcd_onkeydown"/>
- <Edit id="opt_fromdeptcd" taborder="11" readonly="true" class="output" position="absolute 235 33 360 52"/>
- <Static id="caption9" text="반납일자:" class="search_name" position="absolute 386 9 472 26"/>
- <Edit id="ipt_goodnm" taborder="12" position="absolute 886 8 1018 27"/>
- <Static id="caption5" text="물품코드 :" class="search_name" position="absolute 701 8 791 25"/>
- <Edit id="ipt_goodcd" taborder="13" autoselect="true" autoskip="true" position="absolute 786 8 866 27"/>
- <Button id="btn_goodcd" taborder="14" class="icon_search" position="absolute 868 9 884 25" onclick="grp_search_btn_goodcd_onclick"/>
- <Calendar id="ipt_todd" taborder="15" autoselect="true" autoskip="true" position="absolute 577 8 678 27" mask="yyyy-mm-dd"/>
- <Static id="caption1" text="~" position="absolute 565 9 580 29"/>
- </Layout>
- </Layouts>
- </Div>
- <Button id="btn_del" taborder="3" text="행삭제" class="btn2" position="absolute 1142 106 1195 125" anchor="top right" onclick="btn_del_onclick"/>
- <Static id="caption4" text="반납내역" class="tit_2" position="absolute 0 109 215 130"/>
- <Button id="btn_add" taborder="4" text="행추가" class="btn2" position="absolute 1088 106 1141 125" anchor="top right" onclick="btn_add_onclick"/>
- <Shape id="line3" class="line_10" position="absolute 0 125 1195 131" anchor="left top right"/>
- <Grid id="grd_deptreturnlist" taborder="5" binddataset="ds_main_deptreturn_deptreturnlist" autoenter="select" useinputpanel="false" cellsizingtype="col" autofittype="col" position="absolute 0 130 1195 780" anchor="all" oncellclick="grd_deptreturnlist_oncellclick" onexpanddown="grd_deptreturnlist_onexpanddown">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="23"/>
- <Column size="80"/>
- <Column size="125"/>
- <Column size="181"/>
- <Column size="188"/>
- <Column size="60"/>
- <Column size="199"/>
- <Column size="130"/>
- <Column size="130"/>
- <Column size="60"/>
- <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="부서반납NO"/>
- <Cell col="13" text="창고구분"/>
- <Cell col="14" text="기관"/>
- <Cell col="15" text="삭제키(선납)"/>
- <Cell col="16" text="삭제키(창고)"/>
- <Cell col="17" text="단가"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" displaytype="date" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' && returngubun == '3' ? 'none' : 'date'" text="bind:returndd" editautoselect="true" calendardisplaynulltype="nulltext" enable="false"/>
- <Cell col="2" displaytype="text" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' && returngubun == '3' || getRowType(currow) != '2' ? 'none' : 'text'" text="bind:goodcd" editautoselect="true" expandshow="show" enable="false"/>
- <Cell col="3" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' && returngubun == '3' ? 'none' : 'text'" text="bind:goodhngnm" editautoselect="true"/>
- <Cell col="4" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' && returngubun == '3' ? 'none' : 'text'" text="bind:goodspec" editautoselect="true"/>
- <Cell col="5" displaytype="text" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' && returngubun == '3' ? 'none' : 'text'" style="align:center middle;" text="bind:returnqty" editautoselect="true"/>
- <Cell col="6" displaytype="text" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' && returngubun == '3' ? 'none' : 'text'" text="bind:cmt" editautoselect="true"/>
- <Cell col="7" displaytype="text" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' && returngubun == '3' || getRowType(currow) != '2' ? 'none' : 'text'" text="bind:fromdeptnm" editautoselect="true" expandshow="show" enable="false"/>
- <Cell col="8" displaytype="text" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' && returngubun == '3' || getRowType(currow) != '2' ? 'none' : 'text'" text="bind:todeptnm" editautoselect="true" expandshow="show" enable="false"/>
- <Cell col="9" displaytype="combo" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' && returngubun == '3' ? 'none' : 'combo'" style="align:center middle;" text="bind:returngubun" editautoselect="true" combodataset="ds_cmb_returngubun" combocodecol="value" combodatacol="label"/>
- <Cell col="10" text="bind:fromdeptcd"/>
- <Cell col="11" text="bind:todeptcd"/>
- <Cell col="12" text="bind:returnno"/>
- <Cell col="13" text="bind:wareflag"/>
- <Cell col="14" text="bind:instcd"/>
- <Cell col="15" text="bind:instid"/>
- <Cell col="16" text="bind:wareinstid"/>
- <Cell col="17" text="bind:goodunitcost"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="btn_jaego" taborder="6" text="부서재고" class="btn2" position="absolute 1023 106 1087 125" anchor="top right" onclick="btn_jaego_onclick"/>
- </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="fromdd" type="STRING" size="256"/>
- <Column id="todd" type="STRING" size="256"/>
- <Column id="goodcd" type="STRING" size="256"/>
- <Column id="goodnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="fromdeptcd"/>
- <Col id="fromdeptnm"/>
- <Col id="fromdd"/>
- <Col id="todd"/>
- <Col id="goodcd"/>
- <Col id="goodnm"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_deptreturn_deptreturnlist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256" sumtext="기관"/>
- <Column id="returndd" 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="goodcd" type="STRING" size="256" sumtext="물품코드"/>
- <Column id="goodhngnm" type="STRING" size="256" sumtext="물품명"/>
- <Column id="goodspec" type="STRING" size="256" sumtext="규격"/>
- <Column id="deliveunit" type="STRING" size="256" sumtext="단가"/>
- <Column id="returnno" type="STRING" size="256" sumtext="반납번호"/>
- <Column id="returngubun" 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="returnqty" type="STRING" size="256" sumtext="반납수량"/>
- <Column id="wareflag" type="STRING" size="256" sumtext="창고구분"/>
- <Column id="cmt" type="STRING" size="256" sumtext="반납사유"/>
- <Column id="instid" type="STRING" size="256" sumtext="삭제키(선납)"/>
- <Column id="wareinstid" type="STRING" size="256" sumtext="삭제키(창고)"/>
- <Column id="goodunitcost" type="STRING" size="256" sumtext="제품단가"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_cmb_returngubun" 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_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_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="goodnm" type="STRING" size="256"/>
- <Column id="goodcd" type="STRING" size="256"/>
- <Column id="goodspec" type="STRING" size="256"/>
- <Column id="wareflag" 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_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" sumtext="물품코드"/>
- <Column id="goodnm" type="STRING" size="256" sumtext="물품명"/>
- <Column id="goodspec" type="STRING" size="256" sumtext="규격"/>
- <Column id="deliveunit" type="STRING" size="256" sumtext="출고단위"/>
- <Column id="exchqty" type="STRING" size="256" sumtext="환산배수"/>
- <Column id="siqty" type="STRING" size="256" sumtext="시점재고"/>
- <Column id="hunqty" type="STRING" size="256" sumtext="현재고"/>
- <Column id="goodunitcost" type="STRING" size="256" sumtext="단가"/>
- <Column id="allsizespecid" type="STRING" size="256" sumtext="ALLSIZE"/>
- <Column id="purcunit" type="STRING" size="256" sumtext="입고단위"/>
- <Column id="mainusedeptcd" type="STRING" size="256" sumtext="주사용부서코드"/>
- <Column id="maincustlastsuplplce" type="STRING" size="256" sumtext="최종공급처"/>
- <Column id="wareflag" type="STRING" size="256" sumtext="창고구분"/>
- <Column id="wstyn" type="STRING" size="256" sumtext="의료폐기물 용기 여부"/>
- </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_fromdd" propid="value" datasetid="ds_send_search" columnid="fromdd"/>
- <BindItem id="item2" compid="grp_search.ipt_todd" propid="value" datasetid="ds_send_search" columnid="todd"/>
- <BindItem id="item3" compid="grp_search.ipt_goodcd" propid="value" datasetid="ds_send_search" columnid="goodcd"/>
- <BindItem id="item4" compid="grp_search.ipt_goodnm" propid="value" datasetid="ds_send_search" columnid="goodnm"/>
- <BindItem id="item5" compid="grp_search.ipt_fromdeptcd" propid="value" datasetid="ds_send_search" columnid="fromdeptcd"/>
- <BindItem id="item6" compid="grp_search.opt_fromdeptcd" propid="value" datasetid="ds_send_search" columnid="fromdeptnm"/>
- </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";
- include "mis_miscommonxp::RSZ001.xjs";
- var granton = "N"
- function SMRSO23200_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMRSO23200_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_deptreturnlist);
- grdf_setRowTypeIcon(grd_deptreturnlist);
-
- misfComboInstCdListMulti("grp_search.cmb_instcd",utlf_getCurrentDate(),"","N");
-
- ds_send_search.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
- ds_send_search.setColumn(0, "fromdd", utlf_getCurrentDate());
- ds_send_search.setColumn(0, "todd", utlf_getCurrentDate());
- ds_send_search.setColumn(0, "fromdeptcd", sysf_getUserInfo("dutunitcd"));
- ds_send_search.setColumn(0, "fromdeptnm", sysf_getUserInfo("dutunitnm"));
- dsf_makeValue(ds_send_search, "granton", "string", granton, 0);
-
- if(sysf_getUserInfo("dutunitcd") == "4020334000" || sysf_getUserInfo("userid") == "MIS")
- {
- dsf_makeValue(ds_send_search, "granton", "string", "Y", 0);
- }
- }
- function ds_send_search_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid == "goodcd")
- {
- if(String(e.newvalue).length == 0)
- {
- grp_search.ipt_goodnm.value = "";
- }
- else
- {
- grp_search.ipt_goodcd.value = e.newvalue;
- grp_search.ipt_goodcd.setFocus();
- rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodcd","goodcd," + grp_search.cmb_instcd.value + "," + grp_search.ipt_goodcd.value ,"","goodcd,goodnm", grp_search.ipt_goodcd,"SPRSD00210","instcd","grp_search.cmb_instcd");
- //rszfValidationCheck("TRRAC00111", "acntlist", "acntflag,useyn,jobgb,srhtxt","1,,," + ds_main_gooddet_gooddetlist.getColumn( 0, "amtacnt") ,"","amtacnt,amtacntnm" ,grp_detail.ipt_amtacnt,"PPRAC00100","","");
- }
- }
-
- if(e.columnid == "goodnm")
- {
- if(String(e.newvalue).length == 0)
- {
- grp_search.ipt_goodcd.value = "";
- }
- else
- {
- rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodnm", "goodcd," + grp_search.cmb_instcd.value + "," + grp_search.ipt_goodnm.value ,"","goodcd,goodnm",grp_search.ipt_goodnm,"SPRSD00210","instcd","grp_search.cmb_instcd");
- }
- }
-
- if(e.columnid == "fromdeptcd")
- {
- grp_search.ipt_fromdeptcd.value = e.newvalue;
- grp_search.ipt_fromdeptcd.setFocus();
- misfValidationCheck("02", "", "fromdeptcd,fromdeptnm" );
- }
- }
- function grp_search_btn_goodcd_onclick(obj:Button, e:ClickEventInfo)
- {
- //rszfOpenPopUpListByWndName(grp_search.ipt_goodcd,"","","SPRSD00210","instcd,goodcd,goodnm,goodflag,allsizespecid","grp_search.cmb_instcd");
- rszfOpenPopUpListByWndName(grp_search.ipt_goodcd,"","goodcd,allsizespecid,goodnm","SPRSD00210","instcd","grp_search.cmb_instcd");
- var goodcd = frmf_getParameter("goodcd")
- trace(goodcd)
- grp_search.ipt_goodcd.value = goodcd;
- }
- 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(String(grp_search.ipt_fromdd.value).length < 8)
- {
- sysf_messageBox("이동일자가 선택되지 않았거나 잘못되었습니다. \n\n먼저 이동일자를 선택하십시요.", "E999", "");
- grp_search.ipt_fromdd.setFocus();
- return;
- }
- if(String(grp_search.ipt_todd.value).length < 8)
- {
- sysf_messageBox("이동일자가 선택되지 않았거나 잘못되었습니다. \n\n먼저 이동일자를 선택하십시요.", "E999", "");
- grp_search.ipt_todd.setFocus();
- return;
- }
-
- misfGridInit(grd_deptreturnlist);
-
- var oParam = {};
- oParam.id = "TRRSO23201";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetDeptReturnList";
- oParam.inds = "req=ds_send_search";
- oParam.outds = "ds_main_deptreturn_deptreturnlist=deptreturnlist";
- oParam.async = false;
- //oParam.callback = "cf_TRRSO23201";
- tranf_submit(oParam);
- }
- 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_fromdd.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_deptreturn_deptreturnlist.rowcount;
- var mcnt = parseInt(mrows)+parseInt(cnt);
- var j = 0;
- for(var i = mrows ; i < mcnt-1 ; i++)
- {
- ds_main_deptreturn_deptreturnlist.addRow();
-
- ds_main_deptreturn_deptreturnlist.setColumn(i, "goodcd", ds_popsubdata_stocklist.getColumn(j, "goocd"));
- ds_main_deptreturn_deptreturnlist.setColumn(i, "goodhngnm", ds_popsubdata_stocklist.getColumn(j, "goodnm"));
- ds_main_deptreturn_deptreturnlist.setColumn(i, "goodspec", ds_popsubdata_stocklist.getColumn(j, "goodspec"));
- ds_main_deptreturn_deptreturnlist.setColumn(i, "wareflag", ds_popsubdata_stocklist.getColumn(j, "wareflag"));
- ds_main_deptreturn_deptreturnlist.setColumn(i, "instcd", grp_search.cmb_instcd.value);
- ds_main_deptreturn_deptreturnlist.setColumn(i, "returndd", grp_search.ipt_fromdd.value);
- ds_main_deptreturn_deptreturnlist.setColumn(i, "fromdeptcd", grp_search.ipt_fromdeptcd.value);
- ds_main_deptreturn_deptreturnlist.setColumn(i, "fromdeptnm", grp_search.opt_fromdeptcd.value);
- ds_main_deptreturn_deptreturnlist.setColumn(i, "returngubun", "1");
- ds_main_deptreturn_deptreturnlist.setColumn(i, "todeptcd", "4020334000");
- ds_main_deptreturn_deptreturnlist.setColumn(i, "todeptnm", "물류파트");
- j++;
- }
- }
- function btn_add_onclick(obj:Button, e:ClickEventInfo)
- {
- var addRow = ds_main_deptreturn_deptreturnlist.addRow();
-
- ds_main_deptreturn_deptreturnlist.setColumn(addRow, "instcd", grp_search.cmb_instcd.value);
- ds_main_deptreturn_deptreturnlist.setColumn(addRow, "returndd", grp_search.ipt_fromdd.value);
- ds_main_deptreturn_deptreturnlist.setColumn(addRow, "fromdeptcd", grp_search.ipt_fromdeptcd.value);
- ds_main_deptreturn_deptreturnlist.setColumn(addRow, "fromdeptnm", grp_search.opt_fromdeptcd.value);
- ds_main_deptreturn_deptreturnlist.setColumn(addRow, "returngubun", "1");
- ds_main_deptreturn_deptreturnlist.setColumn(addRow, "todeptcd", "4020334000");
- ds_main_deptreturn_deptreturnlist.setColumn(addRow, "todeptnm", "물류파트");
- }
- function btn_del_onclick(obj:Button, e:ClickEventInfo)
- {
- if(ds_main_deptreturn_deptreturnlist.getRowType(ds_main_deptreturn_deptreturnlist.rowposition) == "2")
- {
- ds_main_deptreturn_deptreturnlist.deleteRow(ds_main_deptreturn_deptreturnlist.rowposition)
- }
- else
- {
- ds_main_deptreturn_deptreturnlist.updatecontrol = false;
- ds_main_deptreturn_deptreturnlist.setRowType(ds_main_deptreturn_deptreturnlist.rowposition, "d");
- ds_main_deptreturn_deptreturnlist.updatecontrol = true;
- }
- }
- function fGetGoodDetail()
- {
- for(var k = 0; k < ds_popgood_goodlist.rowcount; k++)
- {
- var bDup = false;
-
- for(var i = 0; i < ds_main_deptreturn_deptreturnlist.rowcount; i++)
- {
- if( ds_main_deptreturn_deptreturnlist.getColumn(i, "goodcd") == ds_popgood_goodlist.getColumn(k, "goodcd"))
- {
- sysf_messageBox("물품코드가 중복되었습니다. [" + utlf_transEmptyToNull(ds_main_deptreturn_deptreturnlist.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_deptreturn_deptreturnlist.getColumn(ds_main_deptreturn_deptreturnlist.rowcount-1, "goodcd")))
- {
- btn_add.click();
- }
- ds_main_deptreturn_deptreturnlist.setColumn(ds_main_deptreturn_deptreturnlist.rowcount-1, "goodcd", ds_main_good_gooddetail.getColumn(0, "goodcd"));
- ds_main_deptreturn_deptreturnlist.setColumn(ds_main_deptreturn_deptreturnlist.rowcount-1, "goodhngnm", ds_main_good_gooddetail.getColumn(0, "goodnm"));
- ds_main_deptreturn_deptreturnlist.setColumn(ds_main_deptreturn_deptreturnlist.rowcount-1, "goodspec", ds_main_good_gooddetail.getColumn(0, "goodspec"));
- ds_main_deptreturn_deptreturnlist.setColumn(ds_main_deptreturn_deptreturnlist.rowcount-1, "returnqty", "0");
- }
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- for(var i = 0; i < ds_main_deptreturn_deptreturnlist.rowcount; i++)
- {
- var todeptnm = ds_main_deptreturn_deptreturnlist.getColumn(i, "todeptnm");
-
- if(utlf_isNull(todeptnm))
- {
- sysf_messageBox(i+1+"번째줄 물품받는부서가 없습니다. 확인해주십시오.", "E999", "");
- return;
- }
- }
-
- var oParam = {};
- oParam.id = "TXRSO23201";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqExeDeptReturnList";
- oParam.inds = "deptreturnlist=ds_main_deptreturn_deptreturnlist:u";
- oParam.outds = "";
- oParam.async = false;
- oParam.callback = "cf_TXRSO23201";
- tranf_submit(oParam);
- }
- function cf_TXRSO23201(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- grp_search.btn_search.click();
- }
- }
- function grd_deptreturnlist_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_fromdd.value);
- ds_popgood.setColumn(0, "basedd", grp_search.ipt_fromdd.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_deptreturnlist.setCellPos(grd_deptreturnlist.getBindCellIndex("body", "returnqty"));
- grd_deptreturnlist.showEditor(true);
- }
- }
- else if(e.col == 7)
- {
- misfOpenPopUpList("02", ds_main_deptreturn_deptreturnlist,"", "fromdeptcd,fromdeptnm") ;
- }
- else if(e.col == 8)
- {
- misfOpenPopUpList("02", ds_main_deptreturn_deptreturnlist,"", "todeptcd,todeptnm") ;
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|