123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRSO21400" position="absolute 0 0 1200 768" titletext="출고등록(부서재고)" oninit="SMRSO21400_oninit" onload="SMRSO21400_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 45 1195 51" anchor="left top right"/>
- <Button id="btn_help" taborder="1" text="도움말" class="btn4" position="absolute 1069 24 1137 46" anchor="top right" onclick="btn_help_onclick"/>
- <Button id="btn_save" taborder="2" text="저장" class="btn4" position="absolute 1138 24 1194 46" anchor="top right" onclick="btn_save_onclick"/>
- <Div id="grp_search" anchor="left top right" taborder="3" class="div_SA2" position="absolute 0 49 1195 109">
- <Layouts>
- <Layout>
- <Button id="btn_search" taborder="4" text="조회" class="btn1" position="absolute 1121 19 1177 41" anchor="top right" onclick="grp_search_btn_search_onclick"/>
- <Combo id="cmb_instcd" taborder="5" innerdataset="ds_main_init" codecolumn="cnstcd" datacolumn="cnstnm" class="combo_default" enable="false" position="absolute 117 8 253 27" style="align:center middle;"/>
- <Static id="cap_instcd" text="기관코드:" class="search_name" position="absolute 33 9 119 26"/>
- <Calendar id="ipt_delivedd" taborder="6" position="absolute 422 8 561 27" mask="yyyy-mm-dd" autoselect="true" autoskip="true" onchanged="grp_search_ipt_delivedd_onchanged" style="align:center middle;"/>
- <Static id="caption20" text="요구부서:" class="search_name" position="absolute 661 9 742 26"/>
- <Shape id="line30" linetype="vertical" class="line_4" position="absolute 1097 15 1103 47" anchor="top right"/>
- <Button id="btn_delivedeptcd" taborder="7" class="icon_search" position="absolute 853 9 869 25" onclick="grp_search_btn_delivedeptcd_onclick"/>
- <Edit id="ipt_reqdeptcd" taborder="8" class="input_default" position="absolute 746 8 851 27" autoselect="true" autoskip="true"/>
- <Edit id="opt_reqdeptnm" taborder="9" readonly="true" position="absolute 871 8 1027 27" class="output"/>
- <Static id="caption9" text="출고일자:" class="search_name" position="absolute 336 9 422 26"/>
- <Static id="caption3" text="출고유형:" class="search_name" position="absolute 33 35 165 52"/>
- <Combo id="cmb_outkind" taborder="10" class="combo_default" position="absolute 117 34 253 53" onitemchanged="grp_search_cmb_outkind_onitemchanged" style="align:center middle;"/>
- <Edit id="ipt_delivedeptcd" taborder="11" class="input_default" position="absolute 745 34 850 53" autoselect="true" autoskip="true"/>
- <Button id="button1" taborder="12" class="icon_search" position="absolute 852 35 868 51" onclick="grp_search_button1_onclick"/>
- <Edit id="opt_delivedeptnm" taborder="13" readonly="true" position="absolute 870 34 1026 53" class="output"/>
- <Static id="caption2" text="출고부서:" class="search_name" position="absolute 661 35 742 52"/>
- <Combo id="cmb_winkind" taborder="14" class="combo_default" position="absolute 422 34 561 53" style="align:center middle;"/>
- <Static id="caption4" text="입고유형:" class="search_name" position="absolute 336 35 416 52"/>
- </Layout>
- </Layouts>
- </Div>
- <Shape id="line1" class="line_10" position="absolute 0 148 1195 154" anchor="left top right"/>
- <Static id="caption1" text="출고내역" class="tit_2" position="absolute 0 132 180 154"/>
- <Button id="btn_rowinsert" taborder="4" text="행추가" class="btn2" position="absolute 1088 129 1141 148" anchor="top right" onclick="btn_rowinsert_onclick"/>
- <Grid id="grd_deptoutlist" class="datagrid2" taborder="5" binddataset="ds_main_deptoutinfo_deptoutlist" autoenter="select" useinputpanel="false" cellsizingtype="col" autofittype="col" position="absolute 0 153 1195 765" anchor="all" onexpanddown="grd_deptoutlist_onexpanddown" oncelldblclick="grd_deptoutlist_oncelldblclick" onkeydown="grd_deptoutlist_onkeydown">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="24"/>
- <Column size="46"/>
- <Column size="56"/>
- <Column size="70"/>
- <Column size="84"/>
- <Column size="103"/>
- <Column size="206"/>
- <Column size="174"/>
- <Column size="69"/>
- <Column size="70"/>
- <Column size="70"/>
- <Column size="70"/>
- <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="31" 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="사유"/>
- <Cell col="13" text="기관코드"/>
- <Cell col="14" text="요구부서"/>
- <Cell col="15" text="출고부서"/>
- <Cell col="16" text="마감여부"/>
- <Cell col="17" text="출고일자"/>
- <Cell col="18" text="출고유형"/>
- <Cell col="19"/>
- <Cell col="20"/>
- <Cell col="21"/>
- <Cell col="22"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" text="bind:row_num"/>
- <Cell col="2" text="bind:deliveno" enable="false"/>
- <Cell col="3" displaytype="none" edittype="none" text="bind:outkindnm"/>
- <Cell col="4" displaytype="combo" text="bind:winkind" enable="false"/>
- <Cell col="5" displaytype="text" edittype="text" style="align:center middle;" text="bind:goodcd" editautoselect="true" expandshow="show"/>
- <Cell col="6" text="bind:goodnm"/>
- <Cell col="7" text="bind:goodspec"/>
- <Cell col="8" text="bind:deliveunit"/>
- <Cell col="9" displaytype="number" text="bind:deliveqty"/>
- <Cell col="10" displaytype="number" text="bind:hun_jaego"/>
- <Cell col="11" displaytype="number" text="bind:realjaego"/>
- <Cell col="12" displaytype="text" edittype="text" text="bind:reason"/>
- <Cell col="13" text="bind:instcd"/>
- <Cell col="14" text="bind:reqdeptcd"/>
- <Cell col="15" text="bind:delivedeptcd"/>
- <Cell col="16" text="bind:endyn"/>
- <Cell col="17" text="bind:delivedd"/>
- <Cell col="18" text="bind:outkind"/>
- <Cell col="19" text="bind:wareflag"/>
- <Cell col="20" text="bind:flag"/>
- <Cell col="21" text="bind:freeflag"/>
- <Cell col="22" text="bind:windd"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="btn_chulpop" taborder="6" text="입고내역조회" class="btn2" visible="true" position="absolute 741 129 827 148" anchor="top right" onclick="btn_chulpop_onclick"/>
- <Button id="button2" taborder="7" text="전체삭제" class="btn2" position="absolute 893 129 957 148" anchor="top right" onclick="button2_onclick"/>
- <Button id="btn_choidel" taborder="8" text="행삭제" class="btn2" position="absolute 1142 129 1195 148" anchor="top right" onclick="btn_choidel_onclick"/>
- <Button id="btn_jaego" taborder="9" text="부서재고" class="btn2" position="absolute 958 129 1022 148" anchor="top right" onclick="btn_jaego_onclick"/>
- <Button id="btn_prcpsum" taborder="10" text="처방집계" class="btn2" visible="true" position="absolute 828 129 892 148" anchor="top right" onclick="btn_prcpsum_onclick"/>
- <Button id="btn_deptwin" taborder="11" text="처방출고" class="btn2" position="absolute 1023 129 1087 148" anchor="top right" onclick="btn_deptwin_onclick"/>
- <Static id="cap_magam" position="absolute 240 120 635 140"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_cond_oncolumnchanged">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256"/>
- <Column id="delivedd" type="STRING" size="256"/>
- <Column id="outkind" type="STRING" size="256"/>
- <Column id="reqdeptcd" type="STRING" size="256"/>
- <Column id="reqdeptnm" type="STRING" size="256"/>
- <Column id="delivedeptcd" type="STRING" size="256"/>
- <Column id="delivedeptnm" type="STRING" size="256"/>
- <Column id="winkind" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="delivedd"/>
- <Col id="outkind"/>
- <Col id="reqdeptcd"/>
- <Col id="reqdeptnm"/>
- <Col id="delivedeptcd"/>
- <Col id="delivedeptnm"/>
- <Col id="winkind"/>
- </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="cnstcd" type="STRING" size="256"/>
- <Column id="cnstnm" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_main_deptoutinfo_deptoutlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_deptoutinfo_deptoutlist_oncolumnchanged">
- <ColumnInfo>
- <Column id="goodcd" type="STRING" size="256" sumtext="물품코드"/>
- <Column id="goodnm" type="STRING" size="256" sumtext="물퓸명"/>
- <Column id="deliveunit" type="STRING" size="256" sumtext="수불단위"/>
- <Column id="goodspec" type="STRING" size="256" sumtext="규격"/>
- <Column id="deliveqty" type="STRING" size="256" sumtext="출고수량"/>
- <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
- <Column id="reqdeptcd" type="STRING" size="256" sumtext="요구부서"/>
- <Column id="delivedeptcd" type="STRING" size="256" sumtext="출고부서"/>
- <Column id="endyn" type="STRING" size="256" sumtext="마감여부"/>
- <Column id="delivedd" type="STRING" size="256" sumtext="출고일자"/>
- <Column id="outkind" type="STRING" size="256" sumtext="출고유형"/>
- <Column id="wareflag" type="STRING" size="256" sumtext="창고구분"/>
- <Column id="reason" type="STRING" size="256" sumtext="사유"/>
- <Column id="hun_jaego" type="STRING" size="256" sumtext="재고량"/>
- <Column id="realjaego" type="STRING" size="256" sumtext="실재고"/>
- <Column id="winkind" type="STRING" size="256" sumtext="입고유형"/>
- <Column id="freeflag" type="STRING" size="256" sumtext="무산정"/>
- <Column id="outkindnm" type="STRING" size="256" sumtext="출고유형"/>
- <Column id="windd" type="STRING" size="256" sumtext="입고일자"/>
- <Column id="deliveno" type="STRING" size="256" sumtext="출고번호"/>
- <Column id="row_num" type="STRING" size="256" sumtext="순번"/>
- </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>
- <Col id="instcd"/>
- <Col id="dd"/>
- <Col id="deptcd"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_distrimagam" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="endyn" type="STRING" size="256"/>
- </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_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>
- <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_copylist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_popsubdata_prcpsum" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_popsubdata_stocklist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_search.cmb_instcd" propid="value" datasetid="ds_cond" columnid="instcd"/>
- <BindItem id="item1" compid="grp_search.ipt_delivedd" propid="value" datasetid="ds_cond" columnid="delivedd"/>
- <BindItem id="item2" compid="grp_search.ipt_reqdeptcd" propid="value" datasetid="ds_cond" columnid="reqdeptcd"/>
- <BindItem id="item3" compid="grp_search.opt_reqdeptnm" propid="value" datasetid="ds_cond" columnid="reqdeptnm"/>
- <BindItem id="item4" compid="grp_search.opt_delivedeptnm" propid="value" datasetid="ds_cond" columnid="delivedeptnm"/>
- <BindItem id="item5" compid="grp_search.ipt_delivedeptcd" propid="value" datasetid="ds_cond" columnid="delivedeptcd"/>
- <BindItem id="item6" compid="grp_search.cmb_winkind" propid="value" datasetid="ds_cond" columnid="winkind"/>
- <BindItem id="item7" compid="grp_search.cmb_outkind" propid="value" datasetid="ds_cond" columnid="outkind"/>
- </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 SMRSO21400_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMRSO21400_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_deptoutlist);
- grdf_setRowTypeIcon(grd_deptoutlist, 0);
-
- misfGetAndSetUserInfo();
- misfComboComCdListMulti("Z0007,030R0020,030R0019,030R0019","grp_search.cmb_instcd,grp_search.cmb_outkind,grd_deptoutlist.winkind,grp_search.cmb_winkind");
-
- frmf_addComboItem( "grp_search.cmb_winkind", "전체", "", "above");
- grp_search.cmb_winkind.value = "";
- grp_search.cmb_winkind.index = 0;
-
- frmf_addComboItem( "grp_search.cmb_outkind", "전체", "", "above");
- grp_search.cmb_outkind.value = "";
- grp_search.cmb_outkind.index = 0;
-
- var instcd = ds_cond.getColumn(0, "instcd");
-
- if(instcd == "031")
- {
- ds_cond.setColumn(0, "reqdeptcd", DUT_PLCEDEPT_CD);
- ds_cond.setColumn(0, "reqdeptnm", DUT_PLCEDEPT_NM);
- ds_cond.setColumn(0, "delivedeptcd", DUT_PLCEDEPT_CD);
- ds_cond.setColumn(0, "delivedeptnm", DUT_PLCEDEPT_NM);
- }
- else
- {
- ds_cond.setColumn(0, "reqdeptcd", sysf_getUserInfo("dutplcecd"));
- ds_cond.setColumn(0, "reqdeptnm", sysf_getUserInfo("dutplcenm"));
- ds_cond.setColumn(0, "delivedeptcd", sysf_getUserInfo("dutplcecd"));
- ds_cond.setColumn(0, "delivedeptnm", sysf_getUserInfo("dutplcenm"));
- }
-
- ds_cond.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
- ds_cond.setColumn(0, "delivedd", utlf_getCurrentDate());
- }
- function grp_search_ipt_delivedd_onchanged(obj:Calendar, e:ChangeEventInfo)
- {
- if(ds_main_deptoutinfo_deptoutlist.rowcount > 0)
- {
- ds_main_deptoutinfo_deptoutlist.clearData();
- }
- }
- function ds_cond_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid == "reqdeptcd")
- {
- grp_search.ipt_reqdeptcd.value = e.newvalue;
- grp_search.ipt_reqdeptcd.setFocus();
-
- misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
-
- ds_cond.setColumn(0, "delivedeptcd", ds_cond.getColumn(0, "reqdeptcd"));
- ds_cond.setColumn(0, "delivedeptnm", ds_cond.getColumn(0, "reqdeptnm"));
-
- if(ds_main_deptoutinfo_deptoutlist.rowcount > 0)
- {
- ds_main_deptoutinfo_deptoutlist.clearData();
- }
- }
-
- if(e.columnid == "delivedeptcd")
- {
- grp_search.ipt_delivedeptcd.value = e.newvalue;
- grp_search.ipt_delivedeptcd.setFocus();
-
- misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
-
- if(ds_main_deptoutinfo_deptoutlist.rowcount > 0)
- {
- ds_main_deptoutinfo_deptoutlist.clearData();
- }
- }
- }
- function grp_search_btn_delivedeptcd_onclick(obj:Button, e:ClickEventInfo)
- {
- var vOrigDeptcd = grp_search.ipt_reqdeptcd.value;
-
- var recv_list = "reqdeptcd,reqdeptnm";
- misfOpenPopUpList("02", ds_cond,"", recv_list) ;
-
- ds_cond.setColumn(0, "delivedeptcd", ds_cond.getColumn(0, "reqdeptcd"));
- ds_cond.setColumn(0, "delivedeptnm", ds_cond.getColumn(0, "reqdeptnm"));
- }
- function grp_search_button1_onclick(obj:Button, e:ClickEventInfo)
- {
- var recv_list = "delivedeptcd,delivedeptnm";
- misfOpenPopUpList("02", ds_cond,"", recv_list) ;
- }
- function grp_search_cmb_outkind_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- if(ds_main_deptoutinfo_deptoutlist.rowcount > 0)
- {
- ds_main_deptoutinfo_deptoutlist.clearData();
- }
-
- if(obj.value == "10")
- {
- grd_deptoutlist.setFormatColProperty(grd_deptoutlist.getBindCellIndex("Body", "reason"), "size", 235);
- }
- else
- {
- grd_deptoutlist.setFormatColProperty(grd_deptoutlist.getBindCellIndex("Body", "reason"), "size", 0);
- }
- }
- function grp_search_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- if(utlf_isNull(grp_search.ipt_reqdeptcd.value))
- {
- sysf_messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
- grp_search.ipt_reqdeptcd.setFocus();
- return;
- }
-
- if(utlf_isNull(grp_search.ipt_delivedeptcd.value))
- {
- sysf_messageBox("출고부서가 선택되지 않았습니다. \n\n먼저 출고부서를 선택하십시요.", "E999", "");
- grp_search.ipt_delivedeptcd.setFocus();
- return;
- }
-
- var oParam = {};
- oParam.id = "TRRSO21401";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetDeptOutList";
- oParam.inds = "cond=ds_cond";
- oParam.outds = "ds_main_deptoutinfo_deptoutlist=deptoutlist";
- oParam.async = false;
- oParam.callback = "cf_TRRSO21401";
- tranf_submit(oParam);
- }
- function cf_TRRSO21401(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- if(grp_search.cmb_outkind.value == "10")
- {
- grd_deptoutlist.setFormatColProperty(grd_deptoutlist.getBindCellIndex("Body", "reason"), "size", 235);
- }
- else
- {
- grd_deptoutlist.setFormatColProperty(grd_deptoutlist.getBindCellIndex("Body", "reason"), "size", 0);
- }
-
- ds_magamsearch.setColumn(0, "instcd", ds_cond.getColumn(0, "instcd"));
- ds_magamsearch.setColumn(0, "dd", ds_cond.getColumn(0, "delivedd"));
- ds_magamsearch.setColumn(0, "deptcd", ds_cond.getColumn(0, "delivedeptcd"));
-
- 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 grd_deptoutlist_onexpanddown(obj:Grid, e:GridMouseEventInfo)
- {
- if(ds_main_deptoutinfo_deptoutlist.getRowType(e.row) == 1 || ds_main_deptoutinfo_deptoutlist.getRowType(e.row) == 4)
- {
- return;
- }
-
- ds_popgood.setColumn(0, "instcd", grp_search.cmb_instcd.value);
- ds_popgood.setColumn(0, "delivedd", grp_search.ipt_delivedd.value);
- ds_popgood.setColumn(0, "basedd", grp_search.ipt_delivedd.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_deptoutlist.setCellPos(grd_deptoutlist.getBindCellIndex("body", "deliveqty"));
- grd_deptoutlist.showEditor(true);
- }
- }
- function fGetGoodDetail()
- {
- for(var k = 0; k < ds_popgood_goodlist.rowcount; k++)
- {
- var bDup = false;
- 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_deptoutinfo_deptoutlist.getColumn(ds_main_deptoutinfo_deptoutlist.rowcount-1, "goodcd")))
- {
- btn_rowinsert_onclick();
- }
- ds_main_deptoutinfo_deptoutlist.setColumn(ds_main_deptoutinfo_deptoutlist.rowcount-1, "goodcd", ds_main_good_gooddetail.getColumn(0, "goodcd"));
- ds_main_deptoutinfo_deptoutlist.setColumn(ds_main_deptoutinfo_deptoutlist.rowcount-1, "goodnm", ds_main_good_gooddetail.getColumn(0, "goodnm"));
- ds_main_deptoutinfo_deptoutlist.setColumn(ds_main_deptoutinfo_deptoutlist.rowcount-1, "goodspec", ds_main_good_gooddetail.getColumn(0, "goodspec"));
- ds_main_deptoutinfo_deptoutlist.setColumn(ds_main_deptoutinfo_deptoutlist.rowcount-1, "deliveunit", ds_main_good_gooddetail.getColumn(0, "deliveunit"));
- ds_main_deptoutinfo_deptoutlist.setColumn(ds_main_deptoutinfo_deptoutlist.rowcount-1, "wareflag", ds_main_good_gooddetail.getColumn(0, "wareflag"));
- ds_main_deptoutinfo_deptoutlist.setColumn(ds_main_deptoutinfo_deptoutlist.rowcount-1, "deliveqty", "0");
- }
- }
- function ds_main_deptoutinfo_deptoutlist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if( e.columnid == "deliveqty")
- {
- if(utlf_isNull(obj.getColumn(e.row, "deliveqty")) || obj.getColumn(e.row, "deliveqty") == "." || obj.getColumn(e.row, "deliveqty") == "-" || obj.getColumn(e.row, "deliveqty") == "-.")
- {
- obj.setColumn(e.row, "deliveqty", "0");
- }
- else
- {
- var sBef = obj.getColumn(e.row, "deliveqty");
- var iIndex = sBef.indexOf(".");
- if (iIndex >= 0 )
- {
- var sAft = sBef.substr(0, iIndex + 3);
- obj.setColumn(e.row, "deliveqty", sAft);
- }
- }
-
- var hun_jaego = obj.getColumn(e.row, "hun_jaego");
- if(utlf_isNull(hun_jaego))
- {
- return;
- }
- var deliveqty = obj.getColumn(e.row, "deliveqty");
- var realjaego = parseFloat(hun_jaego) - parseFloat(deliveqty);
-
- obj.setColumn(e.row, "realjaego", realjaego);
- }
- else if(e.columnid == "realjaego")
- {
- var hun_jaego = obj.getColumn(e.row, "hun_jaego");
- if(utlf_isNull(hun_jaego))
- {
- return;
- }
- var realjaego = obj.getColumn(e.row, "realjaego");
- var deliveqty_bf = obj.getColumn(e.row, "deliveqty");
-
- if(utlf_isNull(deliveqty_bf))
- {
- deliveqty_bf = 0;
- }
- if(utlf_isNull(realjaego))
- {
- realjaego = 0;
- }
-
- if(obj.getRowType(e.row) == "2")
- {
- var deliveqty = parseFloat(hun_jaego) - parseFloat(realjaego);
- }
- else
- {
- var deliveqty = parseFloat(hun_jaego) - parseFloat(realjaego) + parseFloat(deliveqty_bf);
- }
-
- obj.setColumn(e.row, "deliveqty", deliveqty);
- }
- }
- function grd_deptoutlist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
- {
- // if(grd_deptoutlist.row == "0")
- // {
- // if(grd_deptoutlist.col == grd_deptoutlist.colRef("hun_jaego")){
- // for(var i = 1 ; i < grd_deptoutlist.rows ; i++){
- // grd_deptoutlist.valueMatrix(i, grd_deptoutlist.colRef("deliveqty")) = grd_deptoutlist.valueMatrix(i, grd_deptoutlist.colRef("hun_jaego"));
- // if(!(grd_deptoutlist.rowStatus(i) == 1 || grd_deptoutlist.rowStatus(i) == 3)){
- // grd_deptoutlist.rowStatus(i) = 2;
- // }
- // }
- // }
- // }
- }
- function grd_deptoutlist_onkeydown(obj:Grid, e:KeyEventInfo)
- {
- if(e.keycode == 13)
- {
- ds_main_deptoutinfo_deptoutlist.rowposition = ds_main_deptoutinfo_deptoutlist.rowposition+1
- }
- }
- function btn_chulpop_onclick(obj:Button, e:ClickEventInfo)
- {
- if(utlf_isNull(grp_search.ipt_reqdeptcd.value))
- {
- sysf_messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
- grp_search.ipt_reqdeptcd.setFocus();
- return;
- }
-
- ds_popdelive.setColumn(0, "instcd", grp_search.cmb_instcd.value);
- ds_popdelive.setColumn(0, "delivedd", grp_search.ipt_delivedd.value);
- ds_popdelive.setColumn(0, "delivedeptcd", grp_search.ipt_reqdeptcd.value);
- ds_popdelive.setColumn(0, "delivedeptnm", grp_search.opt_reqdeptnm.value);
- ds_popdelive.setColumn(0, "opener", "out");
-
- ds_popreq.setColumn(0, "count", "0");
-
- var objArg = new Object();
- objArg.arg_ds_popdelive = ds_popdelive;
-
- frmf_modal("SMRSO21050", "SMRSO21050", objArg, "", "", "", "", "", "", "", "", "", "M");
-
- var cnt = ds_popreq.getColumn(0, "count");
- var mrows = ds_main_deptoutinfo_deptoutlist.rowcount;
- var mcnt = parseInt(mrows)+parseInt(cnt);
- var j = 0;
-
- for(var i = mrows ; i < mcnt-1 ; i++)
- {
- ds_main_deptoutinfo_deptoutlist.addRow();
-
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodcd", ds_popsubdata_copylist.getColumn(j, "goodcd"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodnm", ds_popsubdata_copylist.getColumn(j, "goodnm"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "deliveunit", ds_popsubdata_copylist.getColumn(j, "deliveunit"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodspec", ds_popsubdata_copylist.getColumn(j, "goodspec"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "deliveqty", ds_popsubdata_copylist.getColumn(j, "deliveqty"));
- j++;
- }
- }
- function btn_prcpsum_onclick(obj:Button, e:ClickEventInfo)
- {
- if(utlf_isNull(grp_search.ipt_reqdeptcd.value))
- {
- sysf_messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
- grp_search.ipt_reqdeptcd.setFocus();
- return;
- }
- ds_popdelive.setColumn(0, "instcd", grp_search.cmb_instcd.value);
- ds_popdelive.setColumn(0, "delivedd", grp_search.ipt_delivedd.value);
- ds_popdelive.setColumn(0, "delivedeptcd", grp_search.ipt_reqdeptcd.value);
- ds_popdelive.setColumn(0, "delivedeptnm", grp_search.opt_reqdeptnm.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("SMRSO21460", "SMRSO21460", objArg, "", "", "", "", "", "", "", "", "", "M");
-
- var cnt = ds_popreq.getColumn(0, "count");
- var mrows = ds_main_deptoutinfo_deptoutlist.rowcount;
- var mcnt = parseInt(mrows)+parseInt(cnt);
- var j = 0;
-
- for(var i = mrows ; i < mcnt-1 ; i++)
- {
- ds_main_deptoutinfo_deptoutlist.addRow();
-
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodcd", ds_popsubdata_prcpsum.getColumn(j, "goodcd"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodnm", ds_popsubdata_prcpsum.getColumn(j, "goodnm"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "deliveunit", ds_popsubdata_prcpsum.getColumn(j, "deliveunit"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodspec", ds_popsubdata_prcpsum.getColumn(j, "goodspec"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "hun_jaego", ds_popsubdata_prcpsum.getColumn(j, "deliveqty"));
- j++;
- }
- }
- function button2_onclick(obj:Button, e:ClickEventInfo)
- {
- var req = sysf_messageBox("출고내역이 전체삭제됩니다.", "Q003");
- if(req == 6)
- {
- if(ds_main_deptoutinfo_deptoutlist.rowcount == 0)
- {
- return;
- }
-
- ds_main_deptoutinfo_deptoutlist.updatecontrol = false;
- for(var i = 0; i < ds_main_deptoutinfo_deptoutlist.rowcount; i++)
- {
- ds_main_deptoutinfo_deptoutlist.setRowType(i, "d");
- }
- ds_main_deptoutinfo_deptoutlist.updatecontrol = true;
-
- btn_save_onclick();
- }
- else
- {
- return;
- }
- }
- function btn_jaego_onclick(obj:Button, e:ClickEventInfo)
- {
- if(utlf_isNull(grp_search.ipt_reqdeptcd.value))
- {
- sysf_messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
- grp_search.ipt_reqdeptcd.setFocus();
- return;
- }
-
- ds_popdelive.setColumn(0, "instcd", grp_search.cmb_instcd.value);
- ds_popdelive.setColumn(0, "delivedd", grp_search.ipt_delivedd.value);
- ds_popdelive.setColumn(0, "delivedeptcd", grp_search.ipt_reqdeptcd.value);
- ds_popdelive.setColumn(0, "delivedeptnm", grp_search.opt_reqdeptnm.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_deptoutinfo_deptoutlist.rowcount;
- var mcnt = parseInt(mrows)+parseInt(cnt);
- var j = 0;
-
- for(var i = mrows ; i < mcnt-1 ; i++)
- {
- ds_main_deptoutinfo_deptoutlist.addRow();
-
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodcd", ds_popsubdata_stocklist.getColumn(j, "goodcd"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodnm", ds_popsubdata_stocklist.getColumn(j, "goodnm"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "deliveunit", ds_popsubdata_stocklist.getColumn(j, "purcunit"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodspec", ds_popsubdata_stocklist.getColumn(j, "goodspec"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "wareflag", ds_popsubdata_stocklist.getColumn(j, "wareflag"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "hun_jaego", ds_popsubdata_stocklist.getColumn(j, "hun_jaego"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "winkind", ds_popsubdata_stocklist.getColumn(j, "winkind"));
-
- j++;
- }
-
- grd_deptoutlist.setCellProperty("Body", grd_deptoutlist.getBindCellIndex("Body", "winkind"), "edittype", "none");
- }
- function btn_deptwin_onclick(obj:Button, e:ClickEventInfo)
- {
- if(utlf_isNull(grp_search.ipt_reqdeptcd.value))
- {
- sysf_messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
- grp_search.ipt_reqdeptcd.setFocus();
- return;
- }
-
- ds_popdelive.setColumn(0, "instcd", grp_search.cmb_instcd.value);
- ds_popdelive.setColumn(0, "delivedd", grp_search.ipt_delivedd.value);
- ds_popdelive.setColumn(0, "delivedeptcd", grp_search.ipt_reqdeptcd.value);
- ds_popdelive.setColumn(0, "delivedeptnm", grp_search.opt_reqdeptnm.value);
- ds_popdelive.setColumn(0, "opener", "out");
-
- ds_popreq.setColumn(0, "count", "0");
-
- var objArg = new Object();
- objArg.arg_ds_popdata = ds_popdelive;
-
- frmf_modal("SMRSO21470", "SMRSO21470", objArg, "", "", "", "", "", "", "", "", "", "M");
-
- var cnt = ds_popreq.getColumn(0, "count");
- var mrows = ds_main_deptoutinfo_deptoutlist.rowcount;
- var mcnt = parseInt(mrows)+parseInt(cnt);
- var j = 0;
-
- for(var i = mrows ; i < mcnt-1 ; i++)
- {
- ds_main_deptoutinfo_deptoutlist.addRow();
-
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodcd", ds_popsubdata_copylist.getColumn(j, "goodcd"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodnm", ds_popsubdata_copylist.getColumn(j, "goodnm"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "deliveunit", ds_popsubdata_copylist.getColumn(j, "deliveunit"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodspec", ds_popsubdata_copylist.getColumn(j, "goodspec"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "wareflag", ds_popsubdata_copylist.getColumn(j, "wareflag"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "deliveqty", ds_popsubdata_copylist.getColumn(j, "deliveqty"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "realjaego", ds_popsubdata_copylist.getColumn(j, "deliveqty"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "flag", ds_popsubdata_copylist.getColumn(j, "flag"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "winkind", ds_popsubdata_copylist.getColumn(j, "winkind"));
- ds_main_deptoutinfo_deptoutlist.setColumn(i, "windd", ds_popsubdata_copylist.getColumn(j, "windd"));
-
- j++;
- }
-
- grd_deptoutlist.setCellProperty("Body", grd_deptoutlist.getBindCellIndex("Body", "winkind"), "edittype", "none");
- }
- function btn_rowinsert_onclick(obj:Button, e:ClickEventInfo)
- {
- if(utlf_isNull(grp_search.ipt_reqdeptcd.value))
- {
- sysf_messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
- grp_search.ipt_reqdeptcd.setFocus();
- return;
- }
-
- if(utlf_isNull(grp_search.ipt_delivedeptcd.value))
- {
- sysf_messageBox("입고부서가 선택되지 않았습니다. \n\n먼저 입고부서를 선택하십시요.", "E999", "");
- grp_search.ipt_delivedeptcd.setFocus();
- return;
- }
-
- ds_main_deptoutinfo_deptoutlist.addRow();
- grd_deptoutlist.setCellProperty("Body", grd_deptoutlist.getBindCellIndex("Body", "winkind"), "edittype", "none");
- }
- function btn_choidel_onclick(obj:Button, e:ClickEventInfo)
- {
- if(ds_main_deptoutinfo_deptoutlist.getRowType(ds_main_deptoutinfo_deptoutlist.rowposition) == "2")
- {
- ds_main_deptoutinfo_deptoutlist.deleteRow(ds_main_deptoutinfo_deptoutlist.rowposition);
- }
- else
- {
- ds_main_deptoutinfo_deptoutlist.updatecontrol = false;
- ds_main_deptoutinfo_deptoutlist.setRowType(ds_main_deptoutinfo_deptoutlist.rowposition, "d");
- ds_main_deptoutinfo_deptoutlist.updatecontrol = true;
- }
- }
- function btn_help_onclick(obj:Button, e:ClickEventInfo)
- {
- frmf_modal("SMRSO21401", "SMRSO21401", "", "", "", "", "", "", "", "", "", "", "M");
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- if(ds_main_deptoutinfo_deptoutlist.rowcount != 0)
- {
- var instcd = ds_main_deptoutinfo_deptoutlist.getColumn(0, "instcd");
- var dd = ds_main_deptoutinfo_deptoutlist.getColumn(0, "delivedd");
- var deptcd = ds_main_deptoutinfo_deptoutlist.getColumn(0, "delivedeptcd");
-
- if(utlf_isNull(instcd))
- {
- ds_magamsearch.setColumn(0, "instcd", ds_cond.getColumn(0, "instcd"));
- ds_magamsearch.setColumn(0, "dd", ds_cond.getColumn(0, "delivedd"));
- ds_magamsearch.setColumn(0, "deptcd", ds_cond.getColumn(0, "delivedeptcd"));
- }
- else
- {
- ds_magamsearch.setColumn(0, "instcd", instcd);
- ds_magamsearch.setColumn(0, "dd", dd);
- ds_magamsearch.setColumn(0, "deptcd", deptcd);
- }
-
- 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;
- }
- for(var j = ds_main_deptoutinfo_deptoutlist.rowcount; j > 0 ; j-- )
- {
- var deliveqty = ds_main_deptoutinfo_deptoutlist.getColumn(j, "deliveqty");
- var realjaego = ds_main_deptoutinfo_deptoutlist.getColumn(j, "realjaego");
- var deliveno = ds_main_deptoutinfo_deptoutlist.getColumn(j, "deliveno");
-
- if((utlf_isNull(deliveqty) || deliveqty == 0) && utlf_isNull(deliveno))
- {
- ds_main_deptoutinfo_deptoutlist.deleteRow(j);
- }
- else if(utlf_isNull(realjaego) && utlf_isNull(deliveno))
- {
- ds_main_deptoutinfo_deptoutlist.deleteRow(j);
- }
- }
-
- if(utlf_isNull(grp_search.cmb_outkind.value))
- {
- grp_search.cmb_outkind.value = "01";
- }
-
- if(grp_search.cmb_outkind.value == "10")
- {
- for(var j = ds_main_deptoutinfo_deptoutlist.rowcount; j > 0 ; j-- )
- {
- var reason = ds_main_deptoutinfo_deptoutlist.getColumn(j, "reason");
- var deliveno = ds_main_deptoutinfo_deptoutlist.getColumn(j, "deliveno");
-
- if(utlf_isNull(reason) && utlf_isNull(deliveno))
- {
- ds_main_deptoutinfo_deptoutlist.deleteRow(j);
- }
- }
- }
-
- for(var k = 0; k < ds_main_deptoutinfo_deptoutlist.rowcount; k++ )
- {
- ds_main_deptoutinfo_deptoutlist.setColumn(k, "instcd", ds_cond.getColumn(0, "instcd"));
- ds_main_deptoutinfo_deptoutlist.setColumn(k, "delivedd", ds_cond.getColumn(0, "delivedd"));
- ds_main_deptoutinfo_deptoutlist.setColumn(k, "outkind", ds_cond.getColumn(0, "outkind"));
- ds_main_deptoutinfo_deptoutlist.setColumn(k, "reqdeptcd", ds_cond.getColumn(0, "reqdeptcd"));
- ds_main_deptoutinfo_deptoutlist.setColumn(k, "delivedeptcd", ds_cond.getColumn(0, "delivedeptcd"));
-
- if(utlf_isNull(ds_main_deptoutinfo_deptoutlist.getColumn(k, "goocd")) && utlf_isNull(ds_main_deptoutinfo_deptoutlist.getColumn(0, "goodnm")) && utlf_isNull(ds_main_deptoutinfo_deptoutlist.getColumn(0, "deliveqty")))
- {
- ds_main_deptoutinfo_deptoutlist.deleteRow(k);
- k--;
- }
- }
- for(var k = 0; k < ds_main_deptoutinfo_deptoutlist.rowcount; k++)
- {
- if(utlf_isNull(ds_main_deptoutinfo_deptoutlist.getColumn(k, "goocd")) && utlf_isNull(ds_main_deptoutinfo_deptoutlist.getColumn(0, "goodnm")) && utlf_isNull(ds_main_deptoutinfo_deptoutlist.getColumn(0, "deliveqty")))
- {
- sysf_messageBox("내역이 정상적으로 입력되지 않았습니다. \n\n입력한 값을 확인하십시요. ", "E999", "");
- grd_deptoutlist.setFocus();
-
- ds_main_deptoutinfo_deptoutlist.rowposition = k;
- return;
- }
- }
-
- var minuscnt = 0;
-
- if(grp_search.cmb_outkind.value != "10")
- {
- ds_main_deptoutinfo_deptoutlist.updatecontrol = false;
- for(var i = 0 ; i < ds_main_deptoutinfo_deptoutlist.rowcount; i++)
- {
- var deliveqty = ds_main_deptoutinfo_deptoutlist.getColumn(i, "deliveqty");
- var deliveno = ds_main_deptoutinfo_deptoutlist.getColumn(i, "deliveno");
- if(parseFloat(deliveqty) < 0 && utlf_isNul(deliveno))
- {
- ds_main_deptoutinfo_deptoutlist.setRowType(i, "");
-
- minuscnt++;
- }
- }
- ds_main_deptoutinfo_deptoutlist.updatecontrol = true;
- }
-
- if(minuscnt == 0)
- {
- var oParam = {};
- oParam.id = "TXRSO21401";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqExeDeptOutList";
- oParam.inds = "deptoutlist=ds_main_deptoutinfo_deptoutlist:u";
- oParam.outds = "";
- oParam.async = false;
- oParam.callback = "cf_TXRSO21401";
- tranf_submit(oParam);
- }
- else
- {
- var oParam = {};
- oParam.id = "TXRSO21401";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqExeDeptOutList";
- oParam.inds = "deptoutlist=ds_main_deptoutinfo_deptoutlist:u";
- oParam.outds = "";
- oParam.async = false;
- oParam.callback = "cf_TXRSO21401_1";
- tranf_submit(oParam);
-
- grp_search.cmb_outkind.value = "10";
- grd_deptoutlist.setCellProperty("Body", grd_deptoutlist.getBindCellIndex("Body", "reason"), "size", 235)
-
- sysf_messageBox("출고수량이 (-)인 물품들은 출고유형을 보정으로 저장하시기 바랍니다.", "I999", "");
- }
- }
- 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", "");
- return;
- }
- else
- {
- cap_magam.text = "";
- }
- }
- }
- function cf_TXRSO21401(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- grp_search.btn_search.click();
- }
- }
- function cf_TXRSO21401_1(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- ds_main_deptoutinfo_deptoutlist.updatecontrol = false;
- for(var i = ds_main_deptoutinfo_deptoutlist.rowcount; i > 0 ; i-- )
- {
- var rowStatus = ds_main_deptoutinfo_deptoutlist.getRowType(i);
- var deliveno = ds_main_deptoutinfo_deptoutlist.getColumn(i, "deliveno");
- var realjaego = ds_main_deptoutinfo_deptoutlist.getColumn(i, "realjaego");
-
- if(rowStatus == 0 && !utlf_isNull(realjaego))
- {
- if(utlf_isNull(deliveno))
- {
- ds_main_deptoutinfo_deptoutlist.setRowType(i, "");
- }
- else
- {
- ds_main_deptoutinfo_deptoutlist.setRowType(i, "u");
- }
- }
- else
- {
- if(utlf_isNull(deliveno))
- {
- ds_main_deptoutinfo_deptoutlist.deleteRow(i);
- }
- }
- }
- ds_main_deptoutinfo_deptoutlist.updatecontrol = true;
- }
- }]]></Script>
- </Form>
- </FDL>
|