123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPMNW17000" position="absolute 0 0 807 753" titletext="프로그램 도움말 관리" oninit="SPMNW17000_oninit" onload="SPMNW17000_onload">
- <Layouts>
- <Layout>
- <Button position="absolute 727 711 791 730" id="btn_down" class="btn2" taborder="6" text="다운로드" onclick="btn_down_onclick"/>
- <Div position="absolute 0 25 797 65" align="align:center top;" id="group2" class="div_SA">
- <Layouts>
- <Layout>
- <Static text="조회구분 :" position="absolute 10 13 107 30" id="caption3" class="search_name" anchor="default"/>
- <Combo position="absolute 100 11 200 30" id="cmb_gubun" codecolumn="codecolumn" datacolumn="datacolumn" anchor="default">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn"/>
- <Column id="datacolumn"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">T</Col>
- <Col id="datacolumn">사용Tip</Col>
- </Row>
- <Row>
- <Col id="codecolumn">F</Col>
- <Col id="datacolumn">F&Q</Col>
- </Row>
- <Row>
- <Col id="codecolumn">A</Col>
- <Col id="datacolumn">추가개발사항</Col>
- </Row>
- </Rows>
- </Dataset>
- </Combo>
- <Edit position="absolute 205 11 310 30" id="ipt_scrncd" anchor="default" autoselect="true" autoskip="true" onkeyup="group2_ipt_scrncd_onkeyup"/>
- <Shape position="absolute 715 5 721 34" linetype="vertical" id="line1" class="line_4" anchor="default"/>
- <Button position="absolute 728 9 784 31" id="btn_search" class="btn1" text="조회" anchor="default" onclick="group2_btn_search_onclick"/>
- <Button position="absolute 315 14 331 30" id="btn_patSearch" class="icon_search" text="" anchor="default" onclick="group2_btn_patSearch_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Grid position="absolute 0 77 797 402" id="grd_help" binddataset="ds_main_helpinfo_helplist" autoenter="select" autofittype="col" cellsizingtype="both" oncelldblclick="grd_help_oncelldblclick" autosizingtype="both" extendsizetype="row">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="21"/>
- <Column size="80"/>
- <Column size="100"/>
- <Column size="540"/>
- <Column size="30"/>
- <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"/>
- </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="seqno"/>
- <Cell col="6" text="화면코드"/>
- <Cell col="7" text="첨부파일명"/>
- <Cell col="8" text="첨부파일패스"/>
- <Cell col="9" text="작성자"/>
- <Cell col="10" text="작성자ID"/>
- <Cell col="11" text="등록일시"/>
- <Cell col="12" text="수정자"/>
- <Cell col="13" text="수정자아이디"/>
- <Cell col="14" text="수정일시"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" expr="currow+1"/>
- <Cell col="1" displaytype="combo" style="align:center middle;" text="bind:gubun" combodataset="ds_cmb_gubun" combocodecol="value" combodatacol="label" enable="false"/>
- <Cell col="2" text="bind:scrncd"/>
- <Cell col="3" style="align:left middle;padding:3 3 3 3;" text="bind:content" autosizerow="limitmin"/>
- <Cell col="4" text="bind:attyn"/>
- <Cell col="5" text="bind:seqno"/>
- <Cell col="6" text="bind:attfilenm"/>
- <Cell col="7" text="bind:attfilepath"/>
- <Cell col="8" text="bind:fstrgstrnm"/>
- <Cell col="9" text="bind:fstrgstrid"/>
- <Cell col="10" text="bind:fstrgstdt" mask="yyyy/mm/dd hh:nn"/>
- <Cell col="11" text="bind:lastupdtrnm"/>
- <Cell col="12" text="bind:lastupdtrid"/>
- <Cell col="13" text="bind:lastupdtdt" mask="yyyy/mm/dd hh:nn"/>
- <Cell col="14" text="bind:delyn"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Shape position="absolute 0 72 797 78" linetype="horizontal" id="line2" class="line_10"/>
- <Shape position="absolute 0 458 798 464" linetype="horizontal" id="line20" class="line_2"/>
- <Shape position="absolute 0 706 650 712" linetype="horizontal" id="line3" class="line_2"/>
- <Shape position="absolute 0 729 650 735" linetype="horizontal" id="line4" class="line_2"/>
- <Button position="absolute 561 407 625 426" id="btn_cancel" class="btn2" taborder="5" visible="false" text="작성취소" onclick="btn_cancel_onclick"/>
- <Button position="absolute 626 407 668 426" id="btn_new" class="btn2" taborder="5" text="신규" onclick="btn_new_onclick"/>
- <Button position="absolute 669 407 711 426" id="btn_mod" class="btn2" taborder="5" text="수정" onclick="btn_mod_onclick"/>
- <Button position="absolute 712 407 754 426" id="btn_save" class="btn5" enable="false" taborder="5" text="저장" onclick="btn_save_onclick"/>
- <Button position="absolute 755 407 797 426" id="btn_del" class="btn5" enable="false" text="삭제" onclick="btn_del_onclick"/>
- <Static text="도움말" position="absolute 0 462 79 707" align="align:center middle;" id="cap_cnts" class="cell_1"/>
- <Static text="첨부" position="absolute 0 710 79 730" align="align:center middle;" id="caption12" class="cell_1"/>
- <Edit position="absolute 81 711 655 730" id="ipt_attfilenm"/>
- <Button position="absolute 705 711 747 730" id="btn_fileadd" class="btn2" visible="false" text="첨부" onclick="btn_fileadd_onclick"/>
- <Button position="absolute 751 711 793 730" id="btn_filedel" class="btn2" visible="false" text="삭제" onclick="btn_filedel_onclick"/>
- <Static text="화면코드" position="absolute 0 432 79 459" align="align:center middle;" id="cap_titl" class="cell_1"/>
- <Shape position="absolute 0 427 798 433" linetype="horizontal" id="line9" class="line_10"/>
- <Static text="내용" position="absolute 0 411 135 434" id="caption7" class="tit_2"/>
- <TextArea position="absolute 82 462 798 707" id="ipt_content" class="text_essential" enable="false" taborder="2" wordwrap="word" acceptstab="true" autoselect="true"/>
- <Button position="absolute 659 711 723 730" id="btn_preview" class="btn2" taborder="6" visible="false" text="미리보기" onclick="btn_preview_onclick"/>
- <Static text="구분" position="absolute 465 432 544 458" align="align:center middle;" id="caption5" class="cell_1"/>
- <Edit position="absolute 81 435 440 454" id="ipt_scrncd2" class="text_essential"/>
- <Button position="absolute 444 436 460 452" id="btn_patSearch2" class="icon_search" text="" onclick="btn_patSearch2_onclick"/>
- <Combo position="absolute 550 435 797 454" id="cmb_gubun2" codecolumn="codecolumn" datacolumn="datacolumn">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn"/>
- <Column id="datacolumn"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">T</Col>
- <Col id="datacolumn">사용Tip</Col>
- </Row>
- <Row>
- <Col id="codecolumn">F</Col>
- <Col id="datacolumn">F&Q</Col>
- </Row>
- <Row>
- <Col id="codecolumn">A</Col>
- <Col id="datacolumn">추가개발사항</Col>
- </Row>
- </Rows>
- </Dataset>
- </Combo>
- <Static id="caption6" text="프로그램 도움말 관리" class="tit_1" position="absolute 0 0 206 25"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="gubun" type="STRING" size="256"/>
- <Column id="todd" type="STRING" size="256"/>
- <Column id="fromdd" type="STRING" size="256"/>
- <Column id="scrncd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="gubun">T</Col>
- <Col id="todd"/>
- <Col id="fromdd"/>
- <Col id="scrncd"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_helpinfo_helplist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="chkyn" type="STRING" size="256" sumtext="체크여부"/>
- <Column id="seqno" type="STRING" size="256" sumtext="게시글번호"/>
- <Column id="scrncd" type="STRING" size="256" sumtext="화면코드"/>
- <Column id="content" type="STRING" size="256" sumtext="내용"/>
- <Column id="attyn" type="STRING" size="256" sumtext="첨부파일유무"/>
- <Column id="attfilenm" type="STRING" size="256" sumtext="첨부파일명"/>
- <Column id="attfilepath" type="STRING" size="256" sumtext="첨부파일패스"/>
- <Column id="fstrgstrnm" type="STRING" size="256" sumtext="등록자명"/>
- <Column id="fstrgstrid" type="STRING" size="256" sumtext="등록자아이디"/>
- <Column id="fstrgstdt" type="STRING" size="256" sumtext="등록일시"/>
- <Column id="lastupdtrnm" type="STRING" size="256" sumtext="수정자명"/>
- <Column id="lastupdtrid" type="STRING" size="256" sumtext="수정자아이디"/>
- <Column id="lastupdtdt" type="STRING" size="256" sumtext="수정일시"/>
- <Column id="delyn" type="STRING" size="256" sumtext="삭제유무"/>
- <Column id="gubun" type="STRING" size="256" sumtext="구분"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_cmb_gubun" 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">사용Tip</Col>
- <Col id="value">T</Col>
- </Row>
- <Row>
- <Col id="label">F&Q</Col>
- <Col id="value">F</Col>
- </Row>
- <Row>
- <Col id="label">추가개발사항</Col>
- <Col id="value">A</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_iteminfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="status" type="STRING" size="256"/>
- <Column id="seqno" type="STRING" size="256"/>
- <Column id="gubun" type="STRING" size="256"/>
- <Column id="scrncd" type="STRING" size="256"/>
- <Column id="content" type="STRING" size="256"/>
- <Column id="attyn" type="STRING" size="256"/>
- <Column id="attfilenm" type="STRING" size="256"/>
- <Column id="attfilepath" type="STRING" size="256"/>
- <Column id="fstrgstrnm" type="STRING" size="256"/>
- <Column id="fstrgstrid" type="STRING" size="256"/>
- <Column id="fstrgstdt" type="STRING" size="256"/>
- <Column id="lastupdtrnm" type="STRING" size="256"/>
- <Column id="lastupdtrid" type="STRING" size="256"/>
- <Column id="lastupdtdt" type="STRING" size="256"/>
- <Column id="delyn" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="status"/>
- <Col id="seqno"/>
- <Col id="gubun"/>
- <Col id="scrncd"/>
- <Col id="content"/>
- <Col id="attyn"/>
- <Col id="attfilenm"/>
- <Col id="attfilepath"/>
- <Col id="fstrgstrnm"/>
- <Col id="fstrgstrid"/>
- <Col id="fstrgstdt"/>
- <Col id="lastupdtrnm"/>
- <Col id="lastupdtrid"/>
- <Col id="lastupdtdt"/>
- <Col id="delyn"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_send_file_bk" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="filenm" type="STRING" size="256" sumtext="파일명"/>
- <Column id="filedata" type="BLOB" size="256" sumtext="파일데이터"/>
- <Column id="filesize" type="STRING" size="256" sumtext="파일크기"/>
- <Column id="filetype" type="STRING" size="256" sumtext="파일종류"/>
- <Column id="file" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_filelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="attfilecnts" type="BLOB" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_file" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="filenm" type="STRING" size="256" sumtext="첨부파일명"/>
- <Column id="filedata" type="BLOB" size="256" sumtext="첨부파일데이터"/>
- <Column id="filesize" type="STRING" size="256" sumtext="첨부파일크기"/>
- <Column id="filetype" type="STRING" size="256" sumtext="파일종류"/>
- <Column id="file" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="group2.cmb_gubun" propid="value" datasetid="ds_main_cond" columnid="gubun"/>
- <BindItem id="item1" compid="group2.ipt_scrncd" propid="value" datasetid="ds_main_cond" columnid="scrncd"/>
- <BindItem id="item2" compid="ipt_scrncd2" propid="value" datasetid="ds_main_iteminfo" columnid="scrncd"/>
- <BindItem id="item3" compid="cmb_gubun2" propid="value" datasetid="ds_main_iteminfo" columnid="gubun"/>
- <BindItem id="item4" compid="ipt_content" propid="value" datasetid="ds_main_iteminfo" columnid="content"/>
- <BindItem id="item5" compid="ipt_attfilenm" propid="value" datasetid="ds_main_iteminfo" columnid="attfilenm"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2017-02-14
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2017-02-14 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- var arErrorCode = new HashArray();
- function SPMNW17000_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SPMNW17000_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_help);
-
- fInitialize();
- }
- function fInitialize()
- {
- fgetHelpList();
- }
- function fgetHelpList()
- {
- ds_send.copyData(ds_main_cond);
-
- btn_new.enable = true;
- btn_cancel.visible = false;
-
- ipt_content.enable = false;
- btn_fileadd.visible = false;
- btn_filedel.visible = false;
- btn_down.visible = false;
- btn_preview.visible = false;
-
- cmb_gubun2.enable = false;
-
- btn_mod.enable = false;
- btn_save.enable = false;
- btn_del.enable = false;
- ipt_scrncd2.enable = false;
- ipt_attfilenm.enable = false;
-
- dsf_makeValue(ds_main_iteminfo, "status", "string", "e");
-
- var fromdd = ds_main_cond.getColumn(0, "fromdd");
- var todd = ds_main_cond.getColumn(0, "todd");
-
- ds_main_helpinfo_helplist.clearData();
- ds_main_iteminfo.clearData();
- ds_main_iteminfo.addRow();
-
- var oParam = {};
- oParam.id = "TRMNW17000";
- oParam.service = "wardcareapp.WardCareMngt";
- oParam.method = "reqGetHelpList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_helpinfo_helplist=helplist";
- oParam.async = false;
- //oParam.callback = "cf_TRMNW17000";
- tranf_submit(oParam);
- ds_main_helpinfo_helplist.updatecontrol = false;
- dsf_setFixVal(ds_main_helpinfo_helplist, "chkyn:N");
- ds_main_helpinfo_helplist.updatecontrol = true;
- }
- function group2_ipt_scrncd_onkeyup(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode == 13)
- {
- obj.updateToDataset();
- group2.btn_search.setFocus();
- fgetHelpList();
- }
- }
- function group2_btn_patSearch_onclick(obj:Button, e:ClickEventInfo)
- {
- fScrnCdSearch("scrncd1");
- }
- function fScrnCdSearch(scrncd)
- {
- var btn_scrncd = scrncd;
- var scrncd = frmf_modal("SPZSA20500", "SPZSA20500", "", "", "", "", "", "", "", "", "", "", "M");
-
- if(String(scrncd).length > 0 && !utlf_isNull(scrncd))
- {
- if(btn_scrncd == "scrncd1")
- {
- ds_main_cond.setColumn(0, "scrncd", scrncd);
- }
- else if(btn_scrncd == "scrncd2")
- {
- ds_main_iteminfo.setColumn(0, "scrncd", scrncd);
- }
- }
- }
- function group2_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- fgetHelpList();
- }
- function grd_help_oncelldblclick(obj:Grid, e:GridClickEventInfo)
- {
- fgetHelpDetail(ds_main_helpinfo_helplist.rowposition);
- }
- function fgetHelpDetail(row)
- {
- if (utlf_isNull(row) || row > parseInt(ds_main_helpinfo_helplist.rowcount-1)) return;
- var status = ds_main_iteminfo.getColumn(0, "status");
-
- if (status == "i" || status == "u")
- {
- sysf_messageBox("작성한 글이 저장되지 않았습니다. 저장버튼이나 작성취소 버튼을 눌러주세요.", "I999");
- return;
- }
-
- ds_main_iteminfo.copyRow(0, ds_main_helpinfo_helplist, row);
-
- btn_mod.enable = true;
- btn_del.enable = true;
- ipt_scrncd2.enable = false;
- cmb_gubun2.enable = false;
-
- btn_fileadd.visible = false;
- btn_filedel.visible = false;
- btn_down.visible = true;
-
- if (fCheckFileExt())
- {
- btn_preview.visible = true;
- }
- else
- {
- btn_preview.visible = false;
- }
- }
- function fCheckFileExt()
- {
- retvalue = false;
- var filename = ds_main_iteminfo.getColumn(0, "attfilenm");
- var IMG_FORMAT = "\\.(bmp|gif|jpg|jpeg|png|doc|xls|cvs|txt|ppt|hwp|pptx)$";
- if( (new RegExp(IMG_FORMAT, "i")).test(filename))
- {
- retvalue = true;
- }
- else
- {
- retvalue = false;
- }
- return retvalue;
- }
- function btn_cancel_onclick(obj:Button, e:ClickEventInfo)
- {
- btn_cancel.visible = false;
- btn_new.enable = true;
- btn_mod.enable = false;
- btn_save.enable = false;
- btn_del.enable = false;
- ipt_content.enable = false;
- btn_fileadd.visible = false;
- btn_filedel.visible = false;
- btn_down.visible = false;
- btn_preview.visible = false;
- ipt_scrncd2.enable = false;
- cmb_gubun2.enable = false;
- ipt_attfilenm.enable = false;
- dsf_makeValue(ds_main_iteminfo, "status", "string",'e');
- fNewHelp();
- }
- function fNewHelp()
- {
- ipt_scrncd2.value = "";
- ipt_content.value = "";
- ipt_attfilenm.value = "";
- cmb_gubun2.value="";
-
- ds_send_file.clearData();
- }
- function btn_new_onclick(obj:Button, e:ClickEventInfo)
- {
- btn_cancel.visible = true;
- btn_new.enable = false;
- btn_mod.enable = false;
- btn_save.enable = true;
- btn_del.enable = false;
- ipt_content.enable = true;
-
- btn_fileadd.visible = true;
- btn_filedel.visible = true;
- btn_down.visible = false;
- btn_preview.visible = false;
-
- //ipt_scrncd2.enable = true;
- ipt_attfilenm.enable = false;
- cmb_gubun2.enable = true;
-
- fNewHelp();
- dsf_makeValue(ds_main_iteminfo, "status", "string",'i');
- }
- function btn_mod_onclick(obj:Button, e:ClickEventInfo)
- {
- btn_new.enable = false;
- btn_mod.enable = false;
- btn_cancel.visible = true;
- btn_save.enable = true;
- btn_del.enable = false;
-
- cmb_gubun2.enable = true;
-
- btn_fileadd.visible = true;
- btn_filedel.visible = true;
- btn_down.visible = false;
- btn_preview.visible = false;
-
- //ipt_scrncd2.enable = true;
- ipt_attfilenm.enable = false;
- ipt_content.enable = true;
- dsf_makeValue(ds_main_iteminfo, "status", "string",'u');
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- if(utlf_isNull(String(ds_main_iteminfo.getColumn(0, "scrncd")).getTrim()))
- {
- sysf_messageBox("화면코드 ", "I003");
- ipt_scrncd2.setFocus();
- return;
- }
-
- if(utlf_isNull(cmb_gubun2.value))
- {
- sysf_messageBox("구분은 ", "I003");
- cmb_gubun2.setFocus();
- return;
- }
-
- if(utlf_isNull(String(ds_main_iteminfo.getColumn(0, "content")).getTrim()))
- {
- sysf_messageBox("도움말은 ", "I003");
- ipt_content.setFocus();
- return;
- }
- fExeSave();
- }
- function fExeSave()
- {
- var status = ds_main_iteminfo.getColumn(0, "status");
- var retvalue = false;
- var noteInfoHeader = "status▦seqno▦gubun▦scrncd▦content▦attfilenm▦attfilepath▩";
- var noteInfoData = ds_main_iteminfo.getColumn(0, "status") +"▦"
- + utlf_transNullToEmpty(ds_main_iteminfo.getColumn(0, "seqno")) +"▦"
- + utlf_transNullToEmpty(ds_main_iteminfo.getColumn(0, "gubun")) +"▦"
- + utlf_transNullToEmpty(ds_main_iteminfo.getColumn(0, "scrncd")) +"▦"
- + utlf_transNullToEmpty(ds_main_iteminfo.getColumn(0, "content")) +"▦"
- + utlf_transNullToEmpty(ds_main_iteminfo.getColumn(0, "attfilenm")) +"▦"
- + utlf_transNullToEmpty(ds_main_iteminfo.getColumn(0, "attfilepath")) +"▩";
-
- dsf_setCSVToDs("ds_send_savedata", noteInfoHeader+noteInfoData);
- var oParam = {};
- oParam.id = "TXMNW17000";
- oParam.service = "wardcareapp.WardCareMngt";
- oParam.method = "reqExeSaveHelp";
- oParam.inds = "req=ds_send_savedata file=ds_send_file";
- oParam.outds = "";
- oParam.async = false;
- oParam.callback = "cf_TXMNW17000";
- tranf_submit(oParam);
-
-
- if(arErrorCode.pop("TXMNW17000") > -1)
- {
- retvalue = true;
- }
- else
- {
- retvalue = false;
- }
-
- if(retvalue == false)
- {
- if (status == "i")
- {
- sysf_messageBox("새 게시글 작성에", "E009");
- }
- else if (status == "u")
- {
- sysf_messageBox("새 게시글 수정에", "E009");
- }
- else
- {
- sysf_messageBox("새 게시글 삭제에", "E009");
- }
- }
- else
- {
- if (status == "i")
- {
- sysf_messageBox("새 게시글이 작성이", "I001");
- }
- else if (status == "u")
- {
- sysf_messageBox("게시글이 수정이", "I001");
- }
- else
- {
- sysf_messageBox("게시글이 삭제", "I001");
- }
- fgetHelpList(); // 재조회
- }
- }
- function cf_TXMNW17000(sSvcId, nErrorCode, sErrorMsg)
- {
- arErrorCode.push(sSvcId, nErrorCode);
- if(nErrorCode < 0) return;
- }
- function btn_del_onclick(obj:Button, e:ClickEventInfo)
- {
- fNoticeDel();
- }
- function fNoticeDel()
- {
- var seqno = ds_main_iteminfo.getColumn(0, "seqno");
- if (utlf_isNull(seqno))
- {
- return;
- }
-
- var rtn = sysf_messageBox("게시글을 삭제 하시겠습니까? ", "Q");
-
- if(rtn == "6")
- {
- var userid = sysf_getUserId();
- var writerid = ds_main_iteminfo.getColumn(0, "fstrgstrid");
-
- if (userid == writerid)
- {
- dsf_makeValue(ds_main_iteminfo, "status", "string","d"); // 삭제표시
- fExeSave(); // 저장
- }
- else
- {
- messageBox("작성자만 삭제 ","I006");
- }
- }
- else
- {
- return;
- }
- }
- function btn_patSearch2_onclick(obj:Button, e:ClickEventInfo)
- {
- fScrnCdSearch("scrncd2");
- }
- function btn_preview_onclick(obj:Button, e:ClickEventInfo)
- {
- fFilePreview();
- }
- function fFilePreview()
- {
- var folder;
- var temp_path = "C:\\temp2";
- FSO = inff_fileSystemObject();
-
- if (FSO == null)
- {
- return;
- }
- if (FSO.DriveExists("C") == false)
- {
- return;
- }
-
- if (FSO.FolderExists(temp_path) == false)
- {
- folder = FSO.CreateFolder(temp_path);
- }
- var getfilenm = ds_main_iteminfo.getColumn(0, "attfilenm");
- if(utlf_isNull(getfilenm))
- {
- return;
- }
- var sFileName = getfilenm;
-
- var oParam = {};
- oParam.id = "TRMNW17001";
- oParam.service = "wardcareapp.WardCareMngt";
- oParam.method = "reqExeHelpFileDownLoad";
- oParam.inds = "req=ds_main_iteminfo";
- oParam.outds = "ds_filelist=filelist";
- oParam.async = false;
- //oParam.callback = "cf_TRMNW17001";
- tranf_submit(oParam);
- dsf_readFileFromDs(temp_path+"\\"+getfilenm, ds_filelist, 0, "attfilecnts");
- var objExtCommon = new ExtCommon();
- var rtn = objExtCommon.executeProcess(temp_path+"\\"+sFileName,"","");
- }
- function checkFileSize(fileSize)
- {
- if (fileSize <= 10485760)
- return true;
- else
- return false;
- }
- function btn_fileadd_onclick(obj:Button, e:ClickEventInfo)
- {
- fFileAdd();
- }
- function fFileAdd()
- {
- var maxsize = 10485760;
- var name = ds_main_iteminfo.getColumn(0, "attfilenm");
-
- if(!utlf_isNull(name) || name == '-')
- {
- var fileupdata = sysf_messageBox(name + " 파일 수정을" , "S001");
- if(fileupdata == '6')
- {
- ipt_attfilenm.value = "";
- var fd = new FileDialog;
- files = fd.open("FileOpen", FileDialog.SINGLELOAD);
- if(utlf_isNull(files)) return;
-
- ds_send_file.clearData();
- ds_send_file.addRow();
- var file = dsf_writeFileToDs(files,ds_send_file,0, "filedata");
- filesize = file.filesize;
-
- if (filesize > maxsize){
- sysf_messageBox("파일 크기가 최대치("+maxsize+"Byte)를", "E003");
- }
- dsf_makeValue(ds_main_iteminfo, "attfilenm", "string", file.filename);
- ds_send_file.setColumn(0, "file", file.filename);
- ds_send_file.setColumn(0, "filenm", file.filename);
- ds_send_file.setColumn(0, "filesize", file.filesize);
- ds_send_file.setColumn(0, "filetype", file.filetype);
-
- dsf_makeValue(ds_main_iteminfo, "fileyn", "string", 'Y');
- }
- else if(fileupdata == '7')
- {
- sysf_messageBox(name + " 파일 수정을 하지", "E007");
- dsf_makeValue(ds_main_iteminfo, "fileyn", "string", 'N');
- }
- else
- {
- }
- }
- else
- {
- var fd = new FileDialog;
- files = fd.open("FileOpen", FileDialog.SINGLELOAD);
- if(utlf_isNull(files)) return;
-
- ds_send_file.clearData();
- ds_send_file.addRow();
- var file = dsf_writeFileToDs(files,ds_send_file,0, "filedata");
- filesize = file.filesize;
-
- if (filesize > maxsize){
- sysf_messageBox("파일 크기가 최대치("+maxsize+"Byte)를", "E003");
- }
- if(utlf_isNull(files)){
- ds_main_iteminfo.setColumn(0, "attfilenm", "");
- ds_main_iteminfo.setColumn(0, "attfilepath", "");
- ds_send_file.setColumn(0, "file", "");
- ds_send_file.setColumn(0, "filedata", "");
- ds_send_file.setColumn(0, "filenm", "");
- ds_send_file.setColumn(0, "filesize", "");
- ds_send_file.setColumn(0, "filetype", "");
- }
- else{
- dsf_makeValue(ds_main_iteminfo, "attfilenm", "string", file.filename);
- ds_send_file.setColumn(0, "file", file.filename);
- ds_send_file.setColumn(0, "filenm", file.filename);
- ds_send_file.setColumn(0, "filesize", file.filesize);
- ds_send_file.setColumn(0, "filetype", file.filetype);
- }
-
- dsf_makeValue(ds_main_iteminfo, "fileyn", "string", 'Y');
- }
- }
- function btn_filedel_onclick(obj:Button, e:ClickEventInfo)
- {
- fFileDel();
- }
- function fFileDel()
- {
- var name = ds_main_iteminfo.getColumn(0, "attfilenm");
-
- if(!utlf_isNull(name))
- {
- var fileupdata = sysf_messageBox(name + " 파일 삭제를" , "S001");
- if(fileupdata == '6')
- {
- ipt_attfilenm.value = "";
- ds_send_file.clearData();
- ds_send_file.addRow();
- }
- }
- }
- function btn_down_onclick(obj:Button, e:ClickEventInfo)
- {
- fFileDown();
- }
- function fFileDown()
- {
- var filepath = ds_main_iteminfo.getColumn(0, "attfilepath");
- var filenm = ds_main_iteminfo.getColumn(0, "attfilenm");
-
- var fd = new FileDialog;
- var localfile = fd.open("FileSave", FileDialog.SAVE, "%MYDOCUMENT%", filenm); // 단일 파일 선택
-
- if (!utlf_isNull(localfile)) {
- //dsf_createDsRow("ds_temp", [{col: "filepath", val:filepath }]);
-
- sysf_setErrorMsg(false); //자바단에서 에러발생시 1.0은 오류리턴을 안해서...
-
- var oParam = {};
- oParam.id = "TRMNW17001";
- oParam.service = "wardcareapp.WardCareMngt";
- oParam.method = "reqExeHelpFileDownLoad";
- oParam.inds = "req=ds_main_iteminfo";
- oParam.outds = "ds_filelist=filelist";
- oParam.async = false;
- //oParam.callback = "cf_TRMNW17001";
- tranf_submit(oParam);
- sysf_setErrorMsg(true);
-
- dsf_readFileFromDs(localfile.fullpath, ds_filelist, 0, "attfilecnts"); // 파일저장
-
- var rtn = sysf_messageBox("파일을", "Q004");
- if( rtn == 6 ) {
- var objExtCommon = new ExtCommon();
- var rtn = objExtCommon.executeProcess(localfile.fullpath,"","");
- }
- }
-
- }]]></Script>
- </Form>
- </FDL>
|