123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRSD07700" position="absolute 0 0 1202 761" titletext="선납입고" oninit="SMRSD07700_oninit" onload="SMRSD07700_onload">
- <Layouts>
- <Layout>
- <Static id="caption6" text="선납입고" class="tit_1" position="absolute 0 0 243 25"/>
- <Shape id="line11" class="line_6" position="absolute 0 37 1194 43" anchor="left top right"/>
- <Button id="btn_print" taborder="1" text="출력" class="btn6" visible="false" position="absolute 929 16 985 38" anchor="top right" onclick="btn_print_onclick"/>
- <Button id="btn_init" taborder="2" text="초기화" class="btn4" position="absolute 986 16 1054 38" anchor="top right" onclick="btn_init_onclick"/>
- <Button id="btn_plceord" taborder="3" text="발주조회" class="btn4" position="absolute 1055 16 1135 38" anchor="top right" onclick="btn_plceord_onclick"/>
- <Button id="btn_save" taborder="4" text="저장" class="btn4" position="absolute 1136 16 1192 38" anchor="top right" onclick="btn_save_onclick"/>
- <Div id="group4" taborder="5" position="absolute 0 41 1194 81" class="div_SA2" anchor="left top right">
- <Layouts>
- <Layout>
- <Static id="caption14" text="기관코드 :" class="search_name" position="absolute 10 11 88 28"/>
- <Combo id="cmb_instcd" taborder="1" class="combo_essential" position="absolute 90 11 260 30" style="align:center middle;"/>
- <Static id="caption22" text="입고일자 :" class="search_name" position="absolute 275 11 383 28"/>
- <Calendar id="ipt_windd" taborder="2" position="absolute 360 11 445 30" mask="yyyy-mm-dd" autoskip="true" autoselect="true"/>
- <Static id="caption2" text="~" position="absolute 447 10 462 30"/>
- <Calendar id="ipt_winddto" taborder="3" position="absolute 460 11 545 30" mask="yyyy-mm-dd" autoskip="true" autoselect="true"/>
- <Button id="btn_search" taborder="4" text="조회" class="btn1" position="absolute 1130 9 1186 31" anchor="top right" onclick="group4_btn_search_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Static id="caption21" text="선납입고내역 마스터" class="tit_2" position="absolute 0 98 174 119"/>
- <Grid id="grd_predelivewinmasterlist" taborder="6" binddataset="ds_main_predelivewinmaster_predelivewinmasterlist" useinputpanel="false" position="absolute 0 119 1194 341" autoenter="select" cellsizingtype="col" anchor="all" onexpanddown="grd_predelivewinmasterlist_onexpanddown" oncellclick="grd_predelivewinmasterlist_oncellclick" autofittype="col">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25"/>
- <Column size="84"/>
- <Column size="50"/>
- <Column size="100"/>
- <Column size="200"/>
- <Column size="100"/>
- <Column size="519"/>
- <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" colspan="2" text="입고일자/번호" taborder="undefined"/>
- <Cell col="3" colspan="2" text="선납입고거래처" taborder="undefined"/>
- <Cell col="5" colspan="2" text="납품장소" taborder="undefined"/>
- <Cell col="7" text="창고구분"/>
- <Cell col="8" text="기관코드"/>
- <Cell col="9"/>
- <Cell col="10"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" displaytype="date" edittype="date" text="bind:windd" calendardisplaynulltype="nulltext"/>
- <Cell col="2" text="bind:winno"/>
- <Cell col="3" displaytype="text" edittype="text" style="align:left middle;padding:0 0 0 3;" text="bind:wincustcd" expandshow="show"/>
- <Cell col="4" style="align:left middle;padding:0 0 0 3;" text="bind:wincustnm"/>
- <Cell col="5" displaytype="text" edittype="text" style="align:left middle;padding:0 0 0 3;" text="bind:acptdeptcd" expandshow="show"/>
- <Cell col="6" style="align:left middle;padding:0 0 0 3;" text="bind:acptdeptnm"/>
- <Cell col="7" text="bind:wareflag"/>
- <Cell col="8" text="bind:instcd"/>
- <Cell col="9" text="bind:orderdd"/>
- <Cell col="10" text="bind:orderno"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="caption7" text="선납입고내역 디테일" class="tit_2" position="absolute 0 354 174 377" anchor="left bottom"/>
- <Grid id="grd_predelivewindetaillist" taborder="7" binddataset="ds_main_predelivewindetail_predelivewindetaillist" useinputpanel="false" position="absolute 0 375 1194 755" autoenter="select" cellsizingtype="col" anchor="left right bottom" onexpanddown="grd_predelivewindetaillist_onexpanddown" autofittype="col">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="24"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="40"/>
- <Column size="110"/>
- <Column size="45"/>
- <Column size="263"/>
- <Column size="160"/>
- <Column size="55"/>
- <Column size="55"/>
- <Column size="55"/>
- <Column size="80"/>
- <Column size="214"/>
- <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"/>
- <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="Allsize"/>
- <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"/>
- <Cell col="16"/>
- <Cell col="17"/>
- <Cell col="18"/>
- <Cell col="19"/>
- <Cell col="20"/>
- <Cell col="21"/>
- <Cell col="22"/>
- <Cell col="23"/>
- <Cell col="24"/>
- <Cell col="25"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" text="bind:windd"/>
- <Cell col="2" text="bind:winno"/>
- <Cell col="3" text="bind:winseq"/>
- <Cell col="4" displaytype="text" edittype="text" style="align:center middle;" text="bind:goodcd" expandshow="show"/>
- <Cell col="5" text="bind:allsizespecid"/>
- <Cell col="6" style="align:left middle;padding:0 0 0 3;" text="bind:goodhngnm"/>
- <Cell col="7" style="align:left middle;padding:0 0 0 3;" text="bind:goodspec"/>
- <Cell col="8" text="bind:purcunit"/>
- <Cell col="9" displaytype="number" edittype="normal" text="bind:orderqty"/>
- <Cell col="10" displaytype="number" edittype="normal" text="bind:winqty"/>
- <Cell col="11" displaytype="number" edittype="normal" text="bind:winunitcost"/>
- <Cell col="12" displaytype="number" edittype="none" text="bind:winamt"/>
- <Cell col="13" text="bind:jaego" mask="(-)#,###"/>
- <Cell col="14" text="bind:instcd"/>
- <Cell col="15" text="bind:wareflag"/>
- <Cell col="16" text="bind:wincustcd"/>
- <Cell col="17" text="bind:maincustlastsuplplce"/>
- <Cell col="18" text="bind:mainusedeptcd"/>
- <Cell col="19" text="bind:orderdd"/>
- <Cell col="20" text="bind:orderno"/>
- <Cell col="21" text="bind:orderseq"/>
- <Cell col="22" text="bind:ordergb"/>
- <Cell col="23" text="bind:acptdeptcd"/>
- <Cell col="24" text="bind:goodunitcost"/>
- <Cell col="25" text="bind:orderstat"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="btn_detaildel" taborder="8" text="행삭제" class="btn2" visible="false" position="absolute 1086 351 1139 370" anchor="right bottom" onclick="btn_detaildel_onclick"/>
- <Button id="btn_detailadd" taborder="9" text="행추가" class="btn2" position="absolute 1140 351 1193 370" anchor="right bottom" onclick="btn_detailadd_onclick"/>
- <Button id="btn_delapntrgst" taborder="10" text="행삭제" class="btn2" visible="false" position="absolute 1086 95 1139 114" anchor="top right" onclick="btn_delapntrgst_onclick"/>
- <Button id="btn_addapntrgst" taborder="11" text="행추가" class="btn2" position="absolute 1140 95 1193 114" anchor="top right" onclick="btn_addapntrgst_onclick"/>
- <Shape id="line00" class="line_10" position="absolute -1 113 1193 122"/>
- <Shape id="line01" class="line_10" position="absolute -1 369 1193 378"/>
- </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="fromdd" type="STRING" size="256"/>
- <Column id="todd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="fromdd"/>
- <Col id="todd"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_predelivewinmaster_predelivewinmasterlist" 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="wareflag" type="STRING" size="256" sumtext="청구구분"/>
- <Column id="windd" type="STRING" size="256" sumtext="선납입고일자"/>
- <Column id="winno" type="STRING" size="256" sumtext="선납입고번호"/>
- <Column id="wincustcd" type="STRING" size="256" sumtext="거래처코드"/>
- <Column id="wincustnm" type="STRING" size="256" sumtext="거래처코드명"/>
- <Column id="acntcd" type="STRING" size="256" sumtext="부서코드"/>
- <Column id="acptdeptcd" type="STRING" size="256" sumtext="부서코드"/>
- <Column id="acptdeptnm" type="STRING" size="256" sumtext="부서코드명"/>
- <Column id="orderdd" type="STRING" size="256" sumtext="발주일자"/>
- <Column id="orderno" type="STRING" size="256" sumtext="발주번호"/>
- <Column id="ordergb" type="STRING" size="256" sumtext="발주구분"/>
- <Column id="delivedd" type="STRING" size="256" sumtext="선납출고일자"/>
- <Column id="deliveno" type="STRING" size="256" sumtext="선납출고번호"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_main_predelivewindetail_predelivewindetaillist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_predelivewindetail_predelivewindetaillist_oncolumnchanged">
- <ColumnInfo>
- <Column id="windd" type="STRING" size="256" sumtext="선납입고일자"/>
- <Column id="winno" type="STRING" size="256" sumtext="입고번호"/>
- <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
- <Column id="wareflag" type="STRING" size="256" sumtext="창고구분"/>
- <Column id="wincustcd" type="STRING" size="256" sumtext="선납입고거래처"/>
- <Column id="winseq" type="STRING" size="256" sumtext="순번"/>
- <Column id="goodcd" type="STRING" size="256" sumtext="물품코드"/>
- <Column id="allsizespecid" type="STRING" size="256" sumtext="allsize"/>
- <Column id="goodhngnm" type="STRING" size="256" sumtext="물품명"/>
- <Column id="goodspec" type="STRING" size="256" sumtext="규격"/>
- <Column id="purcunit" type="STRING" size="256" sumtext="단위"/>
- <Column id="orderqty" type="STRING" size="256" sumtext="발주수량"/>
- <Column id="winqty" type="STRING" size="256" sumtext="선납입고수량"/>
- <Column id="winunitcost" type="STRING" size="256" sumtext="선납입고단가"/>
- <Column id="winamt" type="STRING" size="256" sumtext="선납입고금액"/>
- <Column id="acntcd" type="STRING" size="256" sumtext="계정과목"/>
- <Column id="orderdd" type="STRING" size="256" sumtext="발주일자"/>
- <Column id="orderno" type="STRING" size="256" sumtext="발주번호"/>
- <Column id="ordergb" type="STRING" size="256" sumtext="발주구분"/>
- <Column id="maincustlastsuplplce" type="STRING" size="256" sumtext="창구구분"/>
- <Column id="mainusedeptcd" type="STRING" size="256" sumtext="납품장소"/>
- <Column id="acptdeptcd" type="STRING" size="256" sumtext="수령부서"/>
- <Column id="jaego" type="STRING" size="256" sumtext="재고"/>
- <Column id="orderstat" type="STRING" size="256" sumtext="발주상태"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_detailsearch" 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="windd" type="STRING" size="256"/>
- <Column id="winno" type="STRING" size="256"/>
- <Column id="wincustcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="wareflag"/>
- <Col id="windd"/>
- <Col id="winno"/>
- <Col id="wincustcd"/>
- </Row>
- </Rows>
- </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="selectyn" type="STRING" size="256"/>
- <Column id="goodcd" type="STRING" size="256"/>
- <Column id="delivedd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="selectyn"/>
- <Col id="goodcd"/>
- <Col id="delivedd"/>
- </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_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>
- <Dataset id="ds_main_predelivewinspec_predelivewinspeclist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_send_header" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="custcode" type="STRING" size="256"/>
- <Column id="wareflag" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <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="INT" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_popsubdata_plceordlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="group4.cmb_instcd" propid="value" datasetid="ds_send_search" columnid="instcd"/>
- <BindItem id="item1" compid="group4.ipt_windd" propid="value" datasetid="ds_send_search" columnid="fromdd"/>
- <BindItem id="item2" compid="group4.ipt_winddto" propid="value" datasetid="ds_send_search" columnid="todd"/>
- </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 SMRSD07700_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMRSD07700_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_predelivewindetaillist);
- grdf_setRowTypeIcon(grd_predelivewindetaillist, 0);
- grdf_initGrid(grd_predelivewinmasterlist);
- grdf_setRowTypeIcon(grd_predelivewinmasterlist, 0);
-
- fInit();
- }
- function fInit()
- {
- misfGridInit(grd_predelivewinmasterlist);
- misfGridInit(grd_predelivewindetaillist);
-
- misfComboInstCdListMulti("group4.cmb_instcd",utlf_getCurrentDate(),"","N");
- group4.cmb_instcd.value = sysf_getUserInfo("dutplceinstcd");
- ds_send_search.setColumn(0, "fromdd", utlf_getCurrentDate().toDate().getAddDate(-7).getDateFormat("YYYYMMDD"));
- ds_send_search.setColumn(0, "todd", utlf_getCurrentDate());
-
- if(sysf_getUserInfo("userid") == "MIS")
- {
- btn_delapntrgst.visible = true;
- btn_detaildel.visible = true;
- }
- }
- function group4_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- if(utlf_isNull(group4.ipt_windd.value))
- {
- sysf_messageBox("입고일자가 없습니다. 확인하여 주십시오.", "E999", "");
- group4.ipt_windd.setFocus();
- return;
- }
- misfGridInit(grd_predelivewinmasterlist);
- misfGridInit(grd_predelivewindetaillist);
-
- var oParam = {};
- oParam.id = "TRRSD07701";
- oParam.service = "reqapp.ReqMngt";
- oParam.method = "reqGetPreDeliveWinMasterList";
- oParam.inds = "req=ds_send_search";
- oParam.outds = "ds_main_predelivewinmaster_predelivewinmasterlist=predelivewinmasterlist";
- oParam.async = false;
- //oParam.callback = "cf_TRRSD07701";
- tranf_submit(oParam);
- }
- function grd_predelivewinmasterlist_onexpanddown(obj:Grid, e:GridMouseEventInfo)
- {
- if(e.cell == obj.getBindCellIndex("Body", "acptdeptcd"))
- {
- misfOpenPopUpList("02", grd_predelivewinmasterlist,"", "acptdeptcd,acptdeptnm") ;
- }
- else if (e.cell == obj.getBindCellIndex("Body", "wincustcd"))
- {
- rszfOpenPopUpListByWndName(grd_predelivewinmasterlist,"","wincustcd,wincustnm","SPRSD00220","instcd","group4.cmb_instcd");
- }
- }
- function grd_predelivewinmasterlist_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- if(!(ds_main_predelivewinmaster_predelivewinmasterlist.getRowType(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition) == 2))
- {
- if(ds_main_predelivewindetail_predelivewindetaillist.getRowType(0) == 2 )
- {
- sysf_messageBox("현재 하단 디테일에 입력중인 자료가 있습니다.", "E999", "");
- return;
- }
-
- ds_send_detailsearch.setColumn(0, "instcd", ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "instcd"));
- ds_send_detailsearch.setColumn(0, "wareflag", ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "wareflag"));
- ds_send_detailsearch.setColumn(0, "windd", ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "windd"));
- ds_send_detailsearch.setColumn(0, "winno", ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "winno"));
- ds_send_detailsearch.setColumn(0, "wincustcd", ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "wincustcd"));
-
- var oParam = {};
- oParam.id = "TRRSD07704";
- oParam.service = "reqapp.ReqMngt";
- oParam.method = "reqGetPreDeliveWinDetailList";
- oParam.inds = "req=ds_send_detailsearch";
- oParam.outds = "ds_main_predelivewindetail_predelivewindetaillist=predelivewindetaillist";
- oParam.async = false;
- //oParam.callback = "cf_TRRSD07704";
- tranf_submit(oParam);
- }
- }
- function grd_predelivewindetaillist_onexpanddown(obj:Grid, e:GridMouseEventInfo)
- {
- ds_popgood.setColumn(0, "wareflag", "");
- ds_popgood.setColumn(0, "basedd", "");
- ds_popgood.setColumn(0, "selectyn", "");
- ds_popgood.setColumn(0, "instcd", group4.cmb_instcd.value);
- ds_popgood.setColumn(0, "selectyn", ds_main_predelivewindetail_predelivewindetaillist.getColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "windd"));
-
- 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_predelivewindetaillist.col = grd_predelivewindetaillist.colRef("winqty");
- }
- }
- function fGetGoodDetail()
- {
- for(var k = 0; k < ds_popgood_goodlist.rowcount; k++)
- {
- var bDup = false;
-
- for(var i = 0; i < ds_main_predelivewindetail_predelivewindetaillist.rowcount; i++)
- {
- if( ds_main_predelivewindetail_predelivewindetaillist.getColumn(i, "goodcd") == ds_popgood_goodlist.getColumn(k, "goodcd"))
- {
- sysf_messageBox("물품코드가 중복되었습니다. [" + ds_main_predelivewindetail_predelivewindetaillist.getColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "goodcd") + "] ", "E999", "");
- bDup = true;
- continue;
- }
- }
-
- if( bDup == false )
- {
- ds_main_gooddetail.clearData();
- 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_gooddetail=gooddetail";
- oParam.async = false;
- oParam.callback = "cf_TRRSO20104";
- tranf_submit(oParam);
- if(arErrorCode.pop("TRRSO20104") > -1)
- {
- var maincustlastsuplplce = ""; //ds_main_predelivewindetail_predelivewindetaillist.getColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "maincustlastsuplplce");
- var wareflag = "";// ds_main_predelivewindetail_predelivewindetaillist.getColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "wareflag");
-
- for( var j = 0; j > ds_main_predelivewindetail_predelivewindetaillist.rowcount; j++ )
- {
- if(ds_main_predelivewindetail_predelivewindetaillist.getColumn(j, "wincustcd") != maincustlastsuplplce)
- {
- sysf_messageBox("이미 입력된 물품과 거래처가 달라 추가할 수 없습니다.", "E999", "");
- continue;
- }
- if(ds_main_predelivewindetail_predelivewindetaillist.getColumn(j, "wincustcd") != wareflag)
- {
- sysf_messageBox("이미 입력된 물품과 창고구분이 달라 추가할 수 없습니다.", "E999", "");
- continue;
- }
- }
-
- if(!utlf_isNull(ds_main_predelivewindetail_predelivewindetaillist.getColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "goodcd")))
- {
- btn_detailadd.click();
- }
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "goodcd", ds_main_gooddetail.getColumn(0, "goodcd"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "goodhngnm", ds_main_gooddetail.getColumn(0, "goodnm"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "goodspec", ds_main_gooddetail.getColumn(0, "goodspec"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "goodunitcost", ds_main_gooddetail.getColumn(0, "goodunitcost"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "allsizespecid", ds_main_gooddetail.getColumn(0, "allsizespecid"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "purcunit", ds_main_gooddetail.getColumn(0, "purcunit"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "mainusedeptcd", ds_main_gooddetail.getColumn(0, "mainusedeptcd"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "maincustlastsuplplce", ds_main_gooddetail.getColumn(0, "maincustlastsuplplce"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "wareflag", ds_main_gooddetail.getColumn(0, "wareflag"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "wincustcd", ds_main_gooddetail.getColumn(0, "maincustlastsuplplce"));
-
- for( var j = 0; j > ds_main_predelivewindetail_predelivewindetaillist.rowcount; j++ )
- {
- if(!(ds_send_header.getColumn(0, "custcode") == maincustlastsuplplce && ds_send_header.getColumn(0, "wareflag") == mainusedeptcd))
- {
- sysf_messageBox("선택한 물품의 공급업체나 창고구분이 위에 설정된 값과 다릅니다.", "E999", "");
-
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "maincustlastsuplplce", "");
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "mainusedeptcd", "");
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "goodcd", "");
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "allsizespecid", "");
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "goodhngnm", "");
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "goodspec", "");
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "purcunit", "");
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "winunitcost", "");
- return
- }
- }
-
- var winqty = ds_main_predelivewindetail_predelivewindetaillist.getColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "winqty");
- var goodunitcost = ds_main_predelivewindetail_predelivewindetaillist.getColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "goodunitcost");
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "winamt", winqty * goodunitcost);
- }
- }
- }
- }
- function cf_TRRSO20104(sSvcId, nErrorCode, sErrorMsg)
- {
- arErrorCode.push(sSvcId, nErrorCode);
- if(nErrorCode < 0) return;
- }
- function ds_main_predelivewindetail_predelivewindetaillist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- var winqty = obj.getColumn(e.row, "winqty");
- var winunitcost = obj.getColumn(e.row, "winunitcost");
-
- if (e.columnid == "winqty")
- {
- winqty = e.newvalue;
- }
- if(e.columnid == "winunitcost")
- {
- winunitcost = e.newvalue;
- }
-
- obj.setColumn(e.row, "winamt", winqty * winunitcost);
- }
- function btn_delapntrgst_onclick(obj:Button, e:ClickEventInfo)
- {
- misfGridIUD(grd_predelivewinmasterlist,"D");
- }
- function btn_addapntrgst_onclick(obj:Button, e:ClickEventInfo)
- {
- for( var i = 0; i < ds_main_predelivewinmaster_predelivewinmasterlist.rowcount; i++ )
- {
- if(ds_main_predelivewinmaster_predelivewinmasterlist.getRowType(i) == 2)
- {
- sysf_messageBox("이미 입력중인 행이 있습니다. 한번에 한 건씩만 입력이 가능합니다.", "I999", "");
- return;
- }
- }
- var addRow = ds_main_predelivewinmaster_predelivewinmasterlist.addRow();
- misfGridInit(grd_predelivewindetaillist);
-
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "instcd", group4.cmb_instcd.value);
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "windd", group4.ipt_windd.value);
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "orderdd", group4.ipt_windd.value);
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "ordergb", "2");
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "orderqty", "0");
- }
- function btn_detaildel_onclick(obj:Button, e:ClickEventInfo)
- {
- misfGridIUD(grd_predelivewindetaillist,"D");
- }
- function btn_detailadd_onclick(obj:Button, e:ClickEventInfo)
- {
- var addRow = ds_main_predelivewindetail_predelivewindetaillist.addRow();
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "orderqty", "0");
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "winqty", "0");
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "winunitcost", "0");
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "winamt", "0");
- }
- function btn_print_onclick(obj:Button, e:ClickEventInfo)
- {
- group4.btn_search.click();
-
- var objDOM = rptf_createDOM();
- rptf_setNodeListToDOM(objDOM, "/root/main/predelivewinspec/predelivewinspeclist", ds_main_predelivewindetail_predelivewindetaillist);
- rptf_setNodeListToDOM(objDOM, "/root/main/predelivewinspec/predelivewinspecheader", ds_main_predelivewindetail_predelivewindetaillist);
- var objParam = new Object();
- objParam.xml_data_XML1 = objDOM.documentElement.source;
- objParam.instnm = group4.cmb_instcd.text;
- var option = "";
- rptf_exeReportPreview30(["RPRSD07701"],[objParam], option);
- }
- function btn_init_onclick(obj:Button, e:ClickEventInfo)
- {
- fInit();
- }
- function btn_plceord_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_popreq.setColumn(0, "count", 0);
-
- var objArg = new Object();
- objArg.arg_ds_popdata = ds_popreq;
- frmf_modal("SMRSD07710", "SMRSD07710", objArg, "", "", "", "", "", "", "", "", "", "M");
-
- var cnt = ds_popreq.getColumn(0, "count");
- var rowcomparison = 0;
-
- misfGridInit(grd_predelivewinmasterlist);
- misfGridInit(grd_predelivewindetaillist);
-
- if(!(utlf_isNull(cnt) || cnt == 0))
- {
- var addRow = ds_main_predelivewinmaster_predelivewinmasterlist.addRow();
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "instcd", group4.cmb_instcd.value);
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "windd", group4.ipt_windd.value);
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "orderdd", ds_popsubdata_plceordlist.getColumn(0, "orderdd"));
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "orderno", ds_popsubdata_plceordlist.getColumn(0, "orderno"));
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "ordergb", "1");
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "wincustcd", ds_popsubdata_plceordlist.getColumn(0, "custcode"));
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "wincustnm", ds_popsubdata_plceordlist.getColumn(0, "custnm"));
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "wareflag", ds_popsubdata_plceordlist.getColumn(0, "mainusedeptcd"));
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "acptdeptcd", ds_popsubdata_plceordlist.getColumn(0, "acptdeptcd"));
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "acptdeptnm", ds_popsubdata_plceordlist.getColumn(0, "acptdeptnm"));
- }
-
- var oldmainusedeptcd = ds_popsubdata_plceordlist.getColumn(0, "mainusedeptcd");
- var oldcustcode = ds_popsubdata_plceordlist.getColumn(0, "custcode");
- var oldacptdeptcd = ds_popsubdata_plceordlist.getColumn(0, "acptdeptcd");
-
- for(var i = 0; i < cnt ; i++)
- {
- var newmainusedeptcd = ds_popsubdata_plceordlist.getColumn(i, "mainusedeptcd");
- var newcustcode = ds_popsubdata_plceordlist.getColumn(i, "custcode");
- var newacptdeptcd = ds_popsubdata_plceordlist.getColumn(i, "acptdeptcd");
-
- if(oldmainusedeptcd == newmainusedeptcd && oldcustcode == newcustcode && oldacptdeptcd == newacptdeptcd)
- {
- ds_main_predelivewindetail_predelivewindetaillist.addRow();
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "windd", group4.ipt_windd.value);
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "instcd", ds_popsubdata_plceordlist.getColumn(i, "instcd"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "wareflag", ds_popsubdata_plceordlist.getColumn(i, "mainusedeptcd"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "wincustcd", ds_popsubdata_plceordlist.getColumn(i, "custcode"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "acptdeptcd", ds_popsubdata_plceordlist.getColumn(i, "acptdeptcd"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "goodcd", ds_popsubdata_plceordlist.getColumn(i, "goodcd"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "allsizespecid", ds_popsubdata_plceordlist.getColumn(i, "allsizespecid"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "goodhngnm", ds_popsubdata_plceordlist.getColumn(i, "goodhngnm"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "goodspec", ds_popsubdata_plceordlist.getColumn(i, "goodspec"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "purcunit", ds_popsubdata_plceordlist.getColumn(i, "purcunit"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "orderqty", ds_popsubdata_plceordlist.getColumn(i, "orderqty"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "orderseq", ds_popsubdata_plceordlist.getColumn(i, "orderseq"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "winqty", 0);
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "winunitcost", ds_popsubdata_plceordlist.getColumn(i, "goodunitcost"));
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "winamt", 0);
- }
- else
- {
- rowcomparison++;
- }
- }
- if(rowcomparison > 0)
- {
- sysf_messageBox("공급업체,창고구분,납품장소가 다른 발주내역을 제외하고 행추가를 완료하였습니다.", "E999", "");
- }
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- if(utlf_isNull(ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "windd")))
- {
- sysf_messageBox("선납입고 마스터 입고일자가 없습니다. 입력하여주십시오.", "E999", "");
- return;
- }
-
- var wincustcd = ds_main_predelivewindetail_predelivewindetaillist.getColumn(0, "wincustcd");
- var wareflag = ds_main_predelivewindetail_predelivewindetaillist.getColumn(0, "wareflag");
-
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "wincustcd", wincustcd);
- ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "wareflag", wareflag);
-
- var windd = ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "windd");
- var instcd = ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "instcd");
-
- if(utlf_isNull(ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "wincustcd")))
- {
- sysf_messageBox("선납입고 마스터 선납입고거래처가 없습니다. 입력하여주십시오.", "E999", "");
- return;
- }
- for(var i = 0; i < ds_main_predelivewindetail_predelivewindetaillist.rowcount; i++)
- {
- var goodcd = ds_main_predelivewindetail_predelivewindetaillist.getColumn(i, "goodcd");
-
- if(utlf_isNull(goodcd))
- {
- sysf_messageBox(parseInt(i+1) + "번째 선납입고 디테일에 물품코드가 없습니다. 입력하여 주십시오", "E999", "");
- return;
- }
-
- var orderqty = ds_main_predelivewindetail_predelivewindetaillist.getColumn(i, "orderqty");
- var winqty = ds_main_predelivewindetail_predelivewindetaillist.getColumn(i, "winqty");
-
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "windd", windd);
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "instcd", instcd);
-
- if(parseInt(orderqty) == parseInt(winqty))
- {
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "orderstat", "07");
- }
- else if(parseInt(orderqty) != parseInt(winqty))
- {
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "orderstat", "05");
- }
- else if(parseInt(winqty) == 0)
- {
- ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "orderstat", "03");
- }
- }
-
- var oParam = {};
- oParam.id = "TXRSD07701";
- oParam.service = "reqapp.ReqMngt";
- oParam.method = "reqExePreDeliveWInList";
- oParam.inds = "predelivewinmasterlist=ds_main_predelivewinmaster_predelivewinmasterlist:u predelivewindetaillist=ds_main_predelivewindetail_predelivewindetaillist:u";
- oParam.outds = "";
- oParam.async = false;
- oParam.callback = "cf_TXRSD07701";
- tranf_submit(oParam);
- }
- function cf_TXRSD07701(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- group4.btn_search.click();
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|