123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRSM01000" position="absolute 0 0 1205 783" titletext="화학물질 취급 변경사항 보고" oninit="SMRSM01000_oninit" onload="SMRSM01000_onload">
- <Layouts>
- <Layout>
- <Static id="caption6" text="화학물질 취급 변경사항 보고" class="tit_1" position="absolute 0 0 293 0"/>
- <Shape id="line2" class="line_6" position="absolute 0 45 1194 51" anchor="left top right"/>
- <Button id="btn_save" taborder="1" text="임시저장" class="btn4" position="absolute 912 24 992 46" anchor="top right" onclick="btn_save_onclick"/>
- <Button id="btn_saveDelete" taborder="2" text="임시저장 자료 삭제" class="btn4" enable="false" position="absolute 995 24 1135 46" anchor="top right" onclick="btn_saveDelete_onclick"/>
- <Button id="btn_send" taborder="3" text="전송" class="btn4" position="absolute 1138 24 1194 46" anchor="top right" onclick="btn_send_onclick" enable="false"/>
- <Static id="caption3" text="※ 1. 작성자 본인의 자료는 수정이 가능하나, 타인이 작성한 자료는 조회만 가능합니다." position="absolute 0 739 472 759" anchor="left bottom"/>
- <Static id="caption2" text="2. 임시저장한 자료는 수정 및 삭제가 가능하나, 전송 이후에는 수정이 불가합니다." position="absolute 16 759 536 779" anchor="left bottom"/>
- <Grid id="grd_matrlist" taborder="4" binddataset="ds_main_matrlist" autoenter="select" useinputpanel="false" cellsizingtype="col" position="absolute 0 119 1193 729" anchor="all" onexpanddown="grd_matrlist_onexpanddown">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="27" band="left"/>
- <Column size="46"/>
- <Column size="92"/>
- <Column size="52"/>
- <Column size="140"/>
- <Column size="111"/>
- <Column size="111"/>
- <Column size="111"/>
- <Column size="55"/>
- <Column size="55"/>
- <Column size="55"/>
- <Column size="55"/>
- <Column size="55"/>
- <Column size="55"/>
- <Column size="55"/>
- <Column size="55"/>
- <Column size="53"/>
- <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" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell rowspan="2" taborder="undefined"/>
- <Cell col="1" rowspan="2" text="구분" taborder="undefined"/>
- <Cell col="2" rowspan="2" text="적용시작일자" taborder="undefined"/>
- <Cell col="3" rowspan="2" text="물질 코드" taborder="undefined"/>
- <Cell col="4" rowspan="2" text="물질명" taborder="undefined"/>
- <Cell col="5" rowspan="2" text="제조사" taborder="undefined"/>
- <Cell col="6" rowspan="2" text="공급처" taborder="undefined"/>
- <Cell col="7" rowspan="2" text="용도" taborder="undefined"/>
- <Cell col="8" rowspan="2" text="월 사용량" taborder="undefined"/>
- <Cell col="9" rowspan="2" text="연간 사용량" taborder="undefined"/>
- <Cell col="10" rowspan="2" text="1일 취급시간" taborder="undefined"/>
- <Cell col="11" rowspan="2" text="월 작업일수" taborder="undefined"/>
- <Cell col="12" rowspan="2" text="취급자 수" taborder="undefined"/>
- <Cell col="13" rowspan="2" text="소분용기 유무" taborder="undefined"/>
- <Cell col="14" rowspan="2" text="원용기 경고표지" taborder="undefined"/>
- <Cell col="15" rowspan="2" text="MSDS 유무" taborder="undefined"/>
- <Cell col="16" rowspan="2" text="작성자" taborder="undefined"/>
- <Cell col="17" text="보고일자"/>
- <Cell col="18" text="순번"/>
- <Cell col="19" text="부서코드"/>
- <Cell col="20" text="작성자ID"/>
- <Cell col="21" text="orguseqtym"/>
- <Cell col="22" text="orguseqtyy"/>
- <Cell col="23" text="orgusge"/>
- <Cell col="24" text="orgtrethrd"/>
- <Cell col="25" text="orgworkdcntm"/>
- <Cell col="26" text="orgtretmcnt"/>
- <Cell col="27" text="orgctnryn"/>
- <Cell col="28" text="orgctnrsignyn"/>
- <Cell col="29" text="orgmsdsyn"/>
- <Cell row="1" col="17" text="보고일자"/>
- <Cell row="1" col="18" text="순번"/>
- <Cell row="1" col="19" text="부서코드"/>
- <Cell row="1" col="20" text="작성자ID"/>
- <Cell row="1" col="21" text="orguseqtym"/>
- <Cell row="1" col="22" text="orguseqtyy"/>
- <Cell row="1" col="23" text="orgusge"/>
- <Cell row="1" col="24" text="orgtrethrd"/>
- <Cell row="1" col="25" text="orgworkdcntm"/>
- <Cell row="1" col="26" text="orgtretmcnt"/>
- <Cell row="1" col="27" text="orgctnryn"/>
- <Cell row="1" col="28" text="orgctnrsignyn"/>
- <Cell row="1" col="29" text="orgmsdsyn"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" displaytype="combo" style="align:center middle;color:EXPR(col1);color2:EXPR(col1);font:arial,9,bold;" text="bind:workflag" combodataset="ds_cmb_workflag" combocodecol="value" combodatacol="label" enable="false"/>
- <Cell col="2" displaytype="date" edittype="date" style="color:#ff0000ff;color2:#ff0000ff;" text="bind:appdd" editautoselect="true" calendardisplaynulltype="nulltext"/>
- <Cell col="3" displaytype="text" edittype="expr:getRowType(currow) == 2 ? 'text' : 'none'" style="align:center middle;" text="bind:matrcd" editautoselect="true" expandshow="show"/>
- <Cell col="4" style="align:left top;padding:5 2 1 2;" text="bind:matrnm" wordwrap="word"/>
- <Cell col="5" style="align:left top;padding:5 2 1 2;" text="bind:prodcmpynm" wordwrap="word" editautoselect="true"/>
- <Cell col="6" style="align:left top;padding:5 2 1 2;" text="bind:maincustlastsuplplcenm" wordwrap="word" editautoselect="true"/>
- <Cell col="7" displaytype="text" edittype="text" style="align:left top;padding:5 2 1 2;color:EXPR(col7);color2:EXPR(col7);" text="bind:usge" wordwrap="word" editautoselect="true"/>
- <Cell col="8" displaytype="text" edittype="text" style="align:center top;padding:5 0 2 0;color:EXPR(col8);color2:EXPR(col8);" text="bind:useqtym" wordwrap="word" editautoselect="true"/>
- <Cell col="9" displaytype="text" edittype="text" style="align:center top;padding:5 0 2 0;color:EXPR(col9);color2:EXPR(col9);" text="bind:useqtyy" wordwrap="word" editautoselect="true"/>
- <Cell col="10" displaytype="text" edittype="text" style="align:center top;padding:5 0 2 0;color:EXPR(col10);color2:EXPR(col10);" text="bind:trethrd" wordwrap="word" editautoselect="true"/>
- <Cell col="11" displaytype="text" edittype="text" style="align:center top;padding:5 0 2 0;color:EXPR(col11);color2:EXPR(col11);" text="bind:workdcntm" wordwrap="word" editautoselect="true"/>
- <Cell col="12" displaytype="text" edittype="text" style="align:center top;padding:5 0 2 0;color:EXPR(col12);color2:EXPR(col12);" text="bind:tretmcnt" wordwrap="word" editautoselect="true"/>
- <Cell col="13" displaytype="combo" edittype="combo" style="align:center top;padding:5 0 2 0;color:EXPR(col13);color2:EXPR(col13);" text="bind:ctnryn" wordwrap="word" editautoselect="true" combodataset="ds_cmb_ctnryn" combocodecol="value" combodatacol="label"/>
- <Cell col="14" displaytype="combo" edittype="combo" style="align:center top;padding:5 0 2 0;color:EXPR(col14);color2:EXPR(col14);" text="bind:ctnrsignyn" wordwrap="word" editautoselect="true" combodataset="ds_cmb_ctnrsignyn" combocodecol="value" combodatacol="label"/>
- <Cell col="15" displaytype="combo" edittype="combo" style="align:center top;padding:5 0 2 0;color:EXPR(col15);color2:EXPR(col15);" text="bind:msdsyn" wordwrap="word" editautoselect="true" combodataset="ds_cmb_msdsyn" combocodecol="value" combodatacol="label"/>
- <Cell col="16" style="align:center middle;" text="bind:fstname" editautoselect="true"/>
- <Cell col="17" text="bind:reptdd"/>
- <Cell col="18" text="bind:reptseq"/>
- <Cell col="19" text="bind:deptcd"/>
- <Cell col="20" text="bind:fstid"/>
- <Cell col="21" text="bind:orguseqtym"/>
- <Cell col="22" text="bind:orguseqtyy"/>
- <Cell col="23" text="bind:orgusge"/>
- <Cell col="24" text="bind:orgtrethrd"/>
- <Cell col="25" text="bind:orgworkdcntm"/>
- <Cell col="26" text="bind:orgtretmcnt"/>
- <Cell col="27" text="bind:orgctnryn"/>
- <Cell col="28" text="bind:orgctnrsignyn"/>
- <Cell col="29" text="bind:orgmsdsyn"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="caption21" text="조사표" class="tit_2" position="absolute 0 98 88 120"/>
- <Shape id="line3" class="line_10" position="absolute 0 114 1193 120" anchor="left top right"/>
- <Button id="btn_insert" taborder="5" text="신규물질 추가" class="btn2" position="absolute 825 95 922 114" anchor="top right" onclick="btn_insert_onclick"/>
- <Button id="btn_insertstop" taborder="6" text="사용중단 처리" class="btn2" position="absolute 925 95 1022 114" anchor="top right" onclick="btn_insertstop_onclick"/>
- <Button id="btn_delete" taborder="7" text="취소 및 삭제" class="btn2" position="absolute 1025 95 1111 114" anchor="top right" onclick="btn_delete_onclick"/>
- <Button id="btn_excel" taborder="8" text="엑셀출력" class="btn7" position="absolute 1114 95 1194 114" anchor="top right" onclick="btn_excel_onclick"/>
- <Div id="grp_sea" taborder="9" class="div_SA2" position="absolute 0 49 1194 89" anchor="left top right">
- <Layouts>
- <Layout>
- <Shape id="line5" linetype="vertical" class="line_4" position="absolute 472 9 478 30" anchor="default"/>
- <Button id="btn_search" taborder="6" text="조회" class="btn1" position="absolute 490 9 546 31" anchor="default" onclick="grp_sea_btn_search_onclick"/>
- <Edit id="opt_deptnm" taborder="7" readonly="true" class="output" position="absolute 265 10 455 29" anchor="default"/>
- <Static id="caption1" text="부서코드" class="search_name" position="absolute 85 11 161 28" anchor="default"/>
- <Edit id="ipt_deptcd" taborder="8" autoselect="true" autoskip="true" class="input_default" position="absolute 166 10 241 29" anchor="default" onkeydown="grp_sea_ipt_deptcd_onkeydown"/>
- <Button id="btn_deptcd" taborder="9" class="icon_search" position="absolute 245 11 261 27" anchor="default" onclick="grp_sea_btn_deptcd_onclick"/>
- <Static id="caption9" text="보고일자 :" position="absolute 823 11 890 28" anchor="default" style="color:#993300ff;font:Dotum,9,bold;"/>
- <Calendar id="ipt_reptdd" taborder="10" autoselect="true" autoskip="true" class="input_default" position="absolute 890 10 980 29" mask="yyyy-mm-dd" anchor="default"/>
- <CheckBox id="cbx_temp" taborder="11" text="임시저장 자료" truevalue="Y" position="absolute 557 10 663 30" anchor="default" onclick="grp_sea_cbx_temp_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Static id="caption00" text="화학물질 취급 변경사항 보고" class="tit_1" position="absolute 0 0 208 25"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_condition" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_condition_oncolumnchanged">
- <ColumnInfo>
- <Column id="reptdd" type="STRING" size="256"/>
- <Column id="deptcd" type="STRING" size="256"/>
- <Column id="deptnm" type="STRING" size="256"/>
- <Column id="tempyn" type="STRING" size="256"/>
- <Column id="popflag" type="STRING" size="256"/>
- <Column id="confirmflag" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="reptdd"/>
- <Col id="deptcd"/>
- <Col id="deptnm"/>
- <Col id="tempyn"/>
- <Col id="popflag"/>
- <Col id="confirmflag"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_cmb_workflag" 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">N</Col>
- </Row>
- <Row>
- <Col id="label">변경</Col>
- <Col id="value">C</Col>
- </Row>
- <Row>
- <Col id="label">중단</Col>
- <Col id="value">S</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_cmb_ctnryn" 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">Y</Col>
- <Col id="value">Y</Col>
- </Row>
- <Row>
- <Col id="label">N</Col>
- <Col id="value">N</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_cmb_ctnrsignyn" 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">Y</Col>
- <Col id="value">Y</Col>
- </Row>
- <Row>
- <Col id="label">N</Col>
- <Col id="value">N</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_cmb_msdsyn" 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">Y</Col>
- <Col id="value">Y</Col>
- </Row>
- <Row>
- <Col id="label">N</Col>
- <Col id="value">N</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_matrlist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_matrlist_oncolumnchanged">
- <ColumnInfo>
- <Column id="reptdd" type="STRING" size="256"/>
- <Column id="reptseq" type="STRING" size="256"/>
- <Column id="matrcd" type="STRING" size="256"/>
- <Column id="deptcd" type="STRING" size="256"/>
- <Column id="workflag" type="STRING" size="256"/>
- <Column id="appdd" type="STRING" size="256"/>
- <Column id="usge" type="STRING" size="256"/>
- <Column id="useqtym" type="STRING" size="256"/>
- <Column id="useqtyy" type="STRING" size="256"/>
- <Column id="trethrd" type="STRING" size="256"/>
- <Column id="workdcntm" type="STRING" size="256"/>
- <Column id="tretmcnt" type="STRING" size="256"/>
- <Column id="ctnryn" type="STRING" size="256"/>
- <Column id="ctnrsignyn" type="STRING" size="256"/>
- <Column id="msdsyn" type="STRING" size="256"/>
- <Column id="matrnm" type="STRING" size="256"/>
- <Column id="prodcmpynm" type="STRING" size="256"/>
- <Column id="maincustlastsuplplcenm" type="STRING" size="256"/>
- <Column id="fstname" type="STRING" size="256"/>
- <Column id="fstid" type="STRING" size="256"/>
- <Column id="orguseqtym" type="STRING" size="256"/>
- <Column id="orguseqtyy" type="STRING" size="256"/>
- <Column id="orgusge" type="STRING" size="256"/>
- <Column id="orgtrethrd" type="STRING" size="256"/>
- <Column id="orgworkdcntm" type="STRING" size="256"/>
- <Column id="orgtretmcnt" type="STRING" size="256"/>
- <Column id="orgctnryn" type="STRING" size="256"/>
- <Column id="orgctnrsignyn" type="STRING" size="256"/>
- <Column id="orgmsdsyn" type="STRING" size="256"/>
- <Column id="color" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_popmatr" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="matrcd" type="STRING" size="256"/>
- <Column id="matrnm" type="STRING" size="256"/>
- <Column id="deptcd" type="STRING" size="256"/>
- <Column id="prodcmpynm" type="STRING" size="256"/>
- <Column id="maincustlastsuplplcenm" type="STRING" size="256"/>
- <Column id="returntype" type="STRING" size="256"/>
- <Column id="selectyn" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="matrcd"/>
- <Col id="matrnm"/>
- <Col id="deptcd"/>
- <Col id="prodcmpynm"/>
- <Col id="maincustlastsuplplcenm"/>
- <Col id="returntype"/>
- <Col id="selectyn"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_matrlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_sea.ipt_deptcd" propid="value" datasetid="ds_main_condition" columnid="deptcd"/>
- <BindItem id="item1" compid="grp_sea.opt_deptnm" propid="value" datasetid="ds_main_condition" columnid="deptnm"/>
- <BindItem id="item2" compid="grp_sea.ipt_reptdd" propid="value" datasetid="ds_main_condition" columnid="reptdd"/>
- <BindItem id="item3" compid="grp_sea.cbx_temp" propid="value" datasetid="ds_main_condition" columnid="tempyn"/>
- </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 SMRSM01000_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMRSM01000_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_matrlist);
- grdf_setRowTypeIcon(grd_matrlist, 0);
- fOpenForm();
- }
- function fOpenForm()
- {
- misfGridInit(grd_matrlist);
- }
- function ds_main_condition_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid == "deptcd")
- {
- var objFocus = this.getFocus();
- misfGridInit(grd_matrlist);
- grp_sea.ipt_deptcd.value = e.newvalue;
- grp_sea.ipt_deptcd.setFocus();
- grp_sea.opt_deptnm.value = "";
-
- misfValidationCheck("02", "", "deptcd,deptnm" );
- objFocus.setFocus();
- }
- }
- function grp_sea_btn_deptcd_onclick(obj:Button, e:ClickEventInfo)
- {
- var vOrigDeptcd = grp_sea.ipt_deptcd.value;
-
- var recv_list = "deptcd,deptnm";
- misfOpenPopUpList("02", ds_main_condition,"", recv_list) ;
-
- if(vOrigDeptcd != grp_sea.ipt_deptcd.value)
- {
- misfGridInit(grd_matrlist);
- }
- }
- function grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- fGetMatrList();
- }
- function grp_sea_cbx_temp_onclick(obj:CheckBox, e:ClickEventInfo)
- {
- misfGridInit(grd_matrlist); //그리드 지움
-
- if(obj.value != "Y") {
- grp_sea.ipt_reptdd.value = "";
- btn_send.enable = false;
- } else {
- btn_send.enable = true;
- }
- }
- function grd_matrlist_onexpanddown(obj:Grid, e:GridMouseEventInfo)
- {
- var irow = e.row;
- ds_popmatr.setColumn(0, "returntype", "3");
-
- var workFlag = ds_main_matrlist.getColumn(irow, "workflag");
-
- if(workFlag == "N")
- {
- ds_popmatr.setColumn(0, "deptcd", "");
- }
- else
- {
- ds_popmatr.setColumn(0, "deptcd", grp_sea.ipt_deptcd.value);
- }
-
- ds_popmatr.setColumn(0, "selectyn", "");
-
- var objArg = new Object();
- objArg.arg_ds_popdata = ds_popmatr;
-
- frmf_modal("SPRSM00100", "SPRSM00100", objArg, "", "", "", "", "", "", "", "", "", "M");
- if(ds_popmatr.getColumn(0, "selectyn") == "Y")
- {
- ds_main_matrlist.setColumn(irow, "matrcd", ds_popmatr.getColumn(0, "matrcd"));
- ds_main_matrlist.setColumn(irow, "matrnm", ds_popmatr.getColumn(0, "matrnm"));
- ds_main_matrlist.setColumn(irow, "prodcmpynm", ds_popmatr.getColumn(0, "prodcmpynm"));
- ds_main_matrlist.setColumn(irow, "maincustlastsuplplcenm", ds_popmatr.getColumn(0, "maincustlastsuplplcenm"));
- }
- }
- function ds_main_matrlist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- var iRow = e.row;
- var flag = obj.getColumn(iRow, "workflag");
- var iFlagCol = "workflag";
-
- if(utlf_isNull(flag)|| flag == "C")
- {
- obj.setColumn(iRow, "workflag", "");
-
- fSetStyleAndFlag("usge", iRow, iFlagCol);
- fSetStyleAndFlag("useqtym", iRow, iFlagCol);
- fSetStyleAndFlag("useqtyy", iRow, iFlagCol);
- fSetStyleAndFlag("trethrd", iRow, iFlagCol);
- fSetStyleAndFlag("workdcntm", iRow, iFlagCol);
- fSetStyleAndFlag("tretmcnt", iRow, iFlagCol);
- fSetStyleAndFlag("ctnryn", iRow, iFlagCol);
- fSetStyleAndFlag("ctnrsignyn", iRow, iFlagCol);
- fSetStyleAndFlag("msdsyn", iRow, iFlagCol);
- }
- }
- function fSetStyleAndFlag(pColname, pRow, pFlagCol)
- {
- var pCol = pColname;
-
- ds_main_matrlist.enableevent = false;
- ds_main_matrlist.updatecontrol = false;
-
- if(ds_main_matrlist.getColumn(pRow, pCol) == ds_main_matrlist.getColumn(pRow, "org"+pColname))
- {
- ds_main_matrlist.setColumn(pRow, "col" + grd_matrlist.getBindCellIndex("body", pCol), "");
- }
- else
- {
- ds_main_matrlist.setColumn(pRow, "col" + grd_matrlist.getBindCellIndex("body", pCol), "#ff0000");
- ds_main_matrlist.setColumn(pRow, "col" + grd_matrlist.getBindCellIndex("body", pFlagCol), "#ff0000");
-
- ds_main_matrlist.setColumn(pRow, pFlagCol, "C");
- }
- ds_main_matrlist.updatecontrol = true;
- ds_main_matrlist.enableevent = true;
- }
- // function misfSetReadOnlyCol(pGrid, pRefs, bYn)
- // {
- // var arrRefs = pRefs.split(",");
- // var bindDS = pGrid.binddataset;
- //
- // if(arrRefs.length == 0)
- // {
- // return;
- // }
- //
- // for(var j = 0; j < arrRefs.length; j++)
- // {
- // if(bYn == "true")
- // {
- // pGrid.setCellProperty("Body", pGrid.getBindCellIndex("Body", arrRefs[j]), "edittype", "none");
- // }
- // else
- // {
- // pGrid.setCellProperty("Body", pGrid.getBindCellIndex("Body", arrRefs[j]), "edittype", "normal");
- // }
- // }
- // }
- function btn_insert_onclick(obj:Button, e:ClickEventInfo)
- {
- grp_sea.ipt_deptcd.value = grp_sea.ipt_deptcd.value.getTrim();
-
- if(utlf_isNull(grp_sea.ipt_deptcd.value))
- {
- sysf_messageBox("부서코드가 선택되지 않았습니다. \n먼저 부서코드를 선택하십시요.", "E999", "");
- grp_sea.ipt_deptcd.setFocus();
- return;
- }
-
- ds_main_matrlist.addColumn("col1", "string");
- ds_main_matrlist.addColumn("col7", "string");
- ds_main_matrlist.addColumn("col8", "string");
- ds_main_matrlist.addColumn("col9", "string");
- ds_main_matrlist.addColumn("col10", "string");
- ds_main_matrlist.addColumn("col11", "string");
- ds_main_matrlist.addColumn("col12", "string");
- ds_main_matrlist.addColumn("col13", "string");
- ds_main_matrlist.addColumn("col14", "string");
- ds_main_matrlist.addColumn("col15", "string");
-
- var irow = ds_main_matrlist.addRow();
-
- ds_main_matrlist.setColumn(irow, "deptcd", grp_sea.ipt_deptcd.value);
- ds_main_matrlist.setColumn(irow, "workflag", "N");
- ds_main_matrlist.setColumn(irow, "col1", "#ff0000");
- grd_matrlist.setCellProperty("Body", grd_matrlist.getBindCellIndex("Body", "workflag"), "edittype", "none");
- ds_main_matrlist.setColumn(irow, "ctnryn", "N");
- ds_main_matrlist.setColumn(irow, "ctnrsignyn", "N");
- ds_main_matrlist.setColumn(irow, "msdsyn", "N");
- }
- function btn_insertstop_onclick(obj:Button, e:ClickEventInfo)
- {
- if(ds_main_matrlist.rowcount < 1)
- {
- return;
- }
-
- var irow = ds_main_matrlist.rowposition;
- var flag = ds_main_matrlist.getColumn(irow, "workflag");
-
- if(utlf_isNull(flag))
- {
- ds_main_matrlist.setColumn(irow, "workflag", "S");
- ds_main_matrlist.setColumn(irow, "col1", "#ff0000");
- misfSetReadOnlyCol(grd_matrlist, "usge,useqtym,useqtyy,trethrd,workdcntm,tretmcnt,ctnryn,ctnrsignyn,msdsyn", true, irow);
- }
- else if(flag == "C")
- {
- ds_main_matrlist.setColumn(irow, "workflag", "S");
- ds_main_matrlist.setColumn(irow, "col1", "#ff0000");
-
- misfSetReadOnlyCol(grd_matrlist, "usge,useqtym,useqtyy,trethrd,workdcntm,tretmcnt,ctnryn,ctnrsignyn,msdsyn", true, irow);
-
- ds_main_matrlist.setColumn(irow, "usge", ds_main_matrlist.getColumn(irow, "orgusge"));
- ds_main_matrlist.setColumn(irow, "useqtym", ds_main_matrlist.getColumn(irow, "orguseqtym"));
- ds_main_matrlist.setColumn(irow, "useqtyy", ds_main_matrlist.getColumn(irow, "orguseqtyy"));
- ds_main_matrlist.setColumn(irow, "trethrd", ds_main_matrlist.getColumn(irow, "orgtrethrd"));
- ds_main_matrlist.setColumn(irow, "workdcntm", ds_main_matrlist.getColumn(irow, "orgworkdcntm"));
- ds_main_matrlist.setColumn(irow, "tretmcnt", ds_main_matrlist.getColumn(irow, "orgtretmcnt"));
- ds_main_matrlist.setColumn(irow, "ctnryn", ds_main_matrlist.getColumn(irow, "orgctnryn"));
- ds_main_matrlist.setColumn(irow, "ctnrsignyn", ds_main_matrlist.getColumn(irow, "orgctnrsignyn"));
- ds_main_matrlist.setColumn(irow, "msdsyn", ds_main_matrlist.getColumn(irow, "orgmsdsyn"));
- }
- else if(flag == "N")
- {
- sysf_messageBox("신규추가 물질을 바로 사용중단 처리할 수 없습니다. ", "E999", "");
- return;
- }
- else if(flag == "S")
- {
- sysf_messageBox("이미 사용중단 처리되었습니다. ", "E999", "");
- return;
- }
- }
- function btn_delete_onclick(obj:Button, e:ClickEventInfo)
- {
- if(ds_main_matrlist.rowcount < 1)
- {
- return;
- }
-
- var irow = ds_main_matrlist.rowposition;
- var flag = ds_main_matrlist.getColumn(irow, "workflag");
-
- if(utlf_isNull(flag))
- {
- sysf_messageBox("취소처리할 작업 내용이 없습니다. 물질을 확인하십시요. ", "E999", "");
- return;
- }
- else if(flag == "C")
- {
- ds_main_matrlist.setColumn(irow, "workflag", "");
- ds_main_matrlist.setColumn(irow, "col1", "");
- ds_main_matrlist.setColumn(irow, "appdd", "");
-
- ds_main_matrlist.setColumn(irow, "usge", ds_main_matrlist.getColumn(irow, "orgusge"));
- ds_main_matrlist.setColumn(irow, "useqtym", ds_main_matrlist.getColumn(irow, "orguseqtym"));
- ds_main_matrlist.setColumn(irow, "useqtyy", ds_main_matrlist.getColumn(irow, "orguseqtyy"));
- ds_main_matrlist.setColumn(irow, "trethrd", ds_main_matrlist.getColumn(irow, "orgtrethrd"));
- ds_main_matrlist.setColumn(irow, "workdcntm", ds_main_matrlist.getColumn(irow, "orgworkdcntm"));
- ds_main_matrlist.setColumn(irow, "tretmcnt", ds_main_matrlist.getColumn(irow, "orgtretmcnt"));
- ds_main_matrlist.setColumn(irow, "ctnryn", ds_main_matrlist.getColumn(irow, "orgctnryn"));
- ds_main_matrlist.setColumn(irow, "ctnrsignyn", ds_main_matrlist.getColumn(irow, "orgctnrsignyn"));
- ds_main_matrlist.setColumn(irow, "msdsyn", ds_main_matrlist.getColumn(irow, "orgmsdsyn"));
- }
- else if(flag == "N")
- {
- ds_main_matrlist.deleteRow(irow);
- }
- else if(flag == "S")
- {
- ds_main_matrlist.setColumn(irow, "workflag", "");
- ds_main_matrlist.setColumn(irow, "col1", "");
- ds_main_matrlist.setColumn(irow, "appdd", "");
- misfSetReadOnlyCol(grd_matrlist, "usge,useqtym,useqtyy,trethrd,workdcntm,tretmcnt,ctnryn,ctnrsignyn,msdsyn", false, irow);
- }
- }
- function btn_excel_onclick(obj:Button, e:ClickEventInfo)
- {
- grdf_exportExcel(grd_matrlist, "조사표", "SheetName1", "false");
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- if(ds_main_matrlist.rowcount < 1)
- {
- return;
- }
- if(fClickSaveBtn() == true)
- {
- grp_sea.cbx_temp.value = "Y";
- fGetMatrList();
- }
- }
- function fClickSaveBtn()
- {
- if(String(ds_main_condition.getColumn(0, "reptdd")).length < 8)
- {
- sysf_messageBox("보고일자가 정확하게 입력되지 않았습니다. ", "E999", "");
- grp_sea.ipt_reptdd.setFocus();
- return;
- }
- for(var i = 0; i < ds_main_matrlist.rowcount; i++)
- {
- var flag = utlf_transNullToEmpty(ds_main_matrlist.getColumn(i, "workflag"));
- if (!utlf_isNull(flag))
- {
- if (String(utlf_transNullToEmpty(ds_main_matrlist.getColumn(i, "appdd"))).length < 8 )
- {
- sysf_messageBox("적용시작일자가 정확하게 입력되지 않았습니다. \n" + eval(i + 1) + "번째 행을 확인하십시요. ", "E999", "");
- return;
- }
- if ( utlf_isNull(ds_main_matrlist.getColumn(i, "matrcd")))
- {
- sysf_messageBox("물질코드가 선택되지 않았습니다. \n" + eval(i + 1) + "번째 행을 확인하십시요. ", "E999", "");
- return;
- }
- }
- ds_main_matrlist.enableevent = false;
- ds_main_matrlist.updatecontrol = false;
- ds_main_matrlist.setColumn(i, "reptdd", grp_sea.ipt_reptdd.value);
- ds_main_matrlist.updatecontrol = true;
- ds_main_matrlist.enableevent = true;
- }
-
- grdf_setStatus(grd_matrlist, "I");
-
- var oParam = {};
- oParam.id = "TXRSM01001";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "reqExeSaveMatrInvestigate";
- oParam.inds = "req=ds_main_condition matrlist=ds_main_matrlist:U";
- oParam.async = false;
- oParam.typeStr = "status";
- oParam.callback = "cf_TXRSM01001";
- tranf_submit(oParam);
-
- if(arErrorCode.pop("TXRSM01001") > -1){
- return true;
- }else{
- return false;
- }
- }
- function cf_TXRSM01001(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- function fGetMatrList()
- {
- grp_sea.ipt_deptcd.value = grp_sea.ipt_deptcd.value.getTrim();
-
- if(utlf_isNull(grp_sea.ipt_deptcd.value))
- {
- sysf_messageBox("부서코드가 선택되지 않았습니다. \n먼저 부서코드를 선택하십시요.", "E999", "");
- grp_sea.ipt_deptcd.setFocus();
- return;
- }
-
- var oParam = {};
- oParam.id = "TRRSM01001";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "reqGetMatrInvestigateList";
- oParam.inds = "req=ds_main_condition";
- oParam.outds = "ds_main_matrlist=matrlist";
- oParam.async = false;
- oParam.callback = "cf_TRRSM01001";
- tranf_submit(oParam);
-
- }
- function cf_TRRSM01001(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- ds_main_matrlist.addColumn("col1", "string");
- ds_main_matrlist.addColumn("col7", "string");
- ds_main_matrlist.addColumn("col8", "string");
- ds_main_matrlist.addColumn("col9", "string");
- ds_main_matrlist.addColumn("col10", "string");
- ds_main_matrlist.addColumn("col11", "string");
- ds_main_matrlist.addColumn("col12", "string");
- ds_main_matrlist.addColumn("col13", "string");
- ds_main_matrlist.addColumn("col14", "string");
- ds_main_matrlist.addColumn("col15", "string");
-
- if(grp_sea.cbx_temp.value == "Y")
- {
- for(var i = 0; i < ds_main_matrlist.rowcount; i++)
- {
- if(!utlf_isNull(ds_main_matrlist.getColumn(i, "reptdd")))
- {
- grp_sea.ipt_reptdd.value = ds_main_matrlist.getColumn(i, "reptdd");
- break;
- }
- }
- }
-
- var sFstid = "";
- if(ds_main_matrlist.rowcount > 0)
- {
- for(var i = 0; i < ds_main_matrlist.rowcount; i++)
- {
- if(!utlf_isNull(ds_main_matrlist.getColumn(i, "fstid")))
- {
- sFstid = ds_main_matrlist.getColumn(i, "fstid");
- break;
- }
- }
- }
-
- if (utlf_isNull(sFstid) || sFstid == sysf_getUserInfo("userid"))
- {
- //2017.07.07 본인이 아니어도 전송 가능토록 comment처리
- //btn_save.enable = true;
- }
- else
- {
- //2017.07.07 본인이 아니어도 전송 가능토록 comment처리
- //btn_save.enable = false;
- sysf_messageBox("본인이 등록한 자료가 아닌 경우, 조회만 가능합니다.", "E999", "");
- }
-
- if(grp_sea.cbx_temp.value == "Y" && sFstid == sysf_getUserInfo("userid"))
- {
- btn_saveDelete.enable = true;
- }
- else
- {
- btn_saveDelete.enable = false;
- }
-
- //2017.07.07 임시저장 자료 조회시에 전송 enable
- if(grp_sea.cbx_temp.value == "Y" ) {
- btn_send.enable = true;
- } else {
- btn_send.enable = false;
- }
-
- ds_main_matrlist.enableevent = false;
- ds_main_matrlist.updatecontrol = false;
- for(var irow = 0; irow < ds_main_matrlist.rowcount; irow++)
- {
- var flag = ds_main_matrlist.getColumn(irow, "workflag");
-
- if(utlf_isNull(flag))
- {
- ds_main_matrlist.setColumn(irow, "col1", "");
- misfSetReadOnlyCol(grd_matrlist, "matrcd", true, irow);
- ds_main_matrlist.updatecontrol = false;
- }
- else if(flag == "N")
- {
- ds_main_matrlist.setColumn(irow, "col1", "#ff0000");
- }
- else if(flag == "C")
- {
- ds_main_matrlist.setColumn(irow, "col1", "#ff0000");
- misfSetReadOnlyCol(grd_matrlist, "matrcd", true, irow);
- ds_main_matrlist.updatecontrol = false;
-
- var iFlagCol = "workflag";
-
- fSetStyleAndFlag("usge", irow, iFlagCol);
- fSetStyleAndFlag("useqtym", irow, iFlagCol);
- fSetStyleAndFlag("useqtyy", irow, iFlagCol);
- fSetStyleAndFlag("trethrd", irow, iFlagCol);
- fSetStyleAndFlag("workdcntm", irow, iFlagCol);
- fSetStyleAndFlag("tretmcnt", irow, iFlagCol);
- fSetStyleAndFlag("ctnryn", irow, iFlagCol);
- fSetStyleAndFlag("ctnrsignyn", irow, iFlagCol);
- fSetStyleAndFlag("msdsyn", irow, iFlagCol);
- }
- else if(flag == "S")
- {
- ds_main_matrlist.setColumn(irow, "col1", "#ff0000");
- misfSetReadOnlyCol(grd_matrlist, "matrcd", true, irow);
- misfSetReadOnlyCol(grd_matrlist, "usge,useqtym,useqtyy,trethrd,workdcntm,tretmcnt,ctnryn,ctnrsignyn,msdsyn", true, irow);
- ds_main_matrlist.updatecontrol = false;
- }
- }
- ds_main_matrlist.updatecontrol = true;
- ds_main_matrlist.enableevent = true;
- }
- }
- function btn_saveDelete_onclick(obj:Button, e:ClickEventInfo)
- {
- if(grp_sea.cbx_temp.value != "Y" || ds_main_matrlist.rowcount == 0)
- {
- sysf_messageBox("먼저 임시저장 자료를 조회한 후, 삭제 작업을 하십시요.", "I999", "");
- return;
- }
-
- var sFstid = "";
- if(ds_main_matrlist.rowcount > 0)
- {
- for(var i = 0; i < ds_main_matrlist.rowcount; i++)
- {
- if(!utlf_isNull(ds_main_matrlist.getColumn(i, "fstid")))
- {
- sFstid = ds_main_matrlist.getColumn(i, "fstid");
- break;
- }
- }
- }
-
- if(sFstid != sysf_getUserInfo("userid"))
- {
- sysf_messageBox("본인이 등록한 자료만 삭제가 가능합니다.", "E999", "");
- return;
- }
-
- if (sysf_messageBox("임시저장된 부서 조사표 자료를 삭제하시겠습니까?", "Q999") != 6) return;
-
- if(fClickSaveDeleteBtn())
- {
- fGetMatrList();
- }
- }
- function fClickSaveDeleteBtn()
- {
- var oParam = {};
- oParam.id = "TXRSM01003";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "reqExeSaveMatrDelete";
- oParam.inds = "req=ds_main_condition";
- oParam.async = false;
- oParam.callback = "cf_TXRSM01003";
- tranf_submit(oParam);
-
- if( arErrorCode.pop("TXRSM01003") > -1 ){
- return true;
- }else{
- return false;
- }
- }
- function cf_TXRSM01003(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- function btn_send_onclick(obj:Button, e:ClickEventInfo)
- {
- if(ds_main_matrlist.rowcount == 0)
- {
- return;
- }
-
- if (sysf_messageBox("전송처리 이후에는 수정이 불가합니다. 전송하시겠습니까?", "Q999") != 6) return;
-
- /* 2017.07.07 부서장이 전송처리를 하게 되면서 저장 기능을 제외하고, 아래에 구현
- if(fClickSaveBtn())
- {
- var oParam = {};
- oParam.id = "TXRSM01002";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "reqExeSaveMatrInvestSend";
- oParam.inds = "req=ds_main_condition";
- oParam.async = false;
- oParam.callback = "cf_TXRSM01002";
- tranf_submit(oParam);
-
- grp_sea.cbx_temp.value = "Y";
- grp_sea.ipt_reptdd.value = "";
- fGetMatrList();
- }
- */
-
- var oParam = {};
- oParam.id = "TXRSM01002";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "reqExeSaveMatrInvestSend";
- oParam.inds = "req=ds_main_condition";
- oParam.async = false;
- oParam.callback = "cf_TXRSM01002";
- tranf_submit(oParam);
-
- if(arErrorCode.pop("TXRSM01002") > -1){
- //임시저장 자료를 조회하여 보여준다.
- grp_sea.cbx_temp.value = "Y";
- grp_sea.ipt_reptdd.value = "";//보고일자 초기화
- fGetMatrList();//코드 목록 재조회
- }
- }
- function cf_TXRSM01002(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- function grp_sea_ipt_deptcd_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if( e.keycode == 13 ){
- obj.updateToDataset();
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|