SPMNW17000_프로그램 도움말 관리.xfdl 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPMNW17000" position="absolute 0 0 807 753" titletext="프로그램 도움말 관리" oninit="SPMNW17000_oninit" onload="SPMNW17000_onload">
  5. <Layouts>
  6. <Layout>
  7. <Button position="absolute 727 711 791 730" id="btn_down" class="btn2" taborder="6" text="다운로드" onclick="btn_down_onclick"/>
  8. <Div position="absolute 0 25 797 65" align="align:center top;" id="group2" class="div_SA">
  9. <Layouts>
  10. <Layout>
  11. <Static text="조회구분 :" position="absolute 10 13 107 30" id="caption3" class="search_name" anchor="default"/>
  12. <Combo position="absolute 100 11 200 30" id="cmb_gubun" codecolumn="codecolumn" datacolumn="datacolumn" anchor="default">
  13. <Dataset id="innerdataset">
  14. <ColumnInfo>
  15. <Column id="codecolumn"/>
  16. <Column id="datacolumn"/>
  17. </ColumnInfo>
  18. <Rows>
  19. <Row>
  20. <Col id="codecolumn">T</Col>
  21. <Col id="datacolumn">사용Tip</Col>
  22. </Row>
  23. <Row>
  24. <Col id="codecolumn">F</Col>
  25. <Col id="datacolumn">F&amp;Q</Col>
  26. </Row>
  27. <Row>
  28. <Col id="codecolumn">A</Col>
  29. <Col id="datacolumn">추가개발사항</Col>
  30. </Row>
  31. </Rows>
  32. </Dataset>
  33. </Combo>
  34. <Edit position="absolute 205 11 310 30" id="ipt_scrncd" anchor="default" autoselect="true" autoskip="true" onkeyup="group2_ipt_scrncd_onkeyup"/>
  35. <Shape position="absolute 715 5 721 34" linetype="vertical" id="line1" class="line_4" anchor="default"/>
  36. <Button position="absolute 728 9 784 31" id="btn_search" class="btn1" text="조회" anchor="default" onclick="group2_btn_search_onclick"/>
  37. <Button position="absolute 315 14 331 30" id="btn_patSearch" class="icon_search" text="" anchor="default" onclick="group2_btn_patSearch_onclick"/>
  38. </Layout>
  39. </Layouts>
  40. </Div>
  41. <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">
  42. <Formats>
  43. <Format id="default">
  44. <Columns>
  45. <Column size="21"/>
  46. <Column size="80"/>
  47. <Column size="100"/>
  48. <Column size="540"/>
  49. <Column size="30"/>
  50. <Column size="0"/>
  51. <Column size="0"/>
  52. <Column size="0"/>
  53. <Column size="0"/>
  54. <Column size="0"/>
  55. <Column size="0"/>
  56. <Column size="0"/>
  57. <Column size="0"/>
  58. <Column size="0"/>
  59. <Column size="0"/>
  60. </Columns>
  61. <Rows>
  62. <Row size="24" band="head"/>
  63. <Row size="24"/>
  64. </Rows>
  65. <Band id="head">
  66. <Cell/>
  67. <Cell col="1" text="구분"/>
  68. <Cell col="2" text="화면코드"/>
  69. <Cell col="3" text="도움말"/>
  70. <Cell col="4" text="첨부"/>
  71. <Cell col="5" text="seqno"/>
  72. <Cell col="6" text="화면코드"/>
  73. <Cell col="7" text="첨부파일명"/>
  74. <Cell col="8" text="첨부파일패스"/>
  75. <Cell col="9" text="작성자"/>
  76. <Cell col="10" text="작성자ID"/>
  77. <Cell col="11" text="등록일시"/>
  78. <Cell col="12" text="수정자"/>
  79. <Cell col="13" text="수정자아이디"/>
  80. <Cell col="14" text="수정일시"/>
  81. </Band>
  82. <Band id="body">
  83. <Cell celltype="head" expr="currow+1"/>
  84. <Cell col="1" displaytype="combo" style="align:center middle;" text="bind:gubun" combodataset="ds_cmb_gubun" combocodecol="value" combodatacol="label" enable="false"/>
  85. <Cell col="2" text="bind:scrncd"/>
  86. <Cell col="3" style="align:left middle;padding:3 3 3 3;" text="bind:content" autosizerow="limitmin"/>
  87. <Cell col="4" text="bind:attyn"/>
  88. <Cell col="5" text="bind:seqno"/>
  89. <Cell col="6" text="bind:attfilenm"/>
  90. <Cell col="7" text="bind:attfilepath"/>
  91. <Cell col="8" text="bind:fstrgstrnm"/>
  92. <Cell col="9" text="bind:fstrgstrid"/>
  93. <Cell col="10" text="bind:fstrgstdt" mask="yyyy/mm/dd hh:nn"/>
  94. <Cell col="11" text="bind:lastupdtrnm"/>
  95. <Cell col="12" text="bind:lastupdtrid"/>
  96. <Cell col="13" text="bind:lastupdtdt" mask="yyyy/mm/dd hh:nn"/>
  97. <Cell col="14" text="bind:delyn"/>
  98. </Band>
  99. </Format>
  100. </Formats>
  101. </Grid>
  102. <Shape position="absolute 0 72 797 78" linetype="horizontal" id="line2" class="line_10"/>
  103. <Shape position="absolute 0 458 798 464" linetype="horizontal" id="line20" class="line_2"/>
  104. <Shape position="absolute 0 706 650 712" linetype="horizontal" id="line3" class="line_2"/>
  105. <Shape position="absolute 0 729 650 735" linetype="horizontal" id="line4" class="line_2"/>
  106. <Button position="absolute 561 407 625 426" id="btn_cancel" class="btn2" taborder="5" visible="false" text="작성취소" onclick="btn_cancel_onclick"/>
  107. <Button position="absolute 626 407 668 426" id="btn_new" class="btn2" taborder="5" text="신규" onclick="btn_new_onclick"/>
  108. <Button position="absolute 669 407 711 426" id="btn_mod" class="btn2" taborder="5" text="수정" onclick="btn_mod_onclick"/>
  109. <Button position="absolute 712 407 754 426" id="btn_save" class="btn5" enable="false" taborder="5" text="저장" onclick="btn_save_onclick"/>
  110. <Button position="absolute 755 407 797 426" id="btn_del" class="btn5" enable="false" text="삭제" onclick="btn_del_onclick"/>
  111. <Static text="도움말" position="absolute 0 462 79 707" align="align:center middle;" id="cap_cnts" class="cell_1"/>
  112. <Static text="첨부" position="absolute 0 710 79 730" align="align:center middle;" id="caption12" class="cell_1"/>
  113. <Edit position="absolute 81 711 655 730" id="ipt_attfilenm"/>
  114. <Button position="absolute 705 711 747 730" id="btn_fileadd" class="btn2" visible="false" text="첨부" onclick="btn_fileadd_onclick"/>
  115. <Button position="absolute 751 711 793 730" id="btn_filedel" class="btn2" visible="false" text="삭제" onclick="btn_filedel_onclick"/>
  116. <Static text="화면코드" position="absolute 0 432 79 459" align="align:center middle;" id="cap_titl" class="cell_1"/>
  117. <Shape position="absolute 0 427 798 433" linetype="horizontal" id="line9" class="line_10"/>
  118. <Static text="내용" position="absolute 0 411 135 434" id="caption7" class="tit_2"/>
  119. <TextArea position="absolute 82 462 798 707" id="ipt_content" class="text_essential" enable="false" taborder="2" wordwrap="word" acceptstab="true" autoselect="true"/>
  120. <Button position="absolute 659 711 723 730" id="btn_preview" class="btn2" taborder="6" visible="false" text="미리보기" onclick="btn_preview_onclick"/>
  121. <Static text="구분" position="absolute 465 432 544 458" align="align:center middle;" id="caption5" class="cell_1"/>
  122. <Edit position="absolute 81 435 440 454" id="ipt_scrncd2" class="text_essential"/>
  123. <Button position="absolute 444 436 460 452" id="btn_patSearch2" class="icon_search" text="" onclick="btn_patSearch2_onclick"/>
  124. <Combo position="absolute 550 435 797 454" id="cmb_gubun2" codecolumn="codecolumn" datacolumn="datacolumn">
  125. <Dataset id="innerdataset">
  126. <ColumnInfo>
  127. <Column id="codecolumn"/>
  128. <Column id="datacolumn"/>
  129. </ColumnInfo>
  130. <Rows>
  131. <Row>
  132. <Col id="codecolumn">T</Col>
  133. <Col id="datacolumn">사용Tip</Col>
  134. </Row>
  135. <Row>
  136. <Col id="codecolumn">F</Col>
  137. <Col id="datacolumn">F&amp;Q</Col>
  138. </Row>
  139. <Row>
  140. <Col id="codecolumn">A</Col>
  141. <Col id="datacolumn">추가개발사항</Col>
  142. </Row>
  143. </Rows>
  144. </Dataset>
  145. </Combo>
  146. <Static id="caption6" text="프로그램 도움말 관리" class="tit_1" position="absolute 0 0 206 25"/>
  147. </Layout>
  148. </Layouts>
  149. <Objects>
  150. <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  151. <ColumnInfo>
  152. <Column id="gubun" type="STRING" size="256"/>
  153. <Column id="todd" type="STRING" size="256"/>
  154. <Column id="fromdd" type="STRING" size="256"/>
  155. <Column id="scrncd" type="STRING" size="256"/>
  156. </ColumnInfo>
  157. <Rows>
  158. <Row>
  159. <Col id="gubun">T</Col>
  160. <Col id="todd"/>
  161. <Col id="fromdd"/>
  162. <Col id="scrncd"/>
  163. </Row>
  164. </Rows>
  165. </Dataset>
  166. <Dataset id="ds_main_helpinfo_helplist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  167. <ColumnInfo>
  168. <Column id="chkyn" type="STRING" size="256" sumtext="체크여부"/>
  169. <Column id="seqno" type="STRING" size="256" sumtext="게시글번호"/>
  170. <Column id="scrncd" type="STRING" size="256" sumtext="화면코드"/>
  171. <Column id="content" type="STRING" size="256" sumtext="내용"/>
  172. <Column id="attyn" type="STRING" size="256" sumtext="첨부파일유무"/>
  173. <Column id="attfilenm" type="STRING" size="256" sumtext="첨부파일명"/>
  174. <Column id="attfilepath" type="STRING" size="256" sumtext="첨부파일패스"/>
  175. <Column id="fstrgstrnm" type="STRING" size="256" sumtext="등록자명"/>
  176. <Column id="fstrgstrid" type="STRING" size="256" sumtext="등록자아이디"/>
  177. <Column id="fstrgstdt" type="STRING" size="256" sumtext="등록일시"/>
  178. <Column id="lastupdtrnm" type="STRING" size="256" sumtext="수정자명"/>
  179. <Column id="lastupdtrid" type="STRING" size="256" sumtext="수정자아이디"/>
  180. <Column id="lastupdtdt" type="STRING" size="256" sumtext="수정일시"/>
  181. <Column id="delyn" type="STRING" size="256" sumtext="삭제유무"/>
  182. <Column id="gubun" type="STRING" size="256" sumtext="구분"/>
  183. </ColumnInfo>
  184. </Dataset>
  185. <Dataset id="ds_cmb_gubun" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  186. <ColumnInfo>
  187. <Column id="label" type="STRING" size="256"/>
  188. <Column id="value" type="STRING" size="256"/>
  189. </ColumnInfo>
  190. <Rows>
  191. <Row>
  192. <Col id="label">사용Tip</Col>
  193. <Col id="value">T</Col>
  194. </Row>
  195. <Row>
  196. <Col id="label">F&amp;Q</Col>
  197. <Col id="value">F</Col>
  198. </Row>
  199. <Row>
  200. <Col id="label">추가개발사항</Col>
  201. <Col id="value">A</Col>
  202. </Row>
  203. </Rows>
  204. </Dataset>
  205. <Dataset id="ds_main_iteminfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  206. <ColumnInfo>
  207. <Column id="status" type="STRING" size="256"/>
  208. <Column id="seqno" type="STRING" size="256"/>
  209. <Column id="gubun" type="STRING" size="256"/>
  210. <Column id="scrncd" type="STRING" size="256"/>
  211. <Column id="content" type="STRING" size="256"/>
  212. <Column id="attyn" type="STRING" size="256"/>
  213. <Column id="attfilenm" type="STRING" size="256"/>
  214. <Column id="attfilepath" type="STRING" size="256"/>
  215. <Column id="fstrgstrnm" type="STRING" size="256"/>
  216. <Column id="fstrgstrid" type="STRING" size="256"/>
  217. <Column id="fstrgstdt" type="STRING" size="256"/>
  218. <Column id="lastupdtrnm" type="STRING" size="256"/>
  219. <Column id="lastupdtrid" type="STRING" size="256"/>
  220. <Column id="lastupdtdt" type="STRING" size="256"/>
  221. <Column id="delyn" type="STRING" size="256"/>
  222. </ColumnInfo>
  223. <Rows>
  224. <Row>
  225. <Col id="status"/>
  226. <Col id="seqno"/>
  227. <Col id="gubun"/>
  228. <Col id="scrncd"/>
  229. <Col id="content"/>
  230. <Col id="attyn"/>
  231. <Col id="attfilenm"/>
  232. <Col id="attfilepath"/>
  233. <Col id="fstrgstrnm"/>
  234. <Col id="fstrgstrid"/>
  235. <Col id="fstrgstdt"/>
  236. <Col id="lastupdtrnm"/>
  237. <Col id="lastupdtrid"/>
  238. <Col id="lastupdtdt"/>
  239. <Col id="delyn"/>
  240. </Row>
  241. </Rows>
  242. </Dataset>
  243. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  244. <Dataset id="ds_send_file_bk" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  245. <ColumnInfo>
  246. <Column id="filenm" type="STRING" size="256" sumtext="파일명"/>
  247. <Column id="filedata" type="BLOB" size="256" sumtext="파일데이터"/>
  248. <Column id="filesize" type="STRING" size="256" sumtext="파일크기"/>
  249. <Column id="filetype" type="STRING" size="256" sumtext="파일종류"/>
  250. <Column id="file" type="STRING" size="256"/>
  251. </ColumnInfo>
  252. </Dataset>
  253. <Dataset id="ds_send_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  254. <Dataset id="ds_filelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  255. <ColumnInfo>
  256. <Column id="attfilecnts" type="BLOB" size="256"/>
  257. </ColumnInfo>
  258. </Dataset>
  259. <Dataset id="ds_send_file" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  260. <ColumnInfo>
  261. <Column id="filenm" type="STRING" size="256" sumtext="첨부파일명"/>
  262. <Column id="filedata" type="BLOB" size="256" sumtext="첨부파일데이터"/>
  263. <Column id="filesize" type="STRING" size="256" sumtext="첨부파일크기"/>
  264. <Column id="filetype" type="STRING" size="256" sumtext="파일종류"/>
  265. <Column id="file" type="STRING" size="256"/>
  266. </ColumnInfo>
  267. <Rows>
  268. <Row/>
  269. </Rows>
  270. </Dataset>
  271. </Objects>
  272. <Bind>
  273. <BindItem id="item0" compid="group2.cmb_gubun" propid="value" datasetid="ds_main_cond" columnid="gubun"/>
  274. <BindItem id="item1" compid="group2.ipt_scrncd" propid="value" datasetid="ds_main_cond" columnid="scrncd"/>
  275. <BindItem id="item2" compid="ipt_scrncd2" propid="value" datasetid="ds_main_iteminfo" columnid="scrncd"/>
  276. <BindItem id="item3" compid="cmb_gubun2" propid="value" datasetid="ds_main_iteminfo" columnid="gubun"/>
  277. <BindItem id="item4" compid="ipt_content" propid="value" datasetid="ds_main_iteminfo" columnid="content"/>
  278. <BindItem id="item5" compid="ipt_attfilenm" propid="value" datasetid="ds_main_iteminfo" columnid="attfilenm"/>
  279. </Bind>
  280. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  281. * System Name :
  282. * Job Name :
  283. * Creator :
  284. * Make Date : 2017-02-14
  285. * Description :
  286. *---------------------------------------------------------------------------------------
  287. * Modify Date Modifier Modify Description
  288. *---------------------------------------------------------------------------------------
  289. * 2017-02-14 Live Converter TF->XP
  290. *
  291. *---------------------------------------------------------------------------------------
  292. ****************************************************************************************/
  293. include "com_commonxp::comm_main.xjs";
  294. var arErrorCode = new HashArray();
  295. function SPMNW17000_oninit(obj:Form, e:InitEventInfo)
  296. {
  297. frmf_initForm(obj);
  298. }
  299. function SPMNW17000_onload(obj:Form, e:LoadEventInfo)
  300. {
  301. grdf_initGrid(grd_help);
  302. fInitialize();
  303. }
  304. function fInitialize()
  305. {
  306. fgetHelpList();
  307. }
  308. function fgetHelpList()
  309. {
  310. ds_send.copyData(ds_main_cond);
  311. btn_new.enable = true;
  312. btn_cancel.visible = false;
  313. ipt_content.enable = false;
  314. btn_fileadd.visible = false;
  315. btn_filedel.visible = false;
  316. btn_down.visible = false;
  317. btn_preview.visible = false;
  318. cmb_gubun2.enable = false;
  319. btn_mod.enable = false;
  320. btn_save.enable = false;
  321. btn_del.enable = false;
  322. ipt_scrncd2.enable = false;
  323. ipt_attfilenm.enable = false;
  324. dsf_makeValue(ds_main_iteminfo, "status", "string", "e");
  325. var fromdd = ds_main_cond.getColumn(0, "fromdd");
  326. var todd = ds_main_cond.getColumn(0, "todd");
  327. ds_main_helpinfo_helplist.clearData();
  328. ds_main_iteminfo.clearData();
  329. ds_main_iteminfo.addRow();
  330. var oParam = {};
  331. oParam.id = "TRMNW17000";
  332. oParam.service = "wardcareapp.WardCareMngt";
  333. oParam.method = "reqGetHelpList";
  334. oParam.inds = "req=ds_send";
  335. oParam.outds = "ds_main_helpinfo_helplist=helplist";
  336. oParam.async = false;
  337. //oParam.callback = "cf_TRMNW17000";
  338. tranf_submit(oParam);
  339. ds_main_helpinfo_helplist.updatecontrol = false;
  340. dsf_setFixVal(ds_main_helpinfo_helplist, "chkyn:N");
  341. ds_main_helpinfo_helplist.updatecontrol = true;
  342. }
  343. function group2_ipt_scrncd_onkeyup(obj:Edit, e:KeyEventInfo)
  344. {
  345. if(e.keycode == 13)
  346. {
  347. obj.updateToDataset();
  348. group2.btn_search.setFocus();
  349. fgetHelpList();
  350. }
  351. }
  352. function group2_btn_patSearch_onclick(obj:Button, e:ClickEventInfo)
  353. {
  354. fScrnCdSearch("scrncd1");
  355. }
  356. function fScrnCdSearch(scrncd)
  357. {
  358. var btn_scrncd = scrncd;
  359. var scrncd = frmf_modal("SPZSA20500", "SPZSA20500", "", "", "", "", "", "", "", "", "", "", "M");
  360. if(String(scrncd).length > 0 && !utlf_isNull(scrncd))
  361. {
  362. if(btn_scrncd == "scrncd1")
  363. {
  364. ds_main_cond.setColumn(0, "scrncd", scrncd);
  365. }
  366. else if(btn_scrncd == "scrncd2")
  367. {
  368. ds_main_iteminfo.setColumn(0, "scrncd", scrncd);
  369. }
  370. }
  371. }
  372. function group2_btn_search_onclick(obj:Button, e:ClickEventInfo)
  373. {
  374. fgetHelpList();
  375. }
  376. function grd_help_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  377. {
  378. fgetHelpDetail(ds_main_helpinfo_helplist.rowposition);
  379. }
  380. function fgetHelpDetail(row)
  381. {
  382. if (utlf_isNull(row) || row > parseInt(ds_main_helpinfo_helplist.rowcount-1)) return;
  383. var status = ds_main_iteminfo.getColumn(0, "status");
  384. if (status == "i" || status == "u")
  385. {
  386. sysf_messageBox("작성한 글이 저장되지 않았습니다. 저장버튼이나 작성취소 버튼을 눌러주세요.", "I999");
  387. return;
  388. }
  389. ds_main_iteminfo.copyRow(0, ds_main_helpinfo_helplist, row);
  390. btn_mod.enable = true;
  391. btn_del.enable = true;
  392. ipt_scrncd2.enable = false;
  393. cmb_gubun2.enable = false;
  394. btn_fileadd.visible = false;
  395. btn_filedel.visible = false;
  396. btn_down.visible = true;
  397. if (fCheckFileExt())
  398. {
  399. btn_preview.visible = true;
  400. }
  401. else
  402. {
  403. btn_preview.visible = false;
  404. }
  405. }
  406. function fCheckFileExt()
  407. {
  408. retvalue = false;
  409. var filename = ds_main_iteminfo.getColumn(0, "attfilenm");
  410. var IMG_FORMAT = "\\.(bmp|gif|jpg|jpeg|png|doc|xls|cvs|txt|ppt|hwp|pptx)$";
  411. if( (new RegExp(IMG_FORMAT, "i")).test(filename))
  412. {
  413. retvalue = true;
  414. }
  415. else
  416. {
  417. retvalue = false;
  418. }
  419. return retvalue;
  420. }
  421. function btn_cancel_onclick(obj:Button, e:ClickEventInfo)
  422. {
  423. btn_cancel.visible = false;
  424. btn_new.enable = true;
  425. btn_mod.enable = false;
  426. btn_save.enable = false;
  427. btn_del.enable = false;
  428. ipt_content.enable = false;
  429. btn_fileadd.visible = false;
  430. btn_filedel.visible = false;
  431. btn_down.visible = false;
  432. btn_preview.visible = false;
  433. ipt_scrncd2.enable = false;
  434. cmb_gubun2.enable = false;
  435. ipt_attfilenm.enable = false;
  436. dsf_makeValue(ds_main_iteminfo, "status", "string",'e');
  437. fNewHelp();
  438. }
  439. function fNewHelp()
  440. {
  441. ipt_scrncd2.value = "";
  442. ipt_content.value = "";
  443. ipt_attfilenm.value = "";
  444. cmb_gubun2.value="";
  445. ds_send_file.clearData();
  446. }
  447. function btn_new_onclick(obj:Button, e:ClickEventInfo)
  448. {
  449. btn_cancel.visible = true;
  450. btn_new.enable = false;
  451. btn_mod.enable = false;
  452. btn_save.enable = true;
  453. btn_del.enable = false;
  454. ipt_content.enable = true;
  455. btn_fileadd.visible = true;
  456. btn_filedel.visible = true;
  457. btn_down.visible = false;
  458. btn_preview.visible = false;
  459. //ipt_scrncd2.enable = true;
  460. ipt_attfilenm.enable = false;
  461. cmb_gubun2.enable = true;
  462. fNewHelp();
  463. dsf_makeValue(ds_main_iteminfo, "status", "string",'i');
  464. }
  465. function btn_mod_onclick(obj:Button, e:ClickEventInfo)
  466. {
  467. btn_new.enable = false;
  468. btn_mod.enable = false;
  469. btn_cancel.visible = true;
  470. btn_save.enable = true;
  471. btn_del.enable = false;
  472. cmb_gubun2.enable = true;
  473. btn_fileadd.visible = true;
  474. btn_filedel.visible = true;
  475. btn_down.visible = false;
  476. btn_preview.visible = false;
  477. //ipt_scrncd2.enable = true;
  478. ipt_attfilenm.enable = false;
  479. ipt_content.enable = true;
  480. dsf_makeValue(ds_main_iteminfo, "status", "string",'u');
  481. }
  482. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  483. {
  484. if(utlf_isNull(String(ds_main_iteminfo.getColumn(0, "scrncd")).getTrim()))
  485. {
  486. sysf_messageBox("화면코드 ", "I003");
  487. ipt_scrncd2.setFocus();
  488. return;
  489. }
  490. if(utlf_isNull(cmb_gubun2.value))
  491. {
  492. sysf_messageBox("구분은 ", "I003");
  493. cmb_gubun2.setFocus();
  494. return;
  495. }
  496. if(utlf_isNull(String(ds_main_iteminfo.getColumn(0, "content")).getTrim()))
  497. {
  498. sysf_messageBox("도움말은 ", "I003");
  499. ipt_content.setFocus();
  500. return;
  501. }
  502. fExeSave();
  503. }
  504. function fExeSave()
  505. {
  506. var status = ds_main_iteminfo.getColumn(0, "status");
  507. var retvalue = false;
  508. var noteInfoHeader = "status▦seqno▦gubun▦scrncd▦content▦attfilenm▦attfilepath▩";
  509. var noteInfoData = ds_main_iteminfo.getColumn(0, "status") +"▦"
  510. + utlf_transNullToEmpty(ds_main_iteminfo.getColumn(0, "seqno")) +"▦"
  511. + utlf_transNullToEmpty(ds_main_iteminfo.getColumn(0, "gubun")) +"▦"
  512. + utlf_transNullToEmpty(ds_main_iteminfo.getColumn(0, "scrncd")) +"▦"
  513. + utlf_transNullToEmpty(ds_main_iteminfo.getColumn(0, "content")) +"▦"
  514. + utlf_transNullToEmpty(ds_main_iteminfo.getColumn(0, "attfilenm")) +"▦"
  515. + utlf_transNullToEmpty(ds_main_iteminfo.getColumn(0, "attfilepath")) +"▩";
  516. dsf_setCSVToDs("ds_send_savedata", noteInfoHeader+noteInfoData);
  517. var oParam = {};
  518. oParam.id = "TXMNW17000";
  519. oParam.service = "wardcareapp.WardCareMngt";
  520. oParam.method = "reqExeSaveHelp";
  521. oParam.inds = "req=ds_send_savedata file=ds_send_file";
  522. oParam.outds = "";
  523. oParam.async = false;
  524. oParam.callback = "cf_TXMNW17000";
  525. tranf_submit(oParam);
  526. if(arErrorCode.pop("TXMNW17000") > -1)
  527. {
  528. retvalue = true;
  529. }
  530. else
  531. {
  532. retvalue = false;
  533. }
  534. if(retvalue == false)
  535. {
  536. if (status == "i")
  537. {
  538. sysf_messageBox("새 게시글 작성에", "E009");
  539. }
  540. else if (status == "u")
  541. {
  542. sysf_messageBox("새 게시글 수정에", "E009");
  543. }
  544. else
  545. {
  546. sysf_messageBox("새 게시글 삭제에", "E009");
  547. }
  548. }
  549. else
  550. {
  551. if (status == "i")
  552. {
  553. sysf_messageBox("새 게시글이 작성이", "I001");
  554. }
  555. else if (status == "u")
  556. {
  557. sysf_messageBox("게시글이 수정이", "I001");
  558. }
  559. else
  560. {
  561. sysf_messageBox("게시글이 삭제", "I001");
  562. }
  563. fgetHelpList(); // 재조회
  564. }
  565. }
  566. function cf_TXMNW17000(sSvcId, nErrorCode, sErrorMsg)
  567. {
  568. arErrorCode.push(sSvcId, nErrorCode);
  569. if(nErrorCode < 0) return;
  570. }
  571. function btn_del_onclick(obj:Button, e:ClickEventInfo)
  572. {
  573. fNoticeDel();
  574. }
  575. function fNoticeDel()
  576. {
  577. var seqno = ds_main_iteminfo.getColumn(0, "seqno");
  578. if (utlf_isNull(seqno))
  579. {
  580. return;
  581. }
  582. var rtn = sysf_messageBox("게시글을 삭제 하시겠습니까? ", "Q");
  583. if(rtn == "6")
  584. {
  585. var userid = sysf_getUserId();
  586. var writerid = ds_main_iteminfo.getColumn(0, "fstrgstrid");
  587. if (userid == writerid)
  588. {
  589. dsf_makeValue(ds_main_iteminfo, "status", "string","d"); // 삭제표시
  590. fExeSave(); // 저장
  591. }
  592. else
  593. {
  594. messageBox("작성자만 삭제 ","I006");
  595. }
  596. }
  597. else
  598. {
  599. return;
  600. }
  601. }
  602. function btn_patSearch2_onclick(obj:Button, e:ClickEventInfo)
  603. {
  604. fScrnCdSearch("scrncd2");
  605. }
  606. function btn_preview_onclick(obj:Button, e:ClickEventInfo)
  607. {
  608. fFilePreview();
  609. }
  610. function fFilePreview()
  611. {
  612. var folder;
  613. var temp_path = "C:\\temp2";
  614. FSO = inff_fileSystemObject();
  615. if (FSO == null)
  616. {
  617. return;
  618. }
  619. if (FSO.DriveExists("C") == false)
  620. {
  621. return;
  622. }
  623. if (FSO.FolderExists(temp_path) == false)
  624. {
  625. folder = FSO.CreateFolder(temp_path);
  626. }
  627. var getfilenm = ds_main_iteminfo.getColumn(0, "attfilenm");
  628. if(utlf_isNull(getfilenm))
  629. {
  630. return;
  631. }
  632. var sFileName = getfilenm;
  633. var oParam = {};
  634. oParam.id = "TRMNW17001";
  635. oParam.service = "wardcareapp.WardCareMngt";
  636. oParam.method = "reqExeHelpFileDownLoad";
  637. oParam.inds = "req=ds_main_iteminfo";
  638. oParam.outds = "ds_filelist=filelist";
  639. oParam.async = false;
  640. //oParam.callback = "cf_TRMNW17001";
  641. tranf_submit(oParam);
  642. dsf_readFileFromDs(temp_path+"\\"+getfilenm, ds_filelist, 0, "attfilecnts");
  643. var objExtCommon = new ExtCommon();
  644. var rtn = objExtCommon.executeProcess(temp_path+"\\"+sFileName,"","");
  645. }
  646. function checkFileSize(fileSize)
  647. {
  648. if (fileSize <= 10485760)
  649. return true;
  650. else
  651. return false;
  652. }
  653. function btn_fileadd_onclick(obj:Button, e:ClickEventInfo)
  654. {
  655. fFileAdd();
  656. }
  657. function fFileAdd()
  658. {
  659. var maxsize = 10485760;
  660. var name = ds_main_iteminfo.getColumn(0, "attfilenm");
  661. if(!utlf_isNull(name) || name == '-')
  662. {
  663. var fileupdata = sysf_messageBox(name + " 파일 수정을" , "S001");
  664. if(fileupdata == '6')
  665. {
  666. ipt_attfilenm.value = "";
  667. var fd = new FileDialog;
  668. files = fd.open("FileOpen", FileDialog.SINGLELOAD);
  669. if(utlf_isNull(files)) return;
  670. ds_send_file.clearData();
  671. ds_send_file.addRow();
  672. var file = dsf_writeFileToDs(files,ds_send_file,0, "filedata");
  673. filesize = file.filesize;
  674. if (filesize > maxsize){
  675. sysf_messageBox("파일 크기가 최대치("+maxsize+"Byte)를", "E003");
  676. }
  677. dsf_makeValue(ds_main_iteminfo, "attfilenm", "string", file.filename);
  678. ds_send_file.setColumn(0, "file", file.filename);
  679. ds_send_file.setColumn(0, "filenm", file.filename);
  680. ds_send_file.setColumn(0, "filesize", file.filesize);
  681. ds_send_file.setColumn(0, "filetype", file.filetype);
  682. dsf_makeValue(ds_main_iteminfo, "fileyn", "string", 'Y');
  683. }
  684. else if(fileupdata == '7')
  685. {
  686. sysf_messageBox(name + " 파일 수정을 하지", "E007");
  687. dsf_makeValue(ds_main_iteminfo, "fileyn", "string", 'N');
  688. }
  689. else
  690. {
  691. }
  692. }
  693. else
  694. {
  695. var fd = new FileDialog;
  696. files = fd.open("FileOpen", FileDialog.SINGLELOAD);
  697. if(utlf_isNull(files)) return;
  698. ds_send_file.clearData();
  699. ds_send_file.addRow();
  700. var file = dsf_writeFileToDs(files,ds_send_file,0, "filedata");
  701. filesize = file.filesize;
  702. if (filesize > maxsize){
  703. sysf_messageBox("파일 크기가 최대치("+maxsize+"Byte)를", "E003");
  704. }
  705. if(utlf_isNull(files)){
  706. ds_main_iteminfo.setColumn(0, "attfilenm", "");
  707. ds_main_iteminfo.setColumn(0, "attfilepath", "");
  708. ds_send_file.setColumn(0, "file", "");
  709. ds_send_file.setColumn(0, "filedata", "");
  710. ds_send_file.setColumn(0, "filenm", "");
  711. ds_send_file.setColumn(0, "filesize", "");
  712. ds_send_file.setColumn(0, "filetype", "");
  713. }
  714. else{
  715. dsf_makeValue(ds_main_iteminfo, "attfilenm", "string", file.filename);
  716. ds_send_file.setColumn(0, "file", file.filename);
  717. ds_send_file.setColumn(0, "filenm", file.filename);
  718. ds_send_file.setColumn(0, "filesize", file.filesize);
  719. ds_send_file.setColumn(0, "filetype", file.filetype);
  720. }
  721. dsf_makeValue(ds_main_iteminfo, "fileyn", "string", 'Y');
  722. }
  723. }
  724. function btn_filedel_onclick(obj:Button, e:ClickEventInfo)
  725. {
  726. fFileDel();
  727. }
  728. function fFileDel()
  729. {
  730. var name = ds_main_iteminfo.getColumn(0, "attfilenm");
  731. if(!utlf_isNull(name))
  732. {
  733. var fileupdata = sysf_messageBox(name + " 파일 삭제를" , "S001");
  734. if(fileupdata == '6')
  735. {
  736. ipt_attfilenm.value = "";
  737. ds_send_file.clearData();
  738. ds_send_file.addRow();
  739. }
  740. }
  741. }
  742. function btn_down_onclick(obj:Button, e:ClickEventInfo)
  743. {
  744. fFileDown();
  745. }
  746. function fFileDown()
  747. {
  748. var filepath = ds_main_iteminfo.getColumn(0, "attfilepath");
  749. var filenm = ds_main_iteminfo.getColumn(0, "attfilenm");
  750. var fd = new FileDialog;
  751. var localfile = fd.open("FileSave", FileDialog.SAVE, "%MYDOCUMENT%", filenm); // 단일 파일 선택
  752. if (!utlf_isNull(localfile)) {
  753. //dsf_createDsRow("ds_temp", [{col: "filepath", val:filepath }]);
  754. sysf_setErrorMsg(false); //자바단에서 에러발생시 1.0은 오류리턴을 안해서...
  755. var oParam = {};
  756. oParam.id = "TRMNW17001";
  757. oParam.service = "wardcareapp.WardCareMngt";
  758. oParam.method = "reqExeHelpFileDownLoad";
  759. oParam.inds = "req=ds_main_iteminfo";
  760. oParam.outds = "ds_filelist=filelist";
  761. oParam.async = false;
  762. //oParam.callback = "cf_TRMNW17001";
  763. tranf_submit(oParam);
  764. sysf_setErrorMsg(true);
  765. dsf_readFileFromDs(localfile.fullpath, ds_filelist, 0, "attfilecnts"); // 파일저장
  766. var rtn = sysf_messageBox("파일을", "Q004");
  767. if( rtn == 6 ) {
  768. var objExtCommon = new ExtCommon();
  769. var rtn = objExtCommon.executeProcess(localfile.fullpath,"","");
  770. }
  771. }
  772. }]]></Script>
  773. </Form>
  774. </FDL>