123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRSD00600" position="absolute 0 0 1197 777" titletext="부서별 기준량 등록" oninit="SMRSD00600_oninit" onload="SMRSD00600_onload">
- <Layouts>
- <Layout>
- <Div position="absolute 0 10 1195 775" id="grp_biz" scrollbars="autoboth" anchor="all">
- <Layouts>
- <Layout>
- <Div position="absolute 0 15 1195 75" align="align:center top;" id="grp_sea" anchor="left top right" class="div_SA">
- <Layouts>
- <Layout>
- <Static text="기관코드 :" position="absolute 15 10 104 27" id="caption2" class="search_name" anchor="default"/>
- <Static text="부 서 :" position="absolute 605 33 691 50" id="caption3" class="search_name" anchor="default"/>
- <Button position="absolute 1125 20 1181 42" id="btn_search" class="btn1" text="조회" anchor="top right" onclick="grp_biz_grp_sea_btn_search_onclick"/>
- <Combo position="absolute 440 10 550 29" align="align:center middle;" id="cmb_goodflag" class="combo_essential" innerdataset="@ds_init_goodflag" datacolumn="label" codecolumn="value" anchor="default" onitemchanged="grp_biz_grp_sea_cmb_goodflag_onitemchanged"/>
- <Edit position="absolute 690 33 810 52" align="align:center middle;" id="ipt_reqdeptcd" class="input_essential" anchor="default" ontextchanged="grp_biz_grp_sea_ipt_reqdeptcd_ontextchanged" style="align:center middle;"/>
- <Button position="absolute 815 33 831 49" id="btn_reqdeptcd" class="icon_search" text="" anchor="default" onclick="grp_biz_grp_sea_btn_reqdeptcd_onclick"/>
- <Edit position="absolute 835 33 1000 52" align="align:center middle;" id="ipt_reqdeptnm" class="input_fix" anchor="default" ontextchanged="grp_biz_grp_sea_ipt_reqdeptnm_ontextchanged" style="align:center middle;"/>
- <Static text="물품구분 :" position="absolute 355 10 449 27" id="caption7" class="search_name" anchor="default"/>
- <Shape position="absolute 1107 12 1113 51" linetype="vertical" id="line3" class="line_4" anchor="top right"/>
- <Edit readonly="true" position="absolute 274 10 304 29" id="opt_instcd" visible="false" anchor="default" class="output"/>
- <Edit readonly="true" position="absolute 100 10 265 29" align="align:center middle;" id="opt_instcdnm" class="output" anchor="default"/>
- <Combo position="absolute 690 10 810 29" align="align:center middle;" id="cmb_reqmthd" class="combo_essential" innerdataset="@ds_init_reqmthd" datacolumn="label" codecolumn="value" anchor="default" onitemchanged="grp_biz_grp_sea_cmb_reqmthd_onitemchanged"/>
- <Static text="청구방법 :" position="absolute 605 10 699 27" id="caption1" class="search_name" anchor="default"/>
- <Combo position="absolute 440 33 550 52" align="align:center middle;" id="cmb_purcflag" class="combo_default" innerdataset="@ds_init_purcflag" datacolumn="label" codecolumn="value" anchor="default" onitemchanged="grp_biz_grp_sea_cmb_purcflag_onitemchanged"/>
- <Static text="구매구분 :" position="absolute 355 33 441 50" id="caption18" class="search_name" anchor="default"/>
- </Layout>
- </Layouts>
- </Div>
- <Shape position="absolute 0 99 1195 105" linetype="horizontal" id="line1" class="line_10" anchor="left top right"/>
- <Static position="absolute 1 83 191 100" id="cap_titlist" class="tit_2" anchor="default"/>
- <Button position="absolute 1020 77 1073 99" id="btn_grdadd" class="btn2" text="행추가" anchor="top right" onclick="grp_biz_btn_grdadd_onclick"/>
- <Button position="absolute 1075 77 1128 99" id="btn_grddel" class="btn2" text="행삭제" anchor="top right" onclick="grp_biz_btn_grddel_onclick"/>
- <Grid position="absolute 0 104 1195 765" id="grd_goodbaseqtylist" binddataset="ds_main_goodbaseqtylist" anchor="all" onexpanddown="grp_biz_grd_goodbaseqtylist_onexpanddown" autoenter="select">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="24"/>
- <Column size="40"/>
- <Column size="96"/>
- <Column size="29"/>
- <Column size="231"/>
- <Column size="163"/>
- <Column size="127"/>
- <Column size="73"/>
- <Column size="66"/>
- <Column size="63"/>
- <Column size="63"/>
- <Column size="70"/>
- <Column size="70"/>
- <Column size="171"/>
- <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="No"/>
- <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="reqmthd"/>
- <Cell col="15" text="tmpreqflag"/>
- <Cell col="16"/>
- <Cell col="17"/>
- <Cell col="18"/>
- <Cell col="19"/>
- <Cell col="20"/>
- <Cell col="21"/>
- <Cell col="22"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" text="bind:rnum"/>
- <Cell col="2" displaytype="text" edittype="text" class="input_essential" text="bind:goodcd" expandshow="show"/>
- <Cell col="3" text="bind:allsizespecid"/>
- <Cell col="4" text="bind:goodnm" enable="false"/>
- <Cell col="5" displaytype="text" edittype="text" text="bind:goodspec" expandshow="show"/>
- <Cell col="6" text="bind:goodmodel" enable="false"/>
- <Cell col="7" text="bind:prodcmpynm" enable="false"/>
- <Cell col="8" text="bind:purcunit" enable="false"/>
- <Cell col="9" displaytype="number" text="bind:exchqty" enable="false"/>
- <Cell col="10" text="bind:deliveunit" enable="false"/>
- <Cell col="11" displaytype="number" edittype="expr:basevoledit" style="background:#ccffccff;background2:#ccffccff;" class="input_essential" text="bind:basevol"/>
- <Cell col="12" displaytype="number" edittype="expr:prepargodqtyedit" style="background:#ffcc99ff;background2:#ffcc99ff;" class="input_essential" text="bind:prepargodqty"/>
- <Cell col="13" displaytype="text" edittype="text" text="bind:cmt"/>
- <Cell col="14" text="bind:reqmthd"/>
- <Cell col="15" text="bind:tmpreqflag"/>
- <Cell col="16" text="bind:ddavguseqty"/>
- <Cell col="17" text="bind:instcd"/>
- <Cell col="18" text="bind:goodflag"/>
- <Cell col="19" text="bind:reqdeptcd"/>
- <Cell col="20" text="bind:lrgcd"/>
- <Cell col="21" text="bind:allsizeyn"/>
- <Cell col="22" text="bind:oallsizespecid"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static position="absolute 779 84 819 97" id="caption4" anchor="top right" style="background:#ccffccff;"/>
- <Static position="absolute 904 84 944 97" id="caption5" anchor="top right" style="background:#ffcc99ff;"/>
- <Static text="안전재고량" position="absolute 824 84 894 97" id="caption8" anchor="top right"/>
- <Static text="상비품량" position="absolute 949 84 1004 97" id="caption9" anchor="top right"/>
- <Div position="absolute 205 140 569 440" id="grp_allsize" visible="false" anchor="default">
- <Layouts>
- <Layout>
- <Shape position="absolute 0 0 362 300" id="rectangle1" type="rectangle" anchor="default"/>
- <Grid position="absolute 2 40 359 297" id="grd_codelist" class="grd_prodcmpylist" binddataset="ds_main_codelist" anchor="default">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="30"/>
- <Column size="40"/>
- <Column size="140"/>
- <Column size="76"/>
- <Column size="51"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="C"/>
- <Cell col="1" text="ID"/>
- <Cell col="2" text="명칭"/>
- <Cell col="3" text="모델"/>
- <Cell col="4" text="수량"/>
- </Band>
- <Band id="body">
- <Cell text="bind:chk" edittype="checkbox" displaytype="checkbox"/>
- <Cell col="1" text="bind:allsizespecid"/>
- <Cell col="2" text="bind:goodspec"/>
- <Cell col="3" text="bind:goodmodel"/>
- <Cell col="4" text="bind:qty" edittype="text" displaytype="text"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button position="absolute 303 10 359 32" id="btn_confirm" class="btn4" text="확인" anchor="default" onclick="grp_biz_grp_allsize_btn_confirm_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Button position="absolute 1139 77 1195 99" id="btn_save" class="btn3" text="저장" anchor="top right" onclick="grp_biz_btn_save_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Static id="caption6" text="부서별 기준량 등록" class="tit_1" position="absolute 0 0 186 25"/>
- <Button position="absolute 1127 2 1195 24" id="btn_clear" class="btn4" text="초기화" onclick="btn_clear_onclick" anchor="top right"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_send_retvcond" 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="goodflag" type="STRING" size="256"/>
- <Column id="reqdeptcd" type="STRING" size="256"/>
- <Column id="reqdeptnm" type="STRING" size="256"/>
- <Column id="instcdnm" type="STRING" size="256"/>
- <Column id="reqmthd" type="STRING" size="256"/>
- <Column id="purcflag" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="goodflag"/>
- <Col id="reqdeptcd"/>
- <Col id="reqdeptnm"/>
- <Col id="instcdnm"/>
- <Col id="reqmthd"/>
- <Col id="purcflag"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_goodflag" 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">Y</Col>
- </Row>
- <Row>
- <Col id="label">일반소모품</Col>
- <Col id="value">Z</Col>
- </Row>
- <Row>
- <Col id="label">의료비품</Col>
- <Col id="value">U</Col>
- </Row>
- <Row>
- <Col id="label">약품</Col>
- <Col id="value">P</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_purcflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init_reqmthd" 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"/>
- </Row>
- <Row>
- <Col id="label">처방집계</Col>
- <Col id="value">1</Col>
- </Row>
- <Row>
- <Col id="label">일반청구</Col>
- <Col id="value">3</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_goodbaseqtylist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_goodbaseqtylist_oncolumnchanged">
- <ColumnInfo>
- <Column id="rnum" type="STRING" size="256" sumtext="순번 "/>
- <Column id="instcd" type="STRING" size="256" sumtext="기관코드 "/>
- <Column id="lrgcd" type="STRING" size="256" sumtext="대분류코드 "/>
- <Column id="mdlcd" type="STRING" size="256" sumtext="중분류코드 "/>
- <Column id="smlcd" type="STRING" size="256" sumtext="소분류코드 "/>
- <Column id="reqmthdnm" type="STRING" size="256" sumtext="청구기준 "/>
- <Column id="goodflag" type="STRING" size="256" sumtext="물품구분 "/>
- <Column id="goodflagnm" type="STRING" size="256" sumtext="물품구분명 "/>
- <Column id="reqdeptcd" type="STRING" size="256" sumtext="부서 "/>
- <Column id="lrgnm" type="STRING" size="256" sumtext="대분류 "/>
- <Column id="mdlnm" type="STRING" size="256" sumtext="중분류 "/>
- <Column id="smlnm" type="STRING" size="256" sumtext="소분류 "/>
- <Column id="goodcd" type="STRING" size="256" sumtext="물품코드 "/>
- <Column id="allsizespecid" type="STRING" size="256" sumtext="All Size "/>
- <Column id="goodnm" type="STRING" size="256" sumtext="물품명 "/>
- <Column id="goodspec" type="STRING" size="256" sumtext="규격 "/>
- <Column id="goodmodel" type="STRING" size="256" sumtext="모델 "/>
- <Column id="prodcmpynm" type="STRING" size="256" sumtext="제조회사 "/>
- <Column id="purcunit" type="STRING" size="256" sumtext="포장단위 "/>
- <Column id="deliveunit" type="STRING" size="256" sumtext="청구단위 "/>
- <Column id="exchqty" type="STRING" size="256" sumtext="환상수량 "/>
- <Column id="ddavguseqty" type="STRING" size="256" sumtext="일평균수량 "/>
- <Column id="basevol" type="STRING" size="256" sumtext="기준량 "/>
- <Column id="basevolamt" type="STRING" size="256" sumtext="기준량금액 "/>
- <Column id="purcunit" type="STRING" size="256" sumtext="포장단위 "/>
- <Column id="stocqty" type="STRING" size="256" sumtext="Online 재고량 "/>
- <Column id="cmt" type="STRING" size="256" sumtext="비고 "/>
- <Column id="reqmthd" type="STRING" size="256" sumtext="청구구분 "/>
- <Column id="tmpreqflag" type="STRING" size="256" sumtext="임의청구구분 "/>
- <Column id="reqpackconcat" type="STRING" size="256" sumtext="reqpackconcat "/>
- <Column id="allsizeyn" type="STRING" size="256" sumtext="allsizeyn "/>
- <Column id="oallsizespecid" type="STRING" size="256" sumtext="All Size "/>
- <Column id="prepargodqty" type="STRING" size="256" sumtext="부서상비품량 "/>
- <Column id="qnspflag" type="STRING" size="256" sumtext="정량보충구분 "/>
- <Column id="reqflag" type="STRING" size="256" sumtext="청구구분 "/>
- <Column id="reqflagnm" type="STRING" size="256" sumtext="청구구분 "/>
- <Column id="reqprid" type="STRING" size="256" sumtext="청구주기 "/>
- <Column id="reqpridnm" type="STRING" size="256" sumtext="청구주기명 "/>
- <Column id="select" type="STRING" size="256" sumtext="Check "/>
- <Column id="userqty" type="STRING" size="256" sumtext="수량 "/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_main_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_save" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_copynode_goodbaseqtylist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_send_allsize" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="goodcd" type="STRING" size="256"/>
- <Column id="instcd" type="STRING" size="256"/>
- <Column id="goodspec" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="goodcd"/>
- <Col id="instcd"/>
- <Col id="goodspec"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_main_goodlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_biz.grp_sea.opt_instcdnm" propid="value" datasetid="ds_send_retvcond" columnid="instcdnm"/>
- <BindItem id="item1" compid="grp_biz.grp_sea.opt_instcd" propid="value" datasetid="ds_send_retvcond" columnid="instcd"/>
- <BindItem id="item2" compid="grp_biz.grp_sea.cmb_goodflag" propid="value" datasetid="ds_send_retvcond" columnid="goodflag"/>
- <BindItem id="item3" compid="grp_biz.grp_sea.cmb_purcflag" propid="value" datasetid="ds_send_retvcond" columnid="purcflag"/>
- <BindItem id="item4" compid="grp_biz.grp_sea.cmb_reqmthd" propid="value" datasetid="ds_send_retvcond" columnid="reqmthd"/>
- <BindItem id="item5" compid="grp_biz.grp_sea.ipt_reqdeptcd" propid="value" datasetid="ds_send_retvcond" columnid="reqdeptcd"/>
- <BindItem id="item6" compid="grp_biz.grp_sea.ipt_reqdeptnm" propid="value" datasetid="ds_send_retvcond" columnid="reqdeptnm"/>
- </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::misMemo.xjs";
- include "mis_miscommonxp::RSZ001.xjs";
- include "mis_humtrafactmngtxp::RPB001.xjs";
- include "mis_educationmngtxp::RPS001.xjs";
- var arErrorCode = new HashArray();
- function SMRSD00600_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj); //폼 초기화
- grdf_initGrid(grp_biz.grd_goodbaseqtylist);
- grdf_initGrid(grp_biz.grp_allsize.grd_codelist);
- }
- function SMRSD00600_onload(obj:Form, e:LoadEventInfo)
- {
- fInitialize();
- misfGridInit(grp_biz.grd_goodbaseqtylist);
- misfMsterDetailSet("grp_biz.grd_goodbaseqtylist",null,"TRRSD00102","Y");
-
- //화면 권한 설정
- grp_biz.btn_save.enable = (frmf_checkAuth("X"));
- }
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- function fInitialize() {
- // misfComboComCdListMulti("R0111", "cmb_purcflag"); //구매구분
- misfComboComCdList('R0111', grp_biz.grp_sea.cmb_purcflag, "Y"); //구매구분
-
- ds_main_goodbaseqtylist.clearData();
- ds_send_retvcond.clearData();
- ds_send_retvcond.addRow();
-
- grp_biz.grp_sea.opt_instcd.value = sysf_getUserInfo("dutplceinstcd");
- grp_biz.grp_sea.opt_instcdnm.value = sysf_getUserInfo("dutplceinstnm");
-
- grp_biz.grp_sea.ipt_reqdeptcd.value = sysf_getUserInfo("dutplcecd");
- grp_biz.grp_sea.ipt_reqdeptnm.value = sysf_getUserInfo("dutplcenm");
-
- grp_biz.grp_sea.cmb_goodflag.index = 0;//물품구분
- grp_biz.grp_sea.cmb_reqmthd.index = 0;//청구방법
- grp_biz.grp_sea.cmb_purcflag.value = 0;
- }
- function grp_biz_grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- var updtdata = grdf_getGridUpdateData(grp_biz.grd_goodbaseqtylist);
- if ( !utlf_isNull(updtdata) && updtdata.rowcount > 1) {
- var ret = sysf_messageBox("그리드에 작업 중인 내용이 있습니다. 조회 작업을","Q003");
- if (ret != 6) { // not OK
- return;
- }
- }
-
- if(fCheckKey())
- {
- return;
- }
-
- misfMsterDetailRetrieve();
- ds_main_goodbaseqtylist.enableevent = false;
- ds_main_goodbaseqtylist.updatecontrol = false;
- ds_main_goodbaseqtylist.addColumn("basevoledit", "string");
- ds_main_goodbaseqtylist.addColumn("prepargodqtyedit", "string");
- // 2009.11.09 수정 처방집계일때 상비품량, 일반청구일때 안전재고량만 입력가능
- for(var k =0; k < ds_main_goodbaseqtylist.rowcount; k++){
- var Reqmthd = ds_main_goodbaseqtylist.getColumn(k, "reqmthd");
- var Tmpreqflag = ds_main_goodbaseqtylist.getColumn(k, "tmpreqflag");
- if(Reqmthd=="1"){ //처방집계
- ds_main_goodbaseqtylist.setColumn(k, "basevoledit", "none");
- ds_main_goodbaseqtylist.setColumn(k, "prepargodqtyedit", "text");
- }else if(Reqmthd=="3"){//일반청구
- ds_main_goodbaseqtylist.setColumn(k, "basevoledit", "text");
- ds_main_goodbaseqtylist.setColumn(k, "prepargodqtyedit", "none");
- }
- }
- ds_main_goodbaseqtylist.updatecontrol = true;
- ds_main_goodbaseqtylist.enableevent = true;
- }
- function fCheckKey()
- {
- var bool = false;
- //기관코드 및 물품청구 구분값 체크
- if( utlf_isNull(grp_biz.grp_sea.opt_instcd.value)) {
- sysf_messageBox("기관코드를","C002");
- bool = true;
- } else if(utlf_isNull(grp_biz.grp_sea.cmb_goodflag.value)) {
- sysf_messageBox("물품청구 구분","C002");
- bool = true;
- } else if(utlf_isNull(grp_biz.grp_sea.ipt_reqdeptcd.value)) {
- sysf_messageBox("부서 코드를","C002");
- bool = true;
- }
- return bool
- }
- function grp_biz_grp_sea_cmb_goodflag_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- grp_biz_grp_sea_btn_search_onclick();
- }
- function grp_biz_grp_sea_cmb_purcflag_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- grp_biz_grp_sea_btn_search_onclick();
- }
- function grp_biz_grp_sea_cmb_reqmthd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- fGridChange(e.postvalue);
- }
- function fGridChange ( pValue ) {
- if( pValue == "1" )// 처방 집계 물품 상비품량 항목 활성화 / 안전재고 항목 비활성화
- {
- grp_biz.cap_titlist.text = "부서 상비품 List";
- }
- else// 일반청구 물품.. 상비품량 항목 비활성화 / 안전재고 항목 활성화
- {
- grp_biz.cap_titlist.text = "부서 안전재고 List";
- }
- }
- function grp_biz_grp_sea_ipt_reqdeptcd_ontextchanged(obj:Edit, e:TextChangedEventInfo)
- {
- if(grp_biz.grp_sea.ipt_reqdeptcd.value.length == 0)
- grp_biz.grp_sea.ipt_reqdeptnm.value = "";
- else
- misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
- }
- function grp_biz_grp_sea_btn_reqdeptcd_onclick(obj:Button, e:ClickEventInfo)
- {
- var recv_list = "reqdeptcd,reqdeptnm";
- misfOpenPopUpList("02", grp_biz.grp_sea.ipt_reqdeptcd,"",recv_list);
- }
- function grp_biz_grp_sea_ipt_reqdeptnm_ontextchanged(obj:Edit, e:TextChangedEventInfo)
- {
- if(grp_biz.grp_sea.ipt_reqdeptnm.value.length == 0)
- grp_biz.grp_sea.ipt_reqdeptcd.value = "";
- else
- misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
- }
- function btn_clear_onclick(obj:Button, e:ClickEventInfo)
- {
- var updtdata = grdf_getGridUpdateData(grp_biz.grd_goodbaseqtylist);
-
- if (!utlf_isNull(updtdata) && updtdata.rowcount > 1) {
- var ret = sysf_messageBox("그리드에 작업 중인 내용이 있습니다. 초기화 작업을","Q003");
- if (ret != 6) { // not OK
- return;
- }
- }
- fInitialize();
- }
- function grp_biz_btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
- {
- if(fCheckKey())
- {
- return;
- }
-
- misfGridIUD(grp_biz.grd_goodbaseqtylist, "A");
- //행추가를 누를시 기간코드,청구구분,청구부서 값을 자동으로 Detail 그리드에 저장한다.
- ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowcount - 1, "rnum", ds_main_goodbaseqtylist.rowcount);
- ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowcount - 1, "instcd", grp_biz.grp_sea.opt_instcd.value);
- ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowcount - 1, "goodflag", grp_biz.grp_sea.cmb_goodflag.value);
- ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowcount - 1, "reqdeptcd", grp_biz.grp_sea.ipt_reqdeptcd.value);
- }
- function grp_biz_btn_grddel_onclick(obj:Button, e:ClickEventInfo)
- {
- misfGridIUD(grp_biz.grd_goodbaseqtylist,"D");
- }
- function grp_biz_btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- var updtdata = grdf_getGridUpdateData(grp_biz.grd_goodbaseqtylist);
-
- if (utlf_isNull(updtdata) || updtdata.rowcount == 0 ) {
- sysf_messageBox("변경된 데이터가","I004");
- return;
- }
-
- var sReqmThd = "";
- var null_chech1 = "";
- var null_chech2 = "";
-
- for (var i=0; i < ds_main_goodbaseqtylist.rowcount; i++)
- {
- sReqmThd = ds_main_goodbaseqtylist.getColumn(i, "reqmthd");
- null_check1 = ds_main_goodbaseqtylist.getColumn(i, "prepargodqty");
- null_check2 = ds_main_goodbaseqtylist.getColumn(i, "basevol" );
-
- if (sReqmThd=="1"){
- sReqmThd = "";
- } else if(sReqmThd=="3"){
- sReqmThd = "";
- } else {
- null_chech1 = "0";
- null_chech2 = "0";
- }
-
- if ((utlf_isNull(null_check2))&&(utlf_isNull(null_check1))) {
- sysf_messageBox(i+ "번째 기준량은","I003");
- return;
- }
- }
- call_TXRSD00101("TXRSD00101");
- }
- function call_TXRSD00101() {
- var updtdata = grdf_getGridUpdateData(grp_biz.grd_goodbaseqtylist);
- grdf_setStatusColumn(updtdata, "status");
-
- ds_save.copyData(updtdata);
- dsf_setDefaultVal(ds_save, "ddavguseqty:0,basevol:0,prepargodqty:0");
- var oParam = {};
- oParam.id = "TXRSD00101";
- oParam.service = "reqapp.ReqMngt";
- oParam.method = "reqExeSaveGoodBaseQty";
- oParam.inds = "req=ds_save";
- oParam.outds = "";
- oParam.async = false;
- tranf_submit(oParam);
- grp_biz_grp_sea_btn_search_onclick();
- }
- function grp_biz_grd_goodbaseqtylist_onexpanddown(obj:Grid, e:GridMouseEventInfo)
- {
- if (grp_biz.grd_goodbaseqtylist.currentcol == grp_biz.grd_goodbaseqtylist.getBindCellIndex("body", "goodcd") &&
- ds_main_goodbaseqtylist.getRowType(ds_main_goodbaseqtylist.rowposition) == "2" )
- {
- //구성물품코드를 눌렀을 경우
- var recv_list = "goodcd,goodnm,goodmodel,goodspec,prodcmpynm,purcunit,exchqty,deliveunit,basevol,ddavguseqty";
-
- ds_copynode_goodbaseqtylist.clearData();
- frmf_setParameter("SMRSD00400_", "");
-
- if ( ds_send_retvcond.getColumn(0, "reqmthd") == '3' ){ //청구방법이 일반청구이면 팝업에 인자값을 던지고(reqcheck)
- rszfOpenPopUpListByWndName(grp_biz.grd_goodbaseqtylist,"",recv_list,"SPRSD00190","instcd,goodflag,reqcheck","grp_biz.grp_sea.opt_instcd,grp_biz.grp_sea.cmb_goodflag,N", "Y");
- }
- else{ //청구방법이 처방집계이면 인자값없이 팝업을 호출
- rszfOpenPopUpListByWndName(grp_biz.grd_goodbaseqtylist,"",recv_list,"SPRSD00190","instcd,goodflag","grp_biz.grp_sea.opt_instcd,grp_biz.grp_sea.cmb_goodflag", "Y");
- }
-
- var cur_row = ds_main_goodbaseqtylist.rowposition;
- var status = ds_main_goodbaseqtylist.getColumn(cur_row, "m");
- var CSV = frmf_getParameter("SMRSD00400_");
- ds_copynode_goodbaseqtylist.copyData(CSV);
-
- fSettingGoodList("userqty");
- }
- if (grp_biz.grd_goodbaseqtylist.currentcol == grp_biz.grd_goodbaseqtylist.getBindCellIndex("body", "goodspec") &&
- (ds_main_goodbaseqtylist.getColumn(ds_main_goodbaseqtylist.rowposition, "allsizeyn") == "Y" || ds_main_goodbaseqtylist.getColumn(ds_main_goodbaseqtylist.rowposition, "allsizeyn") == "1") )
- {
- fAllSizeRead(ds_main_goodbaseqtylist.rowposition, grp_biz.grd_goodbaseqtylist.currentcol, e.clientY);
- }
- }
- // --------------------------------------------------
- // All Size 읽어오는 함수
- // --------------------------------------------------
- var vAllSizeCol = 0;
- var vAllSizeRow = 0;
- var vAllSizePath:Dataset;
- vAllSizePath = ds_main_codelist;
- var vGoodReqPath:Dataset;
- vGoodReqPath = ds_main_goodbaseqtylist;
- function fAllSizeRead(pRow, pCol, pPos){
- var iClickY = pPos - 100;
- vAllSizeCol = pCol;
- vAllSizeRow = pRow;
-
- if (iClickY > 375) iClickY = iClickY - 319;
-
- grp_biz.grp_allsize.position.top = iClickY;
- grp_biz.grp_allsize.visible = true;
- ds_send_allsize.setColumn(0, "instcd", grp_biz.grp_sea.opt_instcd.value);
- ds_send_allsize.setColumn(0, "goodcd", ds_main_goodbaseqtylist.getColumn(pRow, pCol-3));
- var oParam = {};
- oParam.id = "TRRSD00281";
- oParam.service = "purccommonapp.PurcCommon";
- oParam.method = "reqGetGoodCode";
- oParam.inds = "req=ds_send_allsize";
- oParam.outds = "ds_main_codelist=codelist";
- oParam.async = false;
- tranf_submit(oParam);
- }
- function fSettingGoodList(userqtynm) {
- var addRow = ds_main_goodbaseqtylist.rowposition;
-
- for (var j = 0; j < ds_copynode_goodbaseqtylist.rowcount; j++) {
- if (addRow == ds_main_goodbaseqtylist.rowcount) {
- misfGridIUD(grd_goodbaseqtylist, "A");
- addRow = ds_main_goodbaseqtylist.rowcount - 1;
- }
- ds_main_goodbaseqtylist.setColumn(addRow, "goodcd", ds_copynode_goodbaseqtylist.getColumn(j, "goodcd"));
- ds_main_goodbaseqtylist.setColumn(addRow, "goodnm", ds_copynode_goodbaseqtylist.getColumn(j, "goodnm"));
- ds_main_goodbaseqtylist.setColumn(addRow, "goodmodel", ds_copynode_goodbaseqtylist.getColumn(j, "goodmodel"));
- ds_main_goodbaseqtylist.setColumn(addRow, "goodspec", ds_copynode_goodbaseqtylist.getColumn(j, "goodspec"));
- ds_main_goodbaseqtylist.setColumn(addRow, "prodcmpynm", ds_copynode_goodbaseqtylist.getColumn(j, "prodcmpynm"));
- ds_main_goodbaseqtylist.setColumn(addRow, "purcunit", ds_copynode_goodbaseqtylist.getColumn(j, "purcunit"));
- ds_main_goodbaseqtylist.setColumn(addRow, "exchqty", ds_copynode_goodbaseqtylist.getColumn(j, "exchqty"));
- ds_main_goodbaseqtylist.setColumn(addRow, "deliveunit", ds_copynode_goodbaseqtylist.getColumn(j, "deliveunit"));
- dsf_makeValue(ds_main_goodbaseqtylist, "reqmthd", "string", ds_copynode_goodbaseqtylist.getColumn(j, "reqmthd"), addRow);
- var sReqmThd = ds_copynode_goodbaseqtylist.getColumn(j, "reqmthd");
- if (sReqmThd == "1") {
- ds_main_goodbaseqtylist.setColumn(addRow, "prepargodqty", ds_copynode_goodbaseqtylist.getColumn(j, "safestocqty"));
- } else if (sReqmThd == "3") {
- ds_main_goodbaseqtylist.setColumn(addRow, "basevol", ds_copynode_goodbaseqtylist.getColumn(j, "safestocqty"));
- }
- ds_main_goodbaseqtylist.setColumn(addRow, "ddavguseqty", ds_copynode_goodbaseqtylist.getColumn(j, "ddavguseqty"));
- ds_main_goodbaseqtylist.setColumn(addRow, "allsizespecid", ds_copynode_goodbaseqtylist.getColumn(j, "allsizespecid"));
- ds_main_goodbaseqtylist.setColumn(addRow, "allsizeyn", ds_copynode_goodbaseqtylist.getColumn(j, "allsizeyn"));
- dsf_makeValue(ds_main_goodbaseqtylist, "tmpreqflag", "string", ds_copynode_goodbaseqtylist.getColumn(j, "tmpreqflag"), addRow);
- addRow = addRow + 1;
- }
- // 2009.11.09 수정 처방집계일때 상비품량, 일반청구일때 안전재고량만 입력가능
- // 2009.12.29 수정 tmpreqflag 임의청구 가능여부 삭제
- for (var k = 0; k < ds_main_goodbaseqtylist.rowcount; k++) {
- var Reqmthd = ds_main_goodbaseqtylist.getColumn(k, "reqmthd");
- var Tmpreqflag = ds_main_goodbaseqtylist.getColumn(k, "tmpreqflag");
- if (Reqmthd == "1") { //처방집계시
- ds_main_goodbaseqtylist.setColumn(k, "basevol", "0");
- ds_main_goodbaseqtylist.setColumn(k, "basevoledit", "none");
- ds_main_goodbaseqtylist.setColumn(k, "prepargodqtyedit", "text");
- } else if (Reqmthd == "3") { //일반청구시
- ds_main_goodbaseqtylist.setColumn(k, "prepargodqty", "0");
- ds_main_goodbaseqtylist.setColumn(k, "basevoledit", "text");
- ds_main_goodbaseqtylist.setColumn(k, "prepargodqtyedit", "none");
- }
- }
- }
- function ds_main_goodbaseqtylist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(grp_biz.grd_goodbaseqtylist.currentcol == grp_biz.grd_goodbaseqtylist.getBindCellIndex("body", "goodcd") &&
- utlf_transNullToEmpty(ds_main_goodbaseqtylist.getColumn(ds_main_goodbaseqtylist.rowposition, "goodcd")).length> 0)
- {
- var recv_list = "goodcd,goodnm,goodmodel,goodspec,prodcmpynm,purcunit,exchqty,deliveunit,basevol,ddavguseqty,allsizeyn,allsizespecid";
- ds_copynode_goodbaseqtylist.clearData();
- frmf_setParameter("SMRSD00400_", "");
-
- if ( ds_send_retvcond.getColumn(0, "reqmthd") == '3' ){ //청구방법이 일반청구이면 팝업에 인자값을 던지고(reqcheck)
- //alert("일반 청구일 경우 임.");
- rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd,reqcheck","goodcd," + grp_biz.grp_sea.opt_instcd.value + "," + grp_biz.grp_sea.cmb_goodflag.value + "," + ds_main_goodbaseqtylist.getColumn(ds_main_goodbaseqtylist.rowposition, "goodcd")+",N","", recv_list, grp_biz.grd_goodbaseqtylist,"SPRSD00190","instcd,goodflag,reqcheck","grp_biz.grp_sea.opt_instcd,grp_biz.grp_sea.cmb_goodflag,N", "Y");
- }
- else{ //청구방법이 처방집계이면 인자값없이 팝업을 호출
- rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd","goodcd," + grp_biz.grp_sea.opt_instcd.value + "," + grp_biz.grp_sea.cmb_goodflag.value + "," + ds_main_goodbaseqtylist.getColumn(ds_main_goodbaseqtylist.rowposition, "goodcd"),"", recv_list, grp_biz.grd_goodbaseqtylist,"SPRSD00190","instcd,goodflag","grp_biz.grp_sea.opt_instcd,grp_biz.grp_sea.cmb_goodflag", "Y");
- }
-
- var sReqmThd = ds_init_main_goodlist.getColumn(0, "reqmthd");
- if(sReqmThd=="1"){
- ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowposition, "prepargodqty", ds_init_main_goodlist.getColumn(0, "safestocqty"));
- ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowposition, "basevoledit", "none");
- ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowposition, "prepargodqtyedit", "text");
- }else if(sReqmThd=="3"){
- ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowposition, "basevol", ds_init_main_goodlist.getColumn(0, "safestocqty"));
- ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowposition, "basevoledit", "text");
- ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowposition, "prepargodqtyedit", "none");
- }
- ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowposition, "reqmthd", ds_init_main_goodlist.getColumn(0, "reqmthd"));
-
- var cur_row = ds_main_goodbaseqtylist.rowposition;
- var status = ds_main_goodbaseqtylist.getColumn(cur_row, "m");
- var CSV = frmf_getParameter("SMRSD00400_");
-
- if (CSV.rowcount > 0)
- {
- ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowposition, "goodcd","");
- ds_copynode_goodbaseqtylist.copyData(CSV);
- fSettingGoodList("userqty");
- }
- }
- }
- function grp_biz_grp_allsize_btn_confirm_onclick(obj:Button, e:ClickEventInfo)
- {
- fAllSizeSelect(grp_biz.grd_goodbaseqtylist);
- }
- ]]></Script>
- </Form>
- </FDL>
|