123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMAHA03220" position="absolute 0 0 1196 792" titletext="문진코드 관리" oninit="SMAHA03220_oninit" onload="SMAHA03220_onload">
- <Layouts>
- <Layout>
- <Static id="caption6" text="문진코드관리" class="tit_1" position="absolute 0 0 159 25"/>
- <Grid id="grd_answlst" taborder="1" binddataset="ds_main_answlst_item" useinputpanel="false" position="absolute 689 94 1195 762" cellsizingtype="col" anchor="top right bottom" selecttype="multirow" autoenter="key">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="20"/>
- <Column size="50"/>
- <Column size="250"/>
- <Column size="0"/>
- <Column size="60"/>
- <Column size="50"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="100"/>
- </Columns>
- <Rows>
- <Row size="40" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="코드"/>
- <Cell col="2" text="답안"/>
- <Cell col="3" text="영문답안"/>
- <Cell col="4" text="사용여부"/>
- <Cell col="5" text="점수"/>
- <Cell col="6" text="비고입력"/>
- <Cell col="7" text="하위문진사용" wordwrap="word"/>
- <Cell col="8" text="하위문진코드"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" displaytype="text" edittype="text" style="align:left middle;padding:0 0 0 3;" text="bind:answcd" enable="false"/>
- <Cell col="2" displaytype="text" edittype="text" style="align:left middle;padding:0 0 0 3;" text="bind:answnm"/>
- <Cell col="3" displaytype="text" edittype="text" text="bind:answengnm"/>
- <Cell col="4" displaytype="checkbox" edittype="checkbox" text="bind:useyn" expr="expr:useyn == 'Y' ? 1 : 0"/>
- <Cell col="5" displaytype="text" edittype="text" style="align:left middle;padding:0 0 0 3;" text="bind:answpoint" mask="999" maskchar=" "/>
- <Cell col="6" displaytype="checkbox" edittype="checkbox" text="bind:reminptyn" expr="expr:reminptyn == 'Y' ? 1 : 0"/>
- <Cell col="7" displaytype="checkbox" edittype="checkbox" text="bind:infinqryn" expr="expr:infinqryn == 'Y' ? 1 : 0"/>
- <Cell col="8" displaytype="text" edittype="text" style="align:left middle;padding:0 0 0 3;" text="bind:infinqrcd"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Div id="grp_sea" anchor="left top right" taborder="2" class="div_SA" position="absolute 0 25 1195 65">
- <Layouts>
- <Layout>
- <Static id="caption2" text="문진분류 :" class="search_name" position="absolute 316 12 403 29"/>
- <Button id="btn_search" taborder="1" text="조회" class="btn1" position="absolute 1123 10 1179 32" onclick="grp_sea_btn_search_onclick" anchor="top right"/>
- <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1104 10 1110 32" anchor="top right"/>
- <Combo id="cmb_inqrflag" taborder="2" innerdataset="@ds_init_baseinfo_inqrflaglst_G008" codecolumn="cdid" datacolumn="cdnm" class="combo_s_essential" position="absolute 405 11 555 30" onitemchanged="grp_sea_cmb_inqrflag_onitemchanged"/>
- <Static id="caption7" text="적용년도 :" class="search_name" position="absolute 16 12 103 29"/>
- <Combo id="cmb_appyear" taborder="3" innerdataset="@ds_init_baseinfo_yearlist_S900" codecolumn="cdid" datacolumn="cdnm" class="combo_s_essential" position="absolute 105 11 225 30" onitemchanged="grp_sea_cmb_appyear_onitemchanged"/>
- </Layout>
- </Layouts>
- </Div>
- <Static id="caption1" text="문진코드" class="tit_2" position="absolute 0 73 78 95"/>
- <Shape id="line1" class="line_10" position="absolute 0 89 685 95" anchor="left top right"/>
- <Grid id="grd_inqrlst" taborder="3" binddataset="ds_main_inqrlst_item" useinputpanel="false" position="absolute 0 94 685 762" cellsizingtype="col" anchor="all" oncelldblclick="grd_inqrlst_oncelldblclick" treeusecheckbox="false" treeinitstatus="expand,all" selecttype="multirow" autoenter="key">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="22" band="left"/>
- <Column size="0" band="left"/>
- <Column size="70" band="left"/>
- <Column size="89" band="left"/>
- <Column size="86" band="left"/>
- <Column size="70" band="left"/>
- <Column size="250"/>
- <Column size="0"/>
- <Column size="60"/>
- <Column size="50"/>
- <Column size="30"/>
- <Column size="30"/>
- <Column size="30"/>
- <Column size="30"/>
- <Column size="60"/>
- <Column size="80"/>
- <Column size="100"/>
- <Column size="0"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="40" band="head"/>
- <Row size="40"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="lvl"/>
- <Cell col="2" text="적용년도"/>
- <Cell col="3" colspan="2" text="코드" taborder="undefined"/>
- <Cell col="5" text="상위문진코드" wordwrap="word"/>
- <Cell col="6" text="문진내역"/>
- <Cell col="7" text="문진영문내역"/>
- <Cell col="8" text="답안구분"/>
- <Cell col="9" text="성별"/>
- <Cell col="10" text="사용여부" wordwrap="word"/>
- <Cell col="11" text="출력순서" wordwrap="word"/>
- <Cell col="12" text="제목여부" wordwrap="word"/>
- <Cell col="13" text="연령제한" wordwrap="word"/>
- <Cell col="14" text="적용나이"/>
- <Cell col="15" text="기본값"/>
- <Cell col="16" text="비고"/>
- <Cell col="17" text="문진구분"/>
- <Cell col="18" text="TempInqrCd"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" text="bind:lvl"/>
- <Cell col="2" displaytype="combo" style="padding:0 0 0 3;" text="bind:appyear" combodataset="ds_init_baseinfo_yearlist_S900" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
- <Cell col="3" displaytype="tree" edittype="tree" style="padding:0 0 0 3;linetype:onlyhorz;" treestartlevel="1" treelevel="bind:lvl" enable="false"/>
- <Cell col="4" edittype="expr:getRowType(currow) == 2 ? 'text' : 'none'" style="align:left middle;padding:0 0 0 3;" text="bind:inqrcd" editautoselect="true"/>
- <Cell col="5" style="align:left middle;padding:0 0 0 3;" text="bind:supinqrcd"/>
- <Cell col="6" displaytype="text" edittype="text" style="padding:3 3 3 3;" text="bind:inqrnm" wordwrap="word"/>
- <Cell col="7" displaytype="text" edittype="text" text="bind:inqrengnm"/>
- <Cell col="8" displaytype="combo" edittype="expr:getRowType(currow) == 2 ? 'combo' : 'none'" style="padding:0 0 0 3;" text="bind:answflag" combodataset="ds_init_baseinfo_answflaglst_A0066" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
- <Cell col="9" displaytype="combo" edittype="combo" style="padding:0 0 0 3;" text="bind:gndrflag" combodataset="ds_init_baseinfo_gndrlst_P0391" combocodecol="cdid" combodatacol="cdnm"/>
- <Cell col="10" displaytype="checkbox" edittype="checkbox" text="bind:useyn" expr="expr:useyn == 'Y' ? 1 : 0"/>
- <Cell col="11" displaytype="text" edittype="text" text="bind:prntseq"/>
- <Cell col="12" displaytype="checkbox" edittype="checkbox" text="bind:titleyn" expr="expr:titleyn == 'Y' ? 1 : 0"/>
- <Cell col="13" displaytype="checkbox" edittype="checkbox" text="bind:ageyn" expr="expr:ageyn == 'Y' ? 1 : 0"/>
- <Cell col="14" displaytype="text" edittype="text" style="padding:0 0 0 3;" text="bind:appage"/>
- <Cell col="15" displaytype="text" edittype="text" style="padding:0 0 0 3;" text="bind:defltval"/>
- <Cell col="16" displaytype="text" edittype="text" style="padding:3 3 3 3;" text="bind:remark" wordwrap="word"/>
- <Cell col="17" text="bind:inqrflag"/>
- <Cell col="18" text="bind:tempinqrcd"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="caption4" text="선택형답안" class="tit_2" position="absolute 689 73 796 94" anchor="top right"/>
- <Shape id="line2" class="line_10" position="absolute 689 89 1195 95" anchor="top right"/>
- <Button id="btn_grddel" taborder="4" text="행삭제" class="btn2" position="absolute 632 67 685 89" anchor="top right" onclick="btn_grddel_onclick"/>
- <Button id="btn_grdadd" taborder="5" text="문진추가" class="btn2" position="absolute 567 67 631 89" anchor="top right" onclick="btn_grdadd_onclick"/>
- <Button id="btn_ansadd" taborder="6" text="행추가" class="btn2" position="absolute 1088 67 1141 89" anchor="top right" onclick="btn_ansadd_onclick"/>
- <Button id="btn_ansdel" taborder="7" text="행삭제" class="btn2" position="absolute 1142 67 1195 89" anchor="top right" onclick="btn_ansdel_onclick"/>
- <Button id="button1" taborder="8" text="신규문진" class="btn2" position="absolute 502 67 566 89" anchor="top right" onclick="button1_onclick"/>
- <Button id="btn_save" taborder="11" text="문진저장" class="btn4" position="absolute 1033 766 1113 788" anchor="right bottom" onclick="btn_save_onclick"/>
- <Button id="button2" taborder="12" text="답안저장" class="btn4" position="absolute 1115 766 1195 788" anchor="right bottom" onclick="button2_onclick"/>
- <Button id="btn_reorder" taborder="13" text="재정렬" class="btn2" position="absolute 449 67 501 89" anchor="top right" onclick="btn_reorder_onclick"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_init_baseinfo_yearlist_S900" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init_baseinfo_inqrflaglst_G008" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init_baseinfo_answflaglst_A0066" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init_baseinfo_gndrlst_P0391" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_main_inqrlst_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_inqrlst_item_oncolumnchanged">
- <ColumnInfo>
- <Column id="lvl" type="STRING" size="256" sumtext="레벨"/>
- <Column id="appyear" type="STRING" size="256" sumtext="적용년도"/>
- <Column id="inqrcd" type="STRING" size="256" sumtext="문진코드"/>
- <Column id="supinqrcd" type="STRING" size="256" sumtext="상위문진코드"/>
- <Column id="inqrnm" type="STRING" size="256" sumtext="문진명"/>
- <Column id="inqrengnm" type="STRING" size="256" sumtext="문진영문명"/>
- <Column id="answflag" type="STRING" size="256" sumtext="단변구분"/>
- <Column id="gndrflag" type="STRING" size="256" sumtext="성별"/>
- <Column id="titleyn" type="STRING" size="256" sumtext="제목사용여부"/>
- <Column id="useyn" type="STRING" size="256" sumtext="사용여부"/>
- <Column id="ageyn" type="STRING" size="256" sumtext="나이제한여부"/>
- <Column id="appage" type="STRING" size="256" sumtext="적용나이"/>
- <Column id="defltval" type="STRING" size="256" sumtext="기본값"/>
- <Column id="prntseq" type="STRING" size="256" sumtext="출력순서"/>
- <Column id="remark" type="STRING" size="256" sumtext="비고"/>
- <Column id="inqrflag" type="STRING" size="256" sumtext="문진분류"/>
- <Column id="tempinqrcd" type="STRING" size="256" sumtext="임시문진코드"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_main_answlst_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_answlst_item_oncolumnchanged">
- <ColumnInfo>
- <Column id="answcd" type="STRING" size="256" sumtext="답변코드"/>
- <Column id="answnm" type="STRING" size="256" sumtext="답변명"/>
- <Column id="answengnm" type="STRING" size="256" sumtext="답변영문명"/>
- <Column id="infinqryn" type="STRING" size="256" sumtext="하위문진사용여부"/>
- <Column id="infinqrcd" type="STRING" size="256" sumtext="하위문진사용코드"/>
- <Column id="useyn" type="STRING" size="256" sumtext="사용여부"/>
- <Column id="reminptyn" type="STRING" size="256" sumtext="비고입력여부"/>
- <Column id="answpoint" type="INT" size="256" sumtext="답변점수"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="srchappyear" type="STRING" size="256"/>
- <Column id="srchinqrflag" type="STRING" size="256"/>
- <Column id="ansinqrcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="srchappyear"/>
- <Col id="srchinqrflag"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_answinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="inqrflag" type="STRING" size="256"/>
- <Column id="inqrcd" type="STRING" size="256"/>
- <Column id="appyear" type="STRING" size="256"/>
- <Column id="answflag" type="STRING" size="256"/>
- <Column id="saveinqrans" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="inqrflag"/>
- <Col id="inqrcd"/>
- <Col id="appyear"/>
- <Col id="answflag"/>
- <Col id="saveinqrans"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_save_saveinqrcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_send_answinfo_saveinqrans" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_sea.cmb_appyear" propid="value" datasetid="ds_send" columnid="srchappyear"/>
- <BindItem id="item1" compid="grp_sea.cmb_inqrflag" propid="value" datasetid="ds_send" columnid="srchinqrflag"/>
- </Bind>
- <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";
- include "ast_healexamxp::AHA001.xjs";
- include "ast_healthexambasexp::healcombolist.xjs";
- var arErrorCode = new HashArray();
- function SMAHA03220_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMAHA03220_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_inqrlst);
- grdf_setRowTypeIcon(grd_inqrlst, 0);
- grdf_initGrid(grd_answlst);
- grdf_setRowTypeIcon(grd_answlst, 0);
-
- grp_sea.btn_search.enable = frmf_checkAuth("R") ;
- btn_save.enable = frmf_checkAuth("X") ;
- fGetBasicCode();
- fInit();
- }
- function fGetBasicCode()
- {
- var arrParam = [{dsNm: "ds_init_baseinfo_answflaglst_A0066", cdGrpId: "A0066"}
- ,{dsNm: "ds_init_baseinfo_gndrlst_P0391", cdGrpId: "P0391"}]
- appf_getCodeList(arrParam);
-
- var arrParam = [{dsNm: "ds_init_baseinfo_inqrflaglst_G008", cdGrpId: "G008"}
- ,{dsNm: "ds_init_baseinfo_yearlist_S900", cdGrpId: "S900"}];
- healGetCodeList(arrParam);
- }
- function fInit()
- {
- var cur_year = fGetCurrentYear();
- grp_sea.cmb_appyear.value = cur_year;
- }
- function fGetCurrentYear()
- {
- return utlf_getNewDate().getFullYear();
- }
- function grp_sea_cmb_appyear_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- grp_sea.btn_search.click();
- }
- function grp_sea_cmb_inqrflag_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- grp_sea.btn_search.click();
- }
- function grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- fGetAssoInqrList();
- }
- function fGetAssoInqrList()
- {
- var oParam = {};
- oParam.id = "TRAHA03162";
- oParam.service = "healthexambaseapp.InqrCode";
- oParam.method = "reqGetAssoInqrCdList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_inqrlst_item=item";
- oParam.async = false;
- //oParam.callback = "cf_TRAHA03162";
- tranf_submit(oParam);
- }
- function cf_submit(sSvcId, nErrorCode, sErrorMsg)
- {
- arErrorCode.push(sSvcId, nErrorCode);
- if(nErrorCode < 0) return;
- }
- function ds_main_inqrlst_item_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid == "useyn")
- {
- obj.setColumn(e.row, "useyn", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
- }
- if(e.columnid == "titleyn")
- {
- obj.setColumn(e.row, "titleyn", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
- }
- if(e.columnid == "ageyn")
- {
- obj.setColumn(e.row, "ageyn", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
- }
- if(e.columnid == "inqrcd")
- {
- var level = obj.getColumn(e.row, "lvl");
- var inqrCd = e.newvalue;
- var tempInqrCd = obj.getColumn(e.row, "tempinqrcd");
-
- if(utlf_isNull(tempInqrCd))
- {
- obj.setColumn(e.row, "tempinqrcd", inqrCd);
- }
- else
- {
- for(var i = 0; i < obj.rowcount; i++)
- {
- var desLevel = obj.getColumn(i, "lvl");
- var supInqrCd = obj.getColumn(i, "supinqrcd");
- if(tempInqrCd == supInqrCd && (parseInt(level) + 1) == parseInt(level))
- {
- obj.setColumn(i, "supinqrcd", inqrCd);
- }
- }
- obj.setColumn(e.row, "tempinqrcd", inqrCd);
- }
- }
- }
- function grd_inqrlst_oncelldblclick(obj:Grid, e:GridClickEventInfo)
- {
- var selRow = ds_main_inqrlst_item.rowposition;
- ds_send_answinfo.setColumn(0, "inqrflag", ds_main_inqrlst_item.getColumn(selRow, "inqrflag"));
- ds_send_answinfo.setColumn(0, "inqrcd", ds_main_inqrlst_item.getColumn(selRow, "inqrcd"));
- ds_send_answinfo.setColumn(0, "appyear", ds_main_inqrlst_item.getColumn(selRow, "appyear"));
- ds_send_answinfo.setColumn(0, "answflag", ds_main_inqrlst_item.getColumn(selRow, "answflag"));
-
- var oParam = {};
- oParam.id = "TRAHA03162";
- oParam.service = "healthexambaseapp.InqrCode";
- oParam.method = "reqGetAssoAnswCdList";
- oParam.inds = "req=ds_send_answinfo";
- oParam.outds = "ds_main_answlst_item=item";
- oParam.async = false;
- //oParam.callback = "cf_TRAHA03162";
- tranf_submit(oParam);
- }
- function ds_main_answlst_item_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid == "useyn")
- {
- obj.setColumn(e.row, "useyn", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
- }
- if(e.columnid == "reminptyn")
- {
- obj.setColumn(e.row, "reminptyn", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
- }
- if(e.columnid == "infinqryn")
- {
- obj.setColumn(e.row, "infinqryn", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
- }
- }
- function button1_onclick(obj:Button, e:ClickEventInfo)
- {
- fSetNewInqr();
- }
- function fSetNewInqr()
- {
- var cur_year = fGetCurrentYear();
- var inqrFlag = fGetInqrFlag();
- var addRow = fGetGrdAddRow(grd_inqrlst , false);
-
- if(utlf_isNull(inqrFlag))
- {
- sysf_messageBox("문진분류를 조회" , "I008");
- return;
- }
- //var addRow = ds_main_inqrlst_item.addRow();
- ds_main_inqrlst_item.insertRow(addRow);
- ds_main_inqrlst_item.setColumn(addRow , "lvl", "1");
- ds_main_inqrlst_item.setColumn(addRow , "appyear", cur_year);
- ds_main_inqrlst_item.setColumn(addRow , "inqrflag", inqrFlag);
- }
- function fGetInqrFlag()
- {
- var inqrFlag = ds_send.getColumn(0, "srchinqrflag");
- return inqrFlag;
- }
- function fGetGrdAddRow(vGrd , vAddFlag)
- {
- if(utlf_isNull(vGrd)) return;
- if(utlf_isNull(vAddFlag)) vAddFlag = true;
- var addRow = 0;
-
- if(vAddFlag == true)
- {
- addRow = this.objects[vGrd.binddataset].rowposition + 1;
- }
- else if(vAddFlag == false)
- {
- var cRow = this.objects[vGrd.binddataset].rowposition;
- var nRow = this.objects[vGrd.binddataset].findRowExpr("lvl == 1", cRow+1);
- addRow = nRow;
- }
- return addRow;
- }
- function btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
- {
- fSetAddInqr();
- }
- function fSetAddInqr()
- {
- var cur_year = fGetCurrentYear();
- var inqrFlag = fGetInqrFlag();
- var addRow = fGetGrdAddRow(grd_inqrlst , true);
-
- if(utlf_isNull(inqrFlag))
- {
- sysf_messageBox("문진분류를 조회" , "I008");
- return;
- }
-
- var level = ds_main_inqrlst_item.getColumn(ds_main_inqrlst_item.rowposition, "lvl");
- var tempInqrCd = ds_main_inqrlst_item.getColumn(ds_main_inqrlst_item.rowposition, "tempinqrcd");
-
- if(level == "1" || level == "2")
- {
- if(utlf_isNull(tempInqrCd))
- {
- sysf_messageBox("문진코드를" , "C001");
- return;
- }
-
- ds_main_inqrlst_item.insertRow(addRow);
- ds_main_inqrlst_item.setColumn(addRow, "lvl", parseInt(level) +1);
- ds_main_inqrlst_item.setColumn(addRow, "appyear", cur_year);
- ds_main_inqrlst_item.setColumn(addRow, "inqrflag", inqrFlag);
- ds_main_inqrlst_item.setColumn(addRow, "supinqrcd", tempInqrCd);
- }
- else if(level == "3")
- {
- sysf_messageBox("하위메뉴를 생성 할 수 ", "E001");
- return;
- }
- }
- function btn_grddel_onclick(obj:Button, e:ClickEventInfo)
- {
- var rows = grdf_getSelectedRows(grd_inqrlst);
- for(var i = rows.length-1; i >= 0; i--)
- {
- var m_row = rows[i];
- if(ds_main_inqrlst_item.getRowType(m_row) == 2)
- {
- ds_main_inqrlst_item.deleteRow(m_row);
- }
- else
- {
- ds_main_inqrlst_item.updatecontrol = false;
- ds_main_inqrlst_item.setRowType(m_row, "d");
- ds_main_inqrlst_item.updatecontrol = true;
- }
- }
- }
- function btn_ansadd_onclick(obj:Button, e:ClickEventInfo)
- {
- fNewAnswCd();
- }
- function fNewAnswCd()
- {
- var answFlag = ds_send_answinfo.getColumn(0, "answflag");
- if(answFlag == "O")
- {
- ds_main_answlst_item.addRow();
- }
- else
- {
- sysf_messageBox("문진의 답안구분을", "I007");
- return;
- }
- }
- function btn_ansdel_onclick(obj:Button, e:ClickEventInfo)
- {
- var rows = grdf_getSelectedRows(grd_answlst);
- for(var i = rows.length-1; i >= 0; i--)
- {
- var m_row = rows[i];
- if(ds_main_answlst_item.getRowType(m_row) == 2)
- {
- ds_main_answlst_item.deleteRow(m_row);
- }
- else
- {
- ds_main_answlst_item.updatecontrol = false;
- ds_main_answlst_item.setRowType(m_row, "d");
- ds_main_answlst_item.updatecontrol = true;
- }
- }
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- fSaveAssoInqrCd();
- }
- function fSaveAssoInqrCd()
- {
- var rtnFlag = false;
-
- for(var i = 0; i < ds_main_inqrlst_item.rowcount; i++ )
- {
- var answFlag = ds_main_inqrlst_item.getColumn(i, "answflag");
- var gndrFlag = ds_main_inqrlst_item.getColumn(i, "gndrflag");
- var ageYn = ds_main_inqrlst_item.getColumn(i, "ageyn");
- var appAge = ds_main_inqrlst_item.getColumn(i, "appage");
-
- if(utlf_isNull(answFlag))
- {
- sysf_messageBox("답안구분은" , "I003");
- rtnFlag = true;
- break;
- }
-
- if(utlf_isNull(gndrFlag))
- {
- sysf_messageBox("성별구분은" , "I003");
- rtnFlag = true;
- break;
- }
- if(ageYn == "Y")
- {
- if(utlf_isNull(appAge))
- {
- sysf_messageBox("적용 나이를 " , "C001");
- rtnFlag = true;
- break;
- }
- }
- }
- if(rtnFlag)
- {
- return;
- }
-
- var saveInqr = grdf_getGridUpdateData(grd_inqrlst);
- grdf_setStatusColumn(saveInqr, "m");
- ds_send_save_saveinqrcd.copyData(saveInqr, true);
- if(ds_send_save_saveinqrcd.rowcount == 0)
- {
- sysf_messageBox("저장내역이","E014");
- return;
- }
-
- var oParam = {};
- oParam.id = "TXAHA03161";
- oParam.service = "healthexambaseapp.InqrCode";
- oParam.method = "reqExeAssoInqrCode";
- oParam.inds = "req=ds_send_save_saveinqrcd";
- oParam.outds = "ds_=item";
- oParam.async = false;
- oParam.callback = "cf_submit";
- tranf_submit(oParam);
- if(arErrorCode.pop("TXAHA03161") > -1)
- {
- fGetAssoInqrList();
- }
- }
- function button2_onclick(obj:Button, e:ClickEventInfo)
- {
- fSaveAssoAnswCd();
- }
- function fSaveAssoAnswCd()
- {
- var rtnFlag = false;
-
- for(var i = 0; i < ds_main_answlst_item.rowcount; i++)
- {
- var answCd = ds_main_answlst_item.getColumn(i, "answcd");
- var infInqrYn = ds_main_answlst_item.getColumn(i, "infinqryn");
- var infInqrCd = ds_main_answlst_item.getColumn(i, "infinqrcd");
-
- if(utlf_isNull(answCd))
- {
- sysf_messageBox("답변코드는" , "I003");
- rtnFlag = true;
- break;
- }
- if(infInqrYn == "Y")
- {
- if(utlf_isNull(infInqrCd ))
- {
- sysf_messageBox("하위문진코드를 입력" , "I008");
- rtnFlag = true;
- break;
- }
- }
- }
- if(rtnFlag)
- {
- return;
- }
-
- var saveAnsw = grdf_getGridUpdateData(grd_answlst);
- grdf_setStatusColumn(saveAnsw, "m");
- ds_send_answinfo_saveinqrans.copyData(saveAnsw, true);
- if(ds_send_answinfo_saveinqrans.rowcount == 0)
- {
- sysf_messageBox("저장내역이","E014");
- return;
- }
-
- var oParam = {};
- oParam.id = "TXAHA03161";
- oParam.service = "healthexambaseapp.InqrCode";
- oParam.method = "reqExeAssoAnswCode";
- oParam.inds = "req=ds_send_answinfo saveinqrans=ds_send_answinfo_saveinqrans";
- oParam.outds = "ds_=item";
- oParam.async = false;
- oParam.callback = "cf_submit";
- tranf_submit(oParam);
- if(arErrorCode.pop("TXAHA03161") > -1)
- {
- var oParam = {};
- oParam.id = "TRAHA03162";
- oParam.service = "healthexambaseapp.InqrCode";
- oParam.method = "reqGetAssoAnswCdList";
- oParam.inds = "req=ds_send_answinfo";
- oParam.outds = "ds_main_answlst_item=item";
- oParam.async = false;
- //oParam.callback = "cf_TRAHA03162";
- tranf_submit(oParam);
- }
- }
- function btn_reorder_onclick(obj:Button, e:ClickEventInfo)
- {
- for(var i = 0 ; i < ds_main_inqrlst_item.rowcount ; i++) {
- ds_main_inqrlst_item.setColumn(i, "prntseq", i+1);
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|