123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMLQF00900" position="absolute 0 0 1256 805" titletext="Lot 관리" onload="SMLQF00600_onload" oninit="SMLQF00900_oninit">
- <Layouts>
- <Layout>
- <Static id="caption6" text="Lot 관리" class="tit_1" position="absolute 0 0 119 25"/>
- <Div id="grp_sea" anchor="left top right" taborder="3" style="align:center top;" position="absolute 0 25 1256 67" class="div_SA">
- <Layouts>
- <Layout>
- <Combo id="cmb_refflag" taborder="6" class="combo_s_essential" position="absolute 82 10 202 30" style="align:left middle;" anchor="default" innerdataset="@ds_refflag" codecolumn="value" datacolumn="label" index="0" value="1" text="사용자료"/>
- <Static id="caption3" text="검사실" class="search_name" position="absolute 226 10 287 30" style="align:left middle;" anchor="default"/>
- <Combo id="cbo_execDept" taborder="7" class="combo_s_essential" position="absolute 287 10 387 30" style="align:left middle;" anchor="default" innerdataset="@ds_init_lb0111" codecolumn="cd" datacolumn="nm" onitemchanged="grp_sea_cbo_execDept_onitemchanged" index="-1"/>
- <Static id="caption4" text="장비" class="search_name" position="absolute 411 10 459 30" style="align:left middle;" anchor="default"/>
- <Combo id="cbo_eqmtList" taborder="8" class="combo_s_essential" position="absolute 459 10 559 30" style="align:left middle;" anchor="default" innerdataset="@ds_init_lb0701" codecolumn="cd" datacolumn="nm"/>
- <Static id="caption7" text="Lot 구분" class="search_name" position="absolute 583 10 657 30" style="align:left middle;" anchor="default"/>
- <Combo id="cmb_searchflag" taborder="9" class="combo_search" position="absolute 657 10 777 30" style="align:left middle;" anchor="default" innerdataset="@ds_searchflag" codecolumn="value" datacolumn="label" index="0" value="00" text="-전체-"/>
- <Button id="btn_ref" taborder="10" text="조회" class="btn1" position="absolute 1188 10 1244 30" style="align:left middle;" anchor="top right" onclick="grp_sea_btn_ref_onclick"/>
- <Static id="caption5" text="조회구분" class="search_name" position="absolute 8 10 82 30" style="align:left middle;"/>
- </Layout>
- </Layouts>
- </Div>
- <Grid id="grd_detllotlist" taborder="4" useinputpanel="false" position="absolute 690 97 1256 805" autofittype="col" anchor="top right bottom" binddataset="ds_grid_grd_detllotlist" selecttype="cell" cellsizingtype="col">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="30"/>
- <Column size="30"/>
- <Column size="70"/>
- <Column size="130"/>
- <Column size="150"/>
- <Column size="150"/>
- <Column size="0"/>
- <Column size="150"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox"/>
- <Cell col="2" text="검사코드"/>
- <Cell col="3" text="검사명"/>
- <Cell col="4" text="Reagent Lot"/>
- <Cell col="5" text="Calibrator Lot"/>
- <Cell col="6" text="Control Material Lot"/>
- <Cell col="7" text="Control Material Lot"/>
- </Band>
- <Band id="body">
- <Cell style="background:EXPR(lf_chngBgColor(currow));background2:EXPR(lf_chngBgColor(currow));" expr="expr:currow+1"/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox" style="background:EXPR(lf_chngBgColor(currow));background2:EXPR(lf_chngBgColor(currow));" text="bind:chk"/>
- <Cell col="2" style="background:EXPR(lf_chngBgColor(currow));background2:EXPR(lf_chngBgColor(currow));" text="bind:testcd"/>
- <Cell col="3" style="align:left middle;background:EXPR(lf_chngBgColor(currow));background2:EXPR(lf_chngBgColor(currow));" text="bind:testnm"/>
- <Cell col="4" style="background:EXPR(lf_chngBgColor(currow));background2:EXPR(lf_chngBgColor(currow));" text="bind:reaglot"/>
- <Cell col="5" style="background:EXPR(lf_chngBgColor(currow));background2:EXPR(lf_chngBgColor(currow));" text="bind:calilot"/>
- <Cell col="6" style="background:EXPR(lf_chngBgColor(currow));background2:EXPR(lf_chngBgColor(currow));"/>
- <Cell col="7" style="background:EXPR(lf_chngBgColor(currow));background2:EXPR(lf_chngBgColor(currow));" text="bind:contlot"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Grid id="grd_lotlist" taborder="5" useinputpanel="false" position="absolute 0 97 681 805" autofittype="col" anchor="all" binddataset="ds_grid_grd_lotlist" oncelldblclick="grd_lotlist_oncelldblclick" cellsizingtype="col">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="30"/>
- <Column size="80"/>
- <Column size="100"/>
- <Column size="100"/>
- <Column size="90"/>
- <Column size="90"/>
- <Column size="60"/>
- <Column size="90"/>
- <Column size="80"/>
- <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="Lot 코드"/>
- <Cell col="2" text="Lot 구분"/>
- <Cell col="3" text="Lot 명칭"/>
- <Cell col="4" text="사용시작일자"/>
- <Cell col="5" text="사용종료일자"/>
- <Cell col="6" text="종료키"/>
- <Cell col="7" text="Expire Date"/>
- <Cell col="8" text="Lot번호"/>
- <Cell col="9" text="장비코드"/>
- <Cell col="10" text="부서코드"/>
- </Band>
- <Band id="body">
- <Cell displaytype="image" expr="expr:getRowType(currow) == 2 ?'theme://images/ico_i.png' : (getRowType(currow) == 4 ? 'theme://images/ico_u.png' : (getRowType(currow) == 8 ? 'theme://images/ico_d.png' : 'theme://images/ico_e.png'))"/>
- <Cell col="1" displaytype="text" edittype="text" text="bind:matrcd" editlimit="10"/>
- <Cell col="2" displaytype="combo" edittype="combo" text="bind:matrkindcd" combodataset="ds_matrkindcd" combocodecol="value" combodatacol="label"/>
- <Cell col="3" displaytype="text" edittype="text" text="bind:matrnm"/>
- <Cell col="4" displaytype="date" edittype="date" text="bind:matrfromdd" calendardisplaynulltype="none"/>
- <Cell col="5" displaytype="date" edittype="date" text="bind:matrtodd" calendardisplaynulltype="none"/>
- <Cell col="6" displaytype="text" edittype="text" text="bind:todd"/>
- <Cell col="7" displaytype="date" edittype="date" text="bind:validd"/>
- <Cell col="8" displaytype="text" edittype="text" text="bind:lotno"/>
- <Cell col="9"/>
- <Cell col="10"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="caption1" text="QC Lot 목록" class="tit_2" position="absolute 0 77 102 98"/>
- <Static id="caption2" text="Lot별 검사항목" class="tit_2" position="absolute 690 77 828 97" anchor="top right"/>
- <Button id="btn_end" taborder="6" text="Lot 종료" class="btn2" position="absolute 1067 74 1131 94" anchor="top right" onclick="btn_end_onclick"/>
- <Button id="button1" taborder="7" text="Lot 변경" class="btn2" position="absolute 1133 74 1197 94" anchor="top right" onclick="button1_onclick"/>
- <Button id="btn_addrow" taborder="8" text="행추가" class="btn2" position="absolute 1200 74 1256 94" anchor="top right" onclick="btn_addrow_onclick"/>
- <Button id="btn_save" taborder="9" text="저장" class="btn4" position="absolute 1129 0 1185 20" anchor="top right" onclick="btn_save_onclick"/>
- <Button id="btn_init" taborder="10" text="초기화" class="btn4" position="absolute 1188 0 1256 20" anchor="top right" onclick="btn_init_onclick"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_searchflag" firefirstcount="0" firenextcount="0" useclientlayout="true" 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="value">00</Col>
- <Col id="label">-전체-</Col>
- </Row>
- <Row>
- <Col id="label">[0]Reagent Lot</Col>
- <Col id="value">0</Col>
- </Row>
- <Row>
- <Col id="label">[1]Calibrator Lot</Col>
- <Col id="value">1</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_refflag" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="label" type="STRING" size="256"/>
- <Column id="value" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="label">사용자료</Col>
- <Col id="value">1</Col>
- </Row>
- <Row>
- <Col id="label">전체자료</Col>
- <Col id="value">2</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_lb0000" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cd" type="STRING" size="256"/>
- <Column id="nm" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_lb0111" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cd" type="STRING" size="256"/>
- <Column id="nm" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_lb0701" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cd" type="STRING" size="256"/>
- <Column id="nm" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_grid_grd_lotlist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" onrowposchanged="ds_grid_grd_lotlist_onrowposchanged">
- <ColumnInfo>
- <Column id="status" type="STRING" size="256"/>
- <Column id="matrcd" type="STRING" size="256"/>
- <column id="matrnm" type="STRING" size="256"/>
- <column id="matrfromdd" type="STRING" size="256"/>
- <column id="matrtodd" type="STRING" size="256"/>
- <column id="todd" type="STRING" size="256"/>
- <column id="matrkindcd" type="STRING" size="256"/>
- <column id="validd" type="STRING" size="256"/>
- <column id="lotno" type="STRING" size="256"/>
- <column id="eqmtcd" type="STRING" size="256"/>
- <column id="userdeptcd" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_grid_grd_detllotlist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" onrowposchanged="ds_grid_grd_keyantilist_onrowposchanged">
- <ColumnInfo>
- <Column id="chk" type="STRING" size="256"/>
- <column id="testcd" type="STRING" size="256"/>
- <column id="testnm" type="STRING" size="256"/>
- <column id="reaglot" type="STRING" size="256"/>
- <column id="calilot" type="STRING" size="256"/>
- <column id="contlot" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_matrkindcd" firefirstcount="0" firenextcount="0" useclientlayout="true" 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">[0]Reagent Lot</Col>
- <Col id="value">0</Col>
- </Row>
- <Row>
- <Col id="label">[1]Calibrator Lot</Col>
- <Col id="value">1</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_testlist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="testlist" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Style url="CSS::lis.css"/>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2015-11-13
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2015-11-13 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
-
- include "com_commonxp::comm_main.xjs";
- var endStr = "";
- function SMLQF00900_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMLQF00600_onload(obj:Form, e:LoadEventInfo)
- {
- dsf_createDsRow("ds_temp_search"
- , [{col: "codeflag", val: "0000|0111|0701|"}
- , {col: "basecdid", val: ""}
- , {col: "menuparam", val: ""}]);
-
- var oParam = {};
- oParam.id = "TRLZZ00101";
- oParam.service = "diagtestapplib.DiagTestBaseInfoMngt";
- oParam.method = "reqGetInitCodeInfo";
- oParam.inds = "cond=ds_temp_search";
- oParam.outds = "ds_init_lb0000=0000 ds_init_lb0111=0111 ds_init_lb0701=0701";
- oParam.async = false;
- tranf_submit(oParam);
-
- grp_sea.cbo_execDept.index = 0;
- grp_sea.cbo_eqmtList.index = 0;
-
- grdf_initGrid(grd_detllotlist);
-
- }
- function lf_getLotList() {
- if(grp_sea.cbo_eqmtList.value == "00"){
- sysf_messageBox("장비를", "C002");
- return;
- }
-
- var refflag = grp_sea.cmb_refflag.value;
- var eqmtcd = grp_sea.cbo_eqmtList.value;
- var matrkindcd = grp_sea.cmb_searchflag.value;
- var userdeptcd = ds_init_lb0000.getColumn(0, "nm");
- dsf_createDsRow("ds_temp_search"
- , [{col: "refflag", val: refflag}
- , {col: "eqmtcd", val: eqmtcd}
- , {col: "matrkindcd", val: matrkindcd}
- , {col: "userdeptcd", val: userdeptcd}]);
-
- var oParam = {};
- oParam.id = "TRLQF00901";
- oParam.service = "grademngtbasemngtapp.QCMaterialMngt";
- oParam.method = "reqGetLot";
- oParam.inds = "cond=ds_temp_search";
- oParam.outds = "ds_grid_grd_lotlist=getLotList";
- oParam.async = false;
- oParam.callback = "cf_TRLQF00901";
- tranf_submit(oParam);
- }
- function lf_getDetlLotList(){
- var crrow = ds_grid_grd_lotlist.rowposition;
- var matrcd = ds_grid_grd_lotlist.getColumn(crrow, "matrcd");
- var eqmtcd = ds_grid_grd_lotlist.getColumn(crrow, "eqmtcd");
- var matrtodd = ds_grid_grd_lotlist.getColumn(crrow, "todd");
- var matrfromdd = ds_grid_grd_lotlist.getColumn(crrow, "matrfromdd");
- var matrkindcd = ds_grid_grd_lotlist.getColumn(crrow, "matrkindcd");
- var lotno = ds_grid_grd_lotlist.getColumn(crrow, "lotno");
- var userdeptcd = ds_init_lb0000.getColumn(0, "nm");
- var sInDsName = dsf_createDsRow("ds_temp_search"
- , [{col: "userdeptcd", val: userdeptcd}
- , {col: "lotno", val: lotno}
- , {col: "matrcd", val: matrcd}
- , {col: "eqmtcd", val: eqmtcd}
- , {col: "matrtodd", val: matrtodd}
- , {col: "matrfromdd", val: matrfromdd}
- , {col: "matrkindcd", val: matrkindcd}
- ]);
-
- var oParam = {};
- oParam.id = "TRLQF00902";
- oParam.service = "grademngtbasemngtapp.QCMaterialMngt";
- oParam.method = "reqGetDetlLot";
- oParam.inds = "cond=ds_temp_search";
- oParam.outds = "ds_grid_grd_detllotlist=getDetlLotList";
- oParam.async = false;
- tranf_submit(oParam);
-
- }
- function lf_setLotList() {
- var iMatrcd = grd_lotlist.getBindCellIndex( "body", "matrcd");
- var iMatrkindcd = grd_lotlist.getBindCellIndex( "body", "matrkindcd");
- var iMatrnm = grd_lotlist.getBindCellIndex( "body", "matrnm");
- var iMatrfromdd = grd_lotlist.getBindCellIndex( "body", "matrfromdd");
- var iMatrtodd = grd_lotlist.getBindCellIndex( "body", "matrtodd");
- var iValidd = grd_lotlist.getBindCellIndex( "body", "validd");
- var iLotno = grd_lotlist.getBindCellIndex( "body", "lotno");
-
- var bChkValue= frmf_chkMdtGrid(grd_lotlist,[iMatrcd
- , iMatrkindcd
- , iMatrnm
- , iMatrfromdd
- , iMatrtodd
- , iValidd
- , iLotno]
- ,["Lot코드","Lot구분","Lot명칭","사용시작일","사용종료일","Expire Date","Lot번호"]);
-
- if(bChkValue==false) return;
-
- var testcd = "";
- var count = ds_grid_grd_detllotlist.getCaseCount("chk==1");
- var orgChk = "";
-
- if(count == 0){
- alert("Lot별 검사항목에 선택된 항목이 없습니다");
- return;
- }else{
- for(i = 0; i <ds_grid_grd_detllotlist.rowcount; i++){
-
- if(ds_grid_grd_detllotlist.getColumn(i, "chk") == "1") {
-
- orgChk = ds_grid_grd_detllotlist.getOrgColumn(i, "chk");
-
- if((orgChk == "0")
- &&(iMatrkindcd == "0")
- && (!utlf_isNull(ds_grid_grd_detllotlist.getColumn(i, "reaglot")))) {
- alert("이미 다른 Reagent Lot에 등록되어 있는 항목입니다\n등록하시려면 기존 Lot에서 항목 제외 후 다시 등록하세요");
- ds_grid_grd_detllotlist.rowposition = i;
- return;
- }else if((orgChk == "0")
- &&(iMatrkindcd == "1")
- && (!utlf_isNull(ds_grid_grd_detllotlist.getColumn(i, "calilot")))) {
- alert("이미 다른 Calibrator Lot에 등록되어 있는 항목입니다\n등록하시려면 기존 Lot에서 항목 제외 후 다시 등록하세요");
- ds_grid_grd_detllotlist.rowposition = i;
- return;
- }
- testcd += ds_grid_grd_detllotlist.getColumn(i, "testcd") + "▦";
- }
- }
- }
- ds_testlist.clearData();
- var addRw = ds_testlist.addRow();
- ds_testlist.setColumn(addRw, "testlist", testcd);
- var eqmtcd = grp_sea.cbo_eqmtList.value;
- var userdeptcd = ds_init_lb0000.getColumn(0, "nm");
- ds_grid_grd_lotlist.setColumn(ds_grid_grd_lotlist.rowposition, "eqmtcd", eqmtcd);
- ds_grid_grd_lotlist.setColumn(ds_grid_grd_lotlist.rowposition, "userdeptcd", userdeptcd);
-
- var oParam = {};
- oParam.id = "TXLQF00901";
- oParam.service = "grademngtbasemngtapp.QCMaterialMngt";
- oParam.method = "reqSetLot";
- oParam.inds = "cond=ds_grid_grd_lotlist:U testlist=ds_testlist:U";
- oParam.async = false;
- oParam.callback = "cf_TXLQF00901";
- tranf_submit(oParam);
-
- }
- function cf_TXLQF00901(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- lf_getLotList();
- }
- function lf_setEqmtCd(){
-
- var execdept = grp_sea.cbo_execDept.value; //검사실구분 코드(장비코드앞자리)
- dsf_createDsRow("ds_temp_search"
- , [{col: "codeflag", val: "0701|"}
- , {col: "basecdid", val: execdept}
- , {col: "eqmtcd", val: "00"}]);
-
- var oParam = {};
- oParam.id = "TRLZZ00101";
- oParam.service = "diagtestapplib.DiagTestBaseInfoMngt";
- oParam.method = "reqGetInitCodeInfo";
- oParam.inds = "cond=ds_temp_search";
- oParam.outds = "ds_init_lb0701=0701";
- oParam.async = false;
- tranf_submit(oParam);
-
- }
- function lf_addRow(){
- if(grp_sea.cbo_eqmtList.value == "00"){
- alert("장비를 선택 후 진행하세요");
- return;
- }
- var addRw = ds_grid_grd_lotlist.addRow();
- var orgDt = utlf_getCurrentDate();
- var fromdate = gf_getDate(orgDt, 1); // 시작일자를 다음날로 변경
- var eqmtcd = grp_sea.cbo_eqmtList.value;
- ds_grid_grd_lotlist.setColumn(addRw, "matrfromdd", fromdate);
- ds_grid_grd_lotlist.setColumn(addRw, "matrtodd", "99991231");
- ds_grid_grd_lotlist.setColumn(addRw, "todd", "99991231");
- ds_grid_grd_lotlist.setColumn(addRw, "validd", "99991231");
- ds_grid_grd_lotlist.setColumn(addRw, "eqmtcd", eqmtcd);
-
- lf_getDetlLotList(); // Lot별 검사항목 조회
- }
- function gf_getDate(strDate, diff) {
- if (strDate) {
- var date = gf_str2Date(strDate);
- var d = (new Date(date)).addDate(diff);
- }
- else {
- var d = (new Date).addDate(diff);
- }
- var s = (new Date(d)).getFullYear()
- + (((new Date(d)).getMonth() + 1) + "").padLeft(2, '0')
- + (((new Date(d)).getDate()) + "").padLeft(2, '0');
- return (s);
- }
- // 문자를 날짜로 변환.
- function gf_str2Date(inDate) {
- var date = new Date(parseInt(inDate.substr(0,4)),parseInt(inDate.substr(4,2))-1,parseInt(inDate.substr(6,2)));
- return date;
- }
- //Lot변경
- function lf_addRow2(){
-
- var row = ds_grid_grd_lotlist.rowposition;
- if(row < 0) {
- alert("Lot 변경할 ds_grid_grd_lotlist항목을 선택하세요");
- return;
- }
- ds_grid_grd_lotlist.setColumn(row, "matrtodd", utlf_getCurrentDate());
-
- lf_endLot("chng"); //선택된항목 Lot 종료
- }
- function lf_endLot(str) {
-
- endStr = str;
- var row = ds_grid_grd_lotlist.rowposition;
- if(row < 0) {
- alert("Lot 종료할 항목을 선택하세요");
- return;
- }
-
- var todd = ds_grid_grd_lotlist.getColumn(row, "matrtodd");
- if(toNumber(todd) < toNumber(utlf_getCurrentDate())) {
- alert("이미 종료된 Lot입니다.");
- return;
- }
-
- ds_grid_grd_lotlist.setColumn(ds_grid_grd_lotlist.rowposition, "status", "d"); // delete 상태
-
- var eqmtcd = grp_sea.cbo_eqmtList.value;
- var userdeptcd = ds_init_lb0000.getColumn(0, "nm");
- ds_grid_grd_lotlist.setColumn(row, "eqmtcd", eqmtcd);
- ds_grid_grd_lotlist.setColumn(row, "userdeptcd", userdeptcd);
-
- var oParam = {};
- oParam.id = "TXLQF00902";
- oParam.service = "grademngtbasemngtapp.QCMaterialMngt";
- oParam.method = "reqEndLot";
- oParam.inds = "cond=ds_grid_grd_lotlist:U";
- oParam.async = true;
- oParam.callback = "cf_TXLQF00902";
- tranf_submit(oParam);
- }
- function cf_TXLQF00902(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- lf_getLotList();
- }
- function lf_chngBgColor(curRw){
-
- var rtnColor = "";
- if(ds_grid_grd_detllotlist.getOrgColumn(curRw, "chk")=="1") {
- rtnColor = "#ffcc00";
- }else{
- rtnColor = "transparent";
- }
- return rtnColor;
- }
- function cf_TRLQF00901(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
-
- if(endStr == "chng"){
- var row = ds_grid_grd_lotlist.rowposition;
- var orgDt = utlf_getCurrentDate();
- var fromdate = gf_getDate(orgDt, 1); // 시작일자를 다음날로 변경
- var eqmtcd = grp_sea.cbo_eqmtList.value;
- var addRw = ds_grid_grd_lotlist.addRow();
- ds_grid_grd_lotlist.setColumn(addRw, "eqmtcd", eqmtcd);
- ds_grid_grd_lotlist.setColumn(addRw, "matrcd", ds_grid_grd_lotlist.getColumn(row, "matrcd"));
- ds_grid_grd_lotlist.setColumn(addRw, "matrkindcd", ds_grid_grd_lotlist.getColumn(row, "matrkindcd"));
- ds_grid_grd_lotlist.setColumn(addRw, "matrnm", ds_grid_grd_lotlist.getColumn(row, "matrnm"));
- ds_grid_grd_lotlist.setColumn(addRw, "matrfromdd", fromdate);
- ds_grid_grd_lotlist.setColumn(addRw, "matrtodd", "99991231");
- ds_grid_grd_lotlist.setColumn(addRw, "todd", "99991231");
- ds_grid_grd_lotlist.setColumn(addRw, "validd", "99991231");
- lf_getDetlLotList();
- }
- }
- function grp_sea_btn_ref_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_grid_grd_lotlist.clearData();
- ds_grid_grd_detllotlist.clearData();
- lf_getLotList();
- }
- function grd_lotlist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
- {
- ds_grid_grd_detllotlist.clearData();
- lf_getDetlLotList();
- }
- function btn_addrow_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_addRow();
- }
- function btn_end_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_endLot("end");
- }
- function button1_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_addRow2();
- }
- function btn_init_onclick(obj:Button, e:ClickEventInfo)
- {
- this.reload();
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_setLotList();
- }
- function grp_sea_cbo_execDept_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- lf_setEqmtCd();
- }
- function ds_grid_grd_lotlist_onrowposchanged(obj:Dataset, e:DSRowPosChangeEventInfo)
- {
- if(e.newrow >= 0) {
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|