123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMLPC02800" position="absolute 0 0 1199 779" titletext="검사항목조회등록" oninit="SMLPC02800_oninit" onload="SMLPC02800_onload">
- <Layouts>
- <Layout>
- <Button id="btn_save" taborder="1" text="저장" class="btn4" position="absolute 1139 14 1195 36" onclick="btn_save_onclick" anchor="top right"/>
- <Static id="caption6" text="검사항목조회등록" onclick="grp_tle_caption6_onclick" class="tit_1" position="absolute 0 0 136 25"/>
- <Static id="caption1" text="대분류" class="tit_2" position="absolute 1 40 60 57"/>
- <Shape id="line1" linetype="horizontal" class="line_1" position="absolute 0 56 190 62" style="strokepen:3 solid #33bbbbff;" anchor="left top"/>
- <Static id="caption3" text="검사코드목록" class="tit_2" position="absolute 720 39 819 56" anchor="left top"/>
- <Grid id="grd_testcdlist" taborder="2" binddataset="ds_grd_testcdlist" useinputpanel="false" position="absolute 720 60 1195 774" autofittype="col" oncellclick="grd_testcdlist_oncellclick" anchor="all" autosizingtype="row" cellsizingtype="row" extendsizetype="row">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="29"/>
- <Column size="30"/>
- <Column size="0"/>
- <Column size="80"/>
- <Column size="200"/>
- <Column size="115"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="선택"/>
- <Cell col="2" text="기관코드"/>
- <Cell col="3" text="검사코드"/>
- <Cell col="4" text="검사코드명"/>
- <Cell col="5" text="검사약칭"/>
- <Cell col="6" text="workflagcd"/>
- <Cell col="7" text="workkindcd"/>
- <Cell col="8" text="delyn"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" text="expr:currow + 1"/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:choi"/>
- <Cell col="2" text="bind:instcd"/>
- <Cell col="3" displaytype="normal" edittype="none" style="align:left;" text="bind:testcd"/>
- <Cell col="4" displaytype="normal" edittype="none" style="align:left middle;" text="bind:testnm" wordwrap="both" autosizerow="limitmin"/>
- <Cell col="5" displaytype="normal" edittype="none" style="align:left middle;" text="bind:testabbr" wordwrap="both" autosizerow="limitmin"/>
- <Cell col="6" text="bind:workflagcd"/>
- <Cell col="7" text="bind:workkindcd"/>
- <Cell col="8" text="bind:delyn"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Shape id="line2" linetype="horizontal" class="line_1" position="absolute 720 56 1195 62" style="strokepen:3 solid #33bbbbff;" anchor="left top right"/>
- <Button id="btn_add" taborder="3" text="행추가" class="btn2" position="absolute 607 35 660 54" onclick="btn_add_onclick" anchor="left top"/>
- <Grid id="grd_lrgcd" taborder="4" binddataset="ds_grd_lrgcd" useinputpanel="false" position="absolute 0 60 190 774" autofittype="col" oncellclick="grd_lrgcd_oncellclick" anchor="left top bottom">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="27"/>
- <Column size="30"/>
- <Column size="120"/>
- <Column size="0"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="선택"/>
- <Cell col="2" text="대분류"/>
- <Cell col="3" text="instcd"/>
- <Cell col="4" text="baseflagcd"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" text="expr:currow + 1"/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:choi"/>
- <Cell col="2" text="bind:baseflagnm"/>
- <Cell col="3" text="bind:instcd"/>
- <Cell col="4" text="bind:baseflagcd"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Grid id="grd_mdlcd" taborder="5" binddataset="ds_grd_mdlcd" useinputpanel="false" position="absolute 195 60 425 774" autofittype="col" oncellclick="grd_mdlcd_oncellclick" anchor="left top bottom">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="27"/>
- <Column size="30"/>
- <Column size="160"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="선택"/>
- <Cell col="2" text="중분류"/>
- <Cell col="3" text="baseflagcd"/>
- <Cell col="4" text="resncd"/>
- <Cell col="5" text="instcd"/>
- <Cell col="6" text="mdlflagcd"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" text="expr:currow + 1"/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:choi"/>
- <Cell col="2" text="bind:resncnts"/>
- <Cell col="3" text="bind:baseflagcd"/>
- <Cell col="4" text="bind:resncd"/>
- <Cell col="5" text="bind:instcd"/>
- <Cell col="6" text="bind:mdlflagcd"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Grid id="grd_smlcd" taborder="6" binddataset="ds_grd_smlcd" useinputpanel="false" position="absolute 430 60 715 774" autofittype="col" oncellclick="grd_smlcd_oncellclick" anchor="left top bottom">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="26"/>
- <Column size="30"/>
- <Column size="170"/>
- <Column size="54"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="선택"/>
- <Cell col="2" text="소분류"/>
- <Cell col="3" text="표시순서"/>
- <Cell col="4" text="baseflagcd"/>
- <Cell col="5" text="resncd"/>
- <Cell col="6" text="instcd"/>
- <Cell col="7" text="smlflagcd"/>
- <Cell col="8" text="delyn"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" text="expr:currow + 1"/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:choi"/>
- <Cell col="2" displaytype="text" edittype="text" text="bind:resncnts"/>
- <Cell col="3" displaytype="text" edittype="text" text="bind:dispseqno"/>
- <Cell col="4" text="bind:baseflagcd"/>
- <Cell col="5" text="bind:resncd"/>
- <Cell col="6" text="bind:instcd"/>
- <Cell col="7" text="bind:smlflagcd"/>
- <Cell col="8" text="bind:delyn"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Div id="group1" taborder="7" visible="false" position="absolute 0 185 1194 220">
- <Layouts>
- <Layout>
- <Shape id="roundrect1" type="roundrectangle" class="roundrect_search" position="absolute 0 0 1194 35"/>
- <Shape id="line14" linetype="vertical" class="line_4" position="absolute 1105 6 1111 28"/>
- <Static id="caption23" text="작업구분 :" class="search_name" position="absolute 15 9 105 26"/>
- <Combo id="cmb_workflag" taborder="7" innerdataset="ds_init_cmb_workflag" codecolumn="baseflagcd" datacolumn="baseflagnm" class="combo_search" position="absolute 108 8 228 27"/>
- <Combo id="cmb_workkind" taborder="8" innerdataset="ds_init_cmb_workkind" codecolumn="resncd" datacolumn="resncnts" class="combo_search" position="absolute 943 8 1093 27"/>
- <Static id="caption2" text="작업유형 :" class="search_name" position="absolute 849 9 939 26"/>
- <Button id="btn_sea" taborder="9" text="조회" class="btn1" position="absolute 1123 7 1179 29"/>
- </Layout>
- </Layouts>
- </Div>
- <Static id="caption4" text="중분류" class="tit_2" position="absolute 195 40 254 56"/>
- <Static id="caption5" text="소분류" class="tit_2" position="absolute 430 40 497 56" anchor="left top"/>
- <Shape id="line3" linetype="horizontal" class="line_1" position="absolute 195 56 425 62" style="strokepen:3 solid #33bbbbff;" anchor="left top"/>
- <Shape id="line4" linetype="horizontal" class="line_1" position="absolute 430 56 715 62" style="strokepen:3 solid #33bbbbff;" anchor="left top"/>
- <Button id="btn_del" taborder="8" text="행삭제" class="btn2" position="absolute 662 35 715 54" onclick="btn_del_onclick" anchor="left top"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_grd_testcdlist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="choi" type="STRING"/>
- <Column id="instcd" type="STRING"/>
- <Column id="testcd" type="STRING"/>
- <Column id="testnm" type="STRING"/>
- <Column id="testabbr" type="STRING"/>
- <Column id="workflagcd" type="STRING"/>
- <Column id="workkindcd" type="STRING"/>
- <Column id="delyn" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_grd_lrgcd" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="choi" type="STRING"/>
- <Column id="baseflagnm" type="STRING"/>
- <Column id="instcd" type="STRING"/>
- <Column id="baseflagcd" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_grd_mdlcd" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="choi" type="STRING"/>
- <Column id="resncnts" type="STRING"/>
- <Column id="baseflagcd" type="STRING"/>
- <Column id="resncd" type="STRING"/>
- <Column id="instcd" type="STRING"/>
- <Column id="mdlflagcd" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_grd_smlcd" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="choi" type="STRING"/>
- <Column id="resncnts" type="STRING"/>
- <Column id="dispseqno" type="STRING"/>
- <Column id="baseflagcd" type="STRING"/>
- <Column id="resncd" type="STRING"/>
- <Column id="instcd" type="STRING"/>
- <Column id="smlflagcd" type="STRING"/>
- <Column id="delyn" type="STRING"/>
- <Column id="mdlflagcd" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_cmb_workflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="baseflagnm" type="STRING"/>
- <Column id="baseflagcd" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_cmb_workkind" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="resncnts" type="STRING"/>
- <Column id="resncd" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_smlcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_testcdlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_testData" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
- <Column id="workflagcd" type="STRING" size="256" sumtext="대분류코드"/>
- <Column id="workkindcd" type="STRING" size="256" sumtext="중소분류"/>
- <Column id="testcd" type="STRING" size="256" sumtext="검사코드"/>
- <Column id="delyn" type="STRING" size="256" sumtext="삭제여부"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <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";
- function SMLPC02800_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMLPC02800_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_lrgcd); //대분류
- grdf_initGrid(grd_mdlcd); //중분류
- grdf_initGrid(grd_smlcd); //소분류
- grdf_initGrid(grd_testcdlist); //검사코드목록
- //grdf_setRowTypeIcon(grd_testcdlist, 0);
-
- //grdf_setRowTypeIcon(grd_smlcd, 1);
- //grdf_setRowTypeIcon(grd_testcdlist, 1);
- //초기화
- fExeInitialize();
- }
- //화면초기화 함수
- function fExeInitialize()
- {
- // 전체 검사코드목록 조회
- dsf_createDsRow("ds_send", [{col: "instcd", val: sysf_getUserInfo("dutplceinstcd")}
- ,{col: "delflagcd", val:"0"}
- ,{col: "workflagcd", val: "-"}
- ,{col: "workkindcd", val: "-"}]);
-
- var oParam = {};
- oParam.id = "TRLPC02804";
- oParam.service = "plgybaseinfomngtapp.BaseFlagCode";
- oParam.method = "reqGetTestCdList";
- oParam.inds = "refData=ds_send";
- oParam.outds = "ds_grd_testcdlist=refrslt";
- oParam.async = false;
- //oParam.callback = "cf_TRLPC02804";
- tranf_submit(oParam);
- //대분류 조회.
- fGetRefData();
- }
- //설정목록 검색 함수
- function fGetRefData()
- {
- dsf_createDsRow("ds_send", [{col: "instcd", val: sysf_getUserInfo("dutplceinstcd")}
- ,{col: "delflagcd", val:"0"}
- ,{col: "frombaseflagcd", val: "ZA"}
- ,{col: "tobaseflagcd", val: "ZZ"}]);
- //submit("TRLPC02801");
- var oParam = {};
- oParam.id = "TRLPC02801";
- oParam.service = "plgybaseinfomngtapp.BaseFlagCode";
- oParam.method = "reqGetLrgCdList";
- oParam.inds = "refData=ds_send";
- oParam.outds = "ds_grd_lrgcd=baseflagcdinfo";
- oParam.async = false;
- //oParam.callback = "cf_TRLPC02801";
- tranf_submit(oParam);
- }
- function fGetMdlData()
- {
-
- var iRowNo = ds_grd_lrgcd.findRow("choi", 1, ds_grd_lrgcd.setColumn(0, "choi"), 1, 1);
- dsf_createDsRow("ds_send", [{col: "instcd", val: sysf_getUserInfo("dutplceinstcd")}
- ,{col: "delflagcd", val: "0"}
- ,{col: "baseflagcd", val: ds_grd_lrgcd.getColumn(iRowNo, "baseflagcd")}
- ,{col: "resncd", val: ds_grd_lrgcd.getColumn(iRowNo, "baseflagcd")}
- ,{col: "seaflag", val: "M"}]);
- //submit("TRLPC02802");
- var oParam = {};
- oParam.id = "TRLPC02802";
- oParam.service = "plgybaseinfomngtapp.BaseFlagCode";
- oParam.method = "reqGetMdlCdList";
- oParam.inds = "refData=ds_send";
- oParam.outds = "ds_grd_mdlcd=baseflagcdinfo";
- oParam.async = false;
- //oParam.callback = "cf_TRLPC02802";
- tranf_submit(oParam);
- }
- //중분류조회
- function fGetSmlData()
- {
- //var iRowNo = grd_mdlcd.findRow("true", 0, grd_mdlcd.colRef("choi"), true, true);
- var iRowNo = ds_grd_mdlcd.findRow("choi", 1);
- //var iRowNo = ds_grd_mdlcd.rowcount;
- dsf_createDsRow("ds_send", [{col: "instcd", val: sysf_getUserInfo("dutplceinstcd")}
- ,{col: "delflagcd", val: "0"}
- ,{col: "baseflagcd", val: ds_grd_mdlcd.getColumn(iRowNo, "baseflagcd")}
- ,{col: "resncd", val: ds_grd_mdlcd.getColumn(iRowNo, "mdlflagcd")}
- ,{col: "seaflag", val: "S"}]);
- //submit("TRLPC02803");
- var oParam = {};
- oParam.id = "TRLPC02803";
- oParam.service = "plgybaseinfomngtapp.BaseFlagCode";
- oParam.method = "reqGetMdlCdList";
- oParam.inds = "refData=ds_send";
- oParam.outds = "ds_grd_smlcd=baseflagcdinfo";
- oParam.async = false;
- //oParam.callback = "cf_TRLPC02803";
- tranf_submit(oParam);
- }
- function fExeDataAddDel(pFlagCd)
- {
- var iRowNo = 0;
- var iSmlCdNo = 1;
- var iCurNo = 1;
- var sUsedYN = "Y";
- var iMaxNo = 1;
- if(pFlagCd == "DEL")
- {
- //행삭제
- //iRowNo = grd_smlcd.findRow("true", 0, grd_smlcd.colRef("choi"), true, true);
- iRowNo = ds_grd_smlcd.findRow("choi", 1);
- if(iRowNo < 0)
- {
- sysf_messageBox("삭제할 소분류 항목을 선택하여 주세요", "I999");
- return;
- }
-
- ds_grd_smlcd.deleteRow(iRowNo);
- fGetTestCdList("CLEAR");
- }
- else if(pFlagCd == "ADD")
- {
- //행추가
- //iRowNo = grd_mdlcd.findRow("true", 0, grd_mdlcd.colRef("choi"), true, true);
- iRowNo = ds_grd_mdlcd.findRow("choi", 1);
-
- if(iRowNo < 0)
- {
- sysf_messageBox("중분류 항목을 선택하여 주세요", "I999");
- return;
- }
- ds_grd_smlcd.addRow();
- // for(var iNo = 1 ; iNo <= getNodesetCount("/root/main/smlcdlist/smlcdinfo") ; iNo++)
- for(var iNo = 0; iNo < ds_grd_smlcd.rowcount; iNo++)
- {
- //iCurNo = Number(model.getValue("/root/main/smlcdlist/smlcdinfo["+ iNo +"]/smlflagcd"));
-
- iCurNo = Number(ds_grd_smlcd.getColumn(iNo, "mdlflagcd"));
- iCurNo = iCurNo + 1;
-
- // //현재값 +1 을 이미 사용하고 있는지 확인한다.
- // for(var iNo2 = 1 ; iNo2 < grd_smlcd.rows ; iNo2++)
- for(var iNo2= 0; iNo2 < ds_grd_smlcd.rowcount; iNo2++)
- {
- // if(iCurNo == Number(model.getValue("/root/main/smlcdlist/smlcdinfo["+ iNo2 +"]/smlflagcd")))
- if(iCurNo == Number(ds_grd_smlcd.getColumn(iNo2, "mdlflagcd")))
- {
-
- sUsedYN = "Y";
- break;
- }
-
- //if(iNo2 == (grd_smlcd.rows-1))
- if(iNo2 == (ds_grd_smlcd.rowcount)-1)
- {
- sUsedYN = "N";
- iSmlCdNo = iCurNo-1;
- }
- }
- if(sUsedYN == "N")
- {
- break;
- }
-
- //맥스 값을 구한다.
- //if(iMaxNo < Number(model.getValue("/root/main/smlcdlist/smlcdinfo["+ iNo +"]/smlflagcd")))
- if(iMaxNo < Number(ds_grd_smlcd.getColumn(iNo, "mdlflagcd")))
- {
- //iMaxNo = Number(model.getValue("/root/main/smlcdlist/smlcdinfo["+ iNo +"]/smlflagcd"));
- iMaxNo = Number(ds_grd_smlcd.getColumn(iNo, "mdlflagcd"));
- }
- //if(iNo == (grd_smlcd.rows-1))
- if(iNo == (ds_grd_smlcd.rowcount)-1)
- {
- iSmlCdNo = iMaxNo;
- }
- }
-
- iSmlCdNo = iSmlCdNo+1;
-
- if(iSmlCdNo > 9)
- {
- //model.setValue("/root/main/smlcdlist/smlcdinfo["+ grd_smlcd.row +"]/smlflagcd", iSmlCdNo);
- ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "mdlflagcd", iSmlCdNo);
- }
- else
- {
- //model.setValue("/root/main/smlcdlist/smlcdinfo["+ grd_smlcd.row +"]/smlflagcd", "0" + iSmlCdNo);
- ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "mdlflagcd", "0"+iSmlCdNo);
- }
- ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "instcd", ds_grd_mdlcd.getColumn(iRowNo, "instcd"));
- ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "baseflagcd", ds_grd_mdlcd.getColumn(iRowNo, "baseflagcd"));
- ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "resncd", ds_grd_mdlcd.getColumn(iRowNo, "mdlflagcd") + ds_grd_smlcd.getColumn(ds_grd_smlcd.rowposition, "mdlflagcd"));
- }
- }
- //중분류조회
- function grd_lrgcd_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- //if(model.getValue("/root/main/lrgcdlist/lrgcdinfo["+ grd_lrgcd.row +"]/choi") == "true")
- if(ds_grd_lrgcd.getColumn(ds_grd_lrgcd.rowposition, "choi") == "1")
- {
- //for(var iRowNo = 1 ; iRowNo < grd_lrgcd.rows ; iRowNo++)
- for(var iRowNo = 1; iRowNo < ds_grd_lrgcd.rowcount; iRowNo++)
- {
- //if(iRowNo != grd_lrgcd.row)
- if(iRowNo != ds_grd_lrgcd.rowposition)
- {
- //model.setValue("/root/main/lrgcdlist/lrgcdinfo["+ iRowNo+"]/choi", "false");
- ds_grd_lrgcd.setColumn(iRowNo, "choi", "false");
- }
- }
- fGetMdlData();
- fGetTestCdList("CLEAR"); //검사코드 클리어
- }
- else
- {
-
- ds_grd_mdlcd.clearData(); //중분류클리어
- ds_grd_smlcd.clearData(); //소분류클리어
- fGetTestCdList("CLEAR"); //검사코드클리어
- }
- }
- //검사코드조회
- function fGetTestCdList(pFlagcd)
- {
- if(pFlagcd == "GET")
- {
- //var iRowNo = ds_grd_smlcd.findRow("true", 0, ds_grd_smlcd.setColumn(0, "choi"), 0, 0);
- var iRowNo = ds_grd_smlcd.findRow("choi", 1);
-
- dsf_createDsRow("ds_send", [{col: "instcd", val: sysf_getUserInfo("dutplceinstcd")}
- ,{col: "workflagcd", val: ds_grd_smlcd.getColumn(iRowNo, "baseflagcd")}
- ,{col: "workkindcd", val: ds_grd_smlcd.getColumn(iRowNo, "resncd")}]);
- }
- else
- {
- dsf_createDsRow("ds_send", [{col: "instcd", val: sysf_getUserInfo("dutplceinstcd")}
- ,{col: "workflagcd", val: "-"}
- ,{col: "workkindcd", val: "-"}]);
- }
- var oParam = {};
- oParam.id = "TRLPC02804";
- oParam.service = "plgybaseinfomngtapp.BaseFlagCode";
- oParam.method = "reqGetTestCdList";
- oParam.inds = "refData=ds_send";
- oParam.outds = "ds_grd_testcdlist=refrslt";
- oParam.async = false;
- //oParam.callback = "cf_TRLPC02804";
- tranf_submit(oParam);
-
- }
- //소분류조회
- function grd_mdlcd_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- //if(model.getValue("/root/main/mdlcdlist/mdlcdinfo["+ grd_mdlcd.row +"]/choi") == "true")
- if(ds_grd_mdlcd.getColumn(ds_grd_mdlcd.rowposition, "choi") == "1")
- {
- //for(var iRowNo = 1 ; iRowNo < grd_mdlcd.rows ; iRowNo++)
- for(var iRowNo = 0; iRowNo < ds_grd_mdlcd.rowcount; iRowNo++)
- {
- if(iRowNo != ds_grd_mdlcd.rowposition)
- {
- //model.setValue("/root/main/mdlcdlist/mdlcdinfo["+ iRowNo+"]/choi", "false");
- ds_grd_mdlcd.setColumn(iRowNo, "choi", "false");
- }
- }
- fGetSmlData();
- fGetTestCdList("CLEAR"); //검사코드 클리어
- }
- else
- {
- //model.removeNodeset("/root/main/smlcdlist/smlcdinfo"); //소분류 클리어
- ds_grd_smlcd.clearData();
- fGetTestCdList("CLEAR"); //검사코드클리어
- }
- }
- function grd_smlcd_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- ds_grd_smlcd.updatecontrol = false;
- if(ds_grd_smlcd.getColumn(ds_grd_smlcd.rowposition, "choi") == "1")
- {
- for(var iRowNo = 0; iRowNo < ds_grd_smlcd.rowcount; iRowNo++)
- {
- if(iRowNo != ds_grd_smlcd.rowposition)
- {
- ds_grd_smlcd.setColumn(iRowNo, "choi", "false");
- }
- }
-
- fGetTestCdList("GET");
- }
- else
- {
- fGetTestCdList("CLEAR"); //검사코드 클리어
- }
- ds_grd_smlcd.updatecontrol = true;
-
- }
- //자료저장 처리 함수
- function fExeRefData()
- {
- var iRowNo = 0;
- var iSmlRowNo = iRowNo =ds_grd_smlcd.findRow("choi", 1);
- var ICnt = 0;
- iRowNo = ds_grd_mdlcd.findRow("choi", 1);
-
- if(iRowNo < 0)
- {
- sysf_messageBox("중분류 항목을 선택하여 주세요", "I999");
- return;
- }
-
- //소분류노드가 없을 경우 삭제만 한다.
- if(ds_grd_smlcd.rowcount <= 0)
- {
- ds_grd_smlcd.addRow();
- ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "instcd", ds_grd_mdlcd.getColumn(iRowNo, "instcd"));
- ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "baseflagcd", ds_grd_mdlcd.getColumn(iRowNo, "baseflagcd"));
- ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "resncd", ds_grd_mdlcd.getColumn(iRowNo, "mdlflagcd"));
- ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "delyn", "Y");
- }
- else
- {
- for(var iNo = 0; iNo < ds_grd_smlcd.rowcount; iNo++)
- {
- grdf_setStatus(grd_smlcd, "insert", iNo);
- }
- }
- //검사코드저장
- //grd_testcdlist.clearStatus();
- for(var iNo = 0; iNo < ds_grd_testcdlist.rowcount; iNo++)
- {
- if(ds_grd_testcdlist.getColumn(iNo, "choi") == "1")
- {
- grdf_setStatus(grd_testcdlist, "insert", iNo);
- ICnt++;
- }
- }
- //선택된 검사목록이 없을 경우
- if(ICnt <= 0)
- {
- ds_grd_testcdlist.setColumn(ds_grd_testcdlist.rowposition, "choi", "true");
- ds_grd_testcdlist.setColumn(ds_grd_testcdlist.rowposition, "delyn", "Y");
- ds_grd_testcdlist.setColumn(ds_grd_testcdlist.rowposition, "instcd", ds_grd_mdlcd.getColumn(iRowNo, "instcd"));
- ds_grd_testcdlist.setColumn(ds_grd_testcdlist.rowposition, "workflagcd", ds_grd_mdlcd.getColumn(iRowNo, "baseflagcd"));
-
- //소분류 항목은 선택되어 있고 검사코드 목록은 선택되어 있지 않을 경우 해당 소1분류 항목의 검사코드를 삭제 하여 준다.
- if(iSmlRowNo > 0)
- {
- ds_grd_testcdlist.setColumn(ds_grd_testcdlist.rowposition, "workkindcd", ds_grd_smlcd.getColumn(iSmlRowNo, "resncd"));
- }
-
- grdf_setStatus(grd_testcdlist, "insert", ds_grd_testcdlist.rowposition);
-
- }
- ds_grd_testcdlist.filterstr = "choi == '1' || choi == 'true'";
- ds_testData.copyData(ds_grd_testcdlist, true);
- ds_grd_testcdlist.filterstr = "";
-
- //return;
- var oParam = {};
- oParam.id = "TXLPC02801";
- oParam.service = "plgybaseinfomngtapp.BaseFlagCode";
- oParam.method = "reqExeSmlCdList";
- oParam.inds = "refData=ds_grd_smlcd testData=ds_testData";
- //oParam.inds = "refData=ds_grd_smlcd:I testData=ds_grd_testcdlist";
- oParam.async = false;
- //oParam.callback = "cf_TXLPC02801";
- tranf_submit(oParam);
- fGetSmlData();
- fGetTestCdList("CLEAR");
- }
- //행추가
- function btn_add_onclick(obj:Button, e:ClickEventInfo)
- {
- fExeDataAddDel("ADD");
- }
- //행삭제
- function btn_del_onclick(obj:Button, e:ClickEventInfo)
- {
- fExeDataAddDel("DEL");
- }
- //저장
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- fExeRefData();
- }
- function grd_testcdlist_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- //if(model.getValue("/root/init/testcodecnts/testcodelist["+ grd_testcdlist.row +"]/choi") == "true")
- if(ds_grd_testcdlist.getColumn(ds_grd_testcdlist.rowposition, "choi") == "1")
- {
- //var iRowNo = grd_smlcd.findRow("true", 0, grd_smlcd.colRef("choi"), true, true);
- var iRowNo = ds_grd_smlcd.findRow("choi", 1);
- if(iRowNo < 0)
- {
- sysf_messageBox("소분류 항목을 선택하여 주세요", "I999");
-
- ds_grd_testcdlist.setColumn(ds_grd_testcdlist.rowposition, "choi", "false");
- return;
- }
- ds_grd_testcdlist.setColumn(ds_grd_testcdlist.rowposition, "workflagcd", ds_grd_smlcd.getColumn(iRowNo, "baseflagcd"));
- ds_grd_testcdlist.setColumn(ds_grd_testcdlist.rowposition, "workkindcd", ds_grd_smlcd.getColumn(iRowNo, "resncd"));
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|