SPRFE02500_예방점검 첨부파일등록.xfdl 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPRFE02500" position="absolute 0 0 757 549" titletext="첨부파일조회" onload="SPRFE02500_onload" onclose="SPRFE02500_onclose">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 0 755 522" id="group3" scrollbars="autoboth">
  8. <Layouts>
  9. <Layout>
  10. <Static text="첨부파일내역조회" position="absolute 0 0 175 25" id="caption1" class="tit_1" anchor="default"/>
  11. <Shape position="absolute 0 48 755 54" id="line1" class="line_10" anchor="default"/>
  12. <Grid position="absolute 0 53 755 517" id="grd_fileinfo" binddataset="ds_main_fileinfo_fileinfolist" anchor="default" oncelldblclick="group3_grd_fileinfo_oncelldblclick">
  13. <Formats>
  14. <Format id="default">
  15. <Columns>
  16. <Column size="25" band="left"/>
  17. <Column size="75"/>
  18. <Column size="86"/>
  19. <Column size="246"/>
  20. <Column size="67"/>
  21. <Column size="150"/>
  22. <Column size="71"/>
  23. <Column size="0"/>
  24. <Column size="0"/>
  25. <Column size="0"/>
  26. <Column size="0"/>
  27. <Column size="0"/>
  28. <Column size="0"/>
  29. <Column size="0"/>
  30. <Column size="0"/>
  31. <Column size="0"/>
  32. <Column size="0"/>
  33. <Column size="0"/>
  34. <Column size="0"/>
  35. <Column size="0"/>
  36. <Column size="0"/>
  37. <Column size="0"/>
  38. <Column size="0"/>
  39. <Column size="0"/>
  40. <Column size="0"/>
  41. <Column size="0"/>
  42. </Columns>
  43. <Rows>
  44. <Row size="24" band="head"/>
  45. <Row size="24"/>
  46. </Rows>
  47. <Band id="head">
  48. <Cell/>
  49. <Cell col="1" text="계약일자"/>
  50. <Cell col="2" text="첨부파일번호"/>
  51. <Cell col="3" text="파일이름"/>
  52. <Cell col="4" text="파일크기"/>
  53. <Cell col="5" text="파일타입"/>
  54. <Cell col="6" text="다운로드수"/>
  55. <Cell col="7" text="부서명"/>
  56. <Cell col="8" text="파일이름(부모창)"/>
  57. <Cell col="9" text="caption1"/>
  58. <Cell col="10"/>
  59. <Cell col="11"/>
  60. <Cell col="12"/>
  61. <Cell col="13"/>
  62. <Cell col="14"/>
  63. <Cell col="15"/>
  64. <Cell col="16"/>
  65. <Cell col="17"/>
  66. <Cell col="18"/>
  67. <Cell col="19"/>
  68. <Cell col="20"/>
  69. <Cell col="21"/>
  70. <Cell col="22"/>
  71. <Cell col="23"/>
  72. <Cell col="24"/>
  73. <Cell col="25"/>
  74. </Band>
  75. <Band id="body">
  76. <Cell celltype="head"/>
  77. <Cell col="1" text="bind:reqdd" mask="expr:utlf_isNull(reqdd) ? '' : '####-##-##'"/>
  78. <Cell col="2" displaytype="text" text="bind:fileseqno"/>
  79. <Cell col="3" displaytype="text" text="bind:filenm"/>
  80. <Cell col="4" text="bind:filesize"/>
  81. <Cell col="5" displaytype="text" text="bind:filetype"/>
  82. <Cell col="6" text="bind:qrycnt"/>
  83. <Cell col="7" text="bind:reqdeptnm"/>
  84. <Cell col="8" text="bind:attfilenm"/>
  85. <Cell col="9" text="bind:instcd"/>
  86. <Cell col="10" text="bind:reqdeptcd"/>
  87. <Cell col="11" text="bind:goalflag"/>
  88. <Cell col="12" text="bind:seqno"/>
  89. <Cell col="13" text="bind:reqpsnid"/>
  90. <Cell col="14" text="bind:filepath"/>
  91. <Cell col="15" text="bind:reqflag"/>
  92. <Cell col="16" text="bind:reqno"/>
  93. <Cell col="17" text="bind:reqseqno"/>
  94. <Cell col="18" text="bind:valumdlcd"/>
  95. <Cell col="19" text="bind:valuclsdetlcd"/>
  96. <Cell col="20" text="bind:publbaseflag"/>
  97. <Cell col="21" text="bind:idxcd"/>
  98. <Cell col="22" text="bind:seqno2"/>
  99. <Cell col="23" text="bind:wrtedd"/>
  100. <Cell col="24" text="bind:fileflag"/>
  101. <Cell col="25" text="bind:workflag"/>
  102. </Band>
  103. </Format>
  104. </Formats>
  105. </Grid>
  106. <Button position="absolute 699 26 755 48" id="btn_search" class="btn1" text="조회" anchor="default" onclick="group3_btn_search_onclick"/>
  107. <Button position="absolute 641 26 697 48" id="btn_save" class="btn4" text="저장" anchor="default" onclick="group3_btn_save_onclick"/>
  108. <Button position="absolute 586 26 639 48" id="btn_delgrd" class="btn2" text="행삭제" anchor="default" onclick="group3_btn_delgrd_onclick"/>
  109. </Layout>
  110. </Layouts>
  111. </Div>
  112. <Div position="absolute 1 519 755 546" id="group1" scrollbars="autoboth">
  113. <Layouts>
  114. <Layout>
  115. <Button position="absolute 640 3 696 25" id="btn_confirm" class="btn4" text="확인" anchor="default" onclick="group1_btn_confirm_onclick" visible="false"/>
  116. <Button position="absolute 698 3 754 25" id="btn_cancel" class="btn4" text="취소" anchor="default"/>
  117. <Shape position="absolute -8 -2 754 4" id="line32" class="line_6" anchor="default"/>
  118. </Layout>
  119. </Layouts>
  120. </Div>
  121. </Layout>
  122. </Layouts>
  123. <Objects>
  124. <Dataset id="ds_main_fileinfo_fileinfolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  125. <ColumnInfo>
  126. <Column id="reqdd" type="STRING"/>
  127. <Column id="fileseqno" type="STRING"/>
  128. <Column id="filenm" type="STRING"/>
  129. <Column id="filesize" type="STRING"/>
  130. <Column id="filetype" type="STRING"/>
  131. <Column id="qrycnt" type="STRING"/>
  132. <Column id="reqdeptnm" type="STRING"/>
  133. <Column id="attfilenm" type="STRING"/>
  134. <Column id="instcd" type="STRING"/>
  135. <Column id="reqdeptcd" type="STRING"/>
  136. <Column id="goalflag" type="STRING"/>
  137. <Column id="seqno" type="STRING"/>
  138. <Column id="reqpsnid" type="STRING"/>
  139. <Column id="filepath" type="STRING"/>
  140. <Column id="reqflag" type="STRING"/>
  141. <Column id="reqno" type="STRING"/>
  142. <Column id="reqseqno" type="STRING"/>
  143. <Column id="valumdlcd" type="STRING"/>
  144. <Column id="valuclsdetlcd" type="STRING"/>
  145. <Column id="publbaseflag" type="STRING"/>
  146. <Column id="idxcd" type="STRING"/>
  147. <Column id="seqno2" type="STRING"/>
  148. <Column id="wrtedd" type="STRING"/>
  149. <Column id="fileflag" type="STRING"/>
  150. <Column id="workflag" type="STRING"/>
  151. <Column id="filedata" type="STRING" size="256"/>
  152. </ColumnInfo>
  153. </Dataset>
  154. <Dataset id="ds_target" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  155. <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  156. <Dataset id="ds_send_fileinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  157. <ColumnInfo>
  158. <Column id="instcd" type="STRING" size="256"/>
  159. <Column id="reqdd" type="STRING" size="256"/>
  160. <Column id="reqflag" type="STRING" size="256"/>
  161. <Column id="reqno" type="STRING" size="256"/>
  162. <Column id="reqseqno" type="STRING" size="256"/>
  163. <Column id="reqpsnid" type="STRING" size="256"/>
  164. <Column id="reqdeptcd" type="STRING" size="256"/>
  165. <Column id="fileseqno" type="STRING" size="256"/>
  166. </ColumnInfo>
  167. <Rows>
  168. <Row>
  169. <Col id="instcd"/>
  170. <Col id="reqdd"/>
  171. <Col id="reqflag"/>
  172. <Col id="reqno"/>
  173. <Col id="reqseqno"/>
  174. <Col id="reqpsnid"/>
  175. <Col id="reqdeptcd"/>
  176. <Col id="fileseqno"/>
  177. </Row>
  178. </Rows>
  179. </Dataset>
  180. <Dataset id="ds_temp_save_fileinfolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  181. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  182. <ColumnInfo>
  183. <Column id="filepath" type="STRING" size="256" sumtext="서버저장경로"/>
  184. </ColumnInfo>
  185. <Rows>
  186. <Row/>
  187. </Rows>
  188. </Dataset>
  189. <Dataset id="ds_main_attachfile" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  190. <ColumnInfo>
  191. <Column id="filedata" type="STRING" size="256" sumtext="파일데이터"/>
  192. </ColumnInfo>
  193. </Dataset>
  194. </Objects>
  195. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  196. * System Name :
  197. * Job Name :
  198. * Creator :
  199. * Make Date : 2017-06-19
  200. * Description :
  201. *---------------------------------------------------------------------------------------
  202. * Modify Date Modifier Modify Description
  203. *---------------------------------------------------------------------------------------
  204. * 2017-06-19 Live Converter TF->XP
  205. *
  206. *---------------------------------------------------------------------------------------
  207. ****************************************************************************************/
  208. //=======================================================================================
  209. // Lib Include
  210. //---------------------------------------------------------------------------------------
  211. include "com_commonxp::comm_main.xjs";
  212. include "mis_miscommonxp::MIS.xjs";
  213. //=======================================================================================
  214. // Global Form Variable
  215. //---------------------------------------------------------------------------------------
  216. var arErrorCode = new HashArray();
  217. //=======================================================================================
  218. // Function
  219. //---------------------------------------------------------------------------------------
  220. /****************************************************************************************
  221. * Argument : N/A
  222. * Description :
  223. ****************************************************************************************/
  224. //=======================================================================================
  225. // Event
  226. //---------------------------------------------------------------------------------------
  227. /****************************************************************************************
  228. * Components : Form
  229. * Description : 화면 처음 초기화시 폼초기화
  230. ****************************************************************************************/
  231. function SPRFE02500_onload(obj:Form, e:LoadEventInfo) {
  232. frmf_initForm(obj);
  233. //grdf_initGrid(grd_XXX);
  234. grdf_setGridSort(group3.grd_fileinfo);
  235. grdf_setRowTypeIcon(group3.grd_fileinfo, 0);
  236. misfGridInit(group3.grd_fileinfo);
  237. misfMsterDetailSet(group3.grd_fileinfo, null, "TRRFE02501" ,"Y");
  238. var instcd = opener.frmf_getParameter("para_instcd" );
  239. var reqdd = opener.frmf_getParameter("para_reqdd" );
  240. var fileseqno = opener.frmf_getParameter("para_fileseqno" );
  241. var goodflag = opener.frmf_getParameter("para_goodflag" );
  242. var reqno = opener.frmf_getParameter("para_reqno" );
  243. var reqseqno = opener.frmf_getParameter("para_reqseqno" );
  244. var attfilenm = opener.frmf_getParameter("para_attfilenm" );
  245. var attfilepathnm = opener.frmf_getParameter("para_attfilepathnm");
  246. var manlyn = opener.frmf_getParameter("para_manlyn" );
  247. dsf_makeValue(ds_send_fileinfo, "instcd" , "string", instcd );
  248. dsf_makeValue(ds_send_fileinfo, "reqdd" , "string", reqdd );
  249. dsf_makeValue(ds_send_fileinfo, "goodflag" , "string", goodflag);
  250. dsf_makeValue(ds_send_fileinfo, "reqno" , "string", reqno);
  251. dsf_makeValue(ds_send_fileinfo, "reqseqno" , "string", reqseqno);
  252. dsf_makeValue(ds_send_fileinfo, "fileseqno" , "string", fileseqno);
  253. dsf_makeValue(ds_send_fileinfo, "manlyn" , "string", manlyn);
  254. group3.btn_search.click();
  255. }
  256. function group3_grd_fileinfo_oncelldblclick(obj:Grid, e:GridClickEventInfo) {
  257. if(e.row < 0) return;
  258. var idx = e.row;
  259. var filepath = ds_main_fileinfo_fileinfolist.getColumn(idx, "filepath");
  260. var filenm = ds_main_fileinfo_fileinfolist.getColumn(idx, "filenm");
  261. var qrycnt = ds_main_fileinfo_fileinfolist.getColumn(idx, "qrycnt");
  262. //qrycnt 가 빈값일 경우는 숫자로 변환해도 0이 아닌 값으로 변환되므로 조건문으로 처리한다.
  263. if ( utlf_isNull(qrycnt)) {
  264. qrycnt = "0";
  265. }
  266. cnt = parseInt(qrycnt)+1;
  267. ds_main_fileinfo_fileinfolist.setColumn(idx, "qrycnt", cnt);
  268. ds_main_fileinfo_fileinfolist.enableevent = false;
  269. ds_main_fileinfo_fileinfolist.updatecontrol = false;
  270. ds_main_fileinfo_fileinfolist.setRowType(idx, 4);
  271. grdf_setStatusColumn(ds_main_fileinfo_fileinfolist, "status");
  272. ds_main_fileinfo_fileinfolist.updatecontrol = true;
  273. ds_main_fileinfo_fileinfolist.enableevent = true;
  274. ds_temp_save_fileinfolist.clear();
  275. dsf_copyColInfo(ds_temp_save_fileinfolist, ds_main_fileinfo_fileinfolist);
  276. ds_temp_save_fileinfolist.copyRow(ds_temp_save_fileinfolist.addRow(), ds_main_fileinfo_fileinfolist, idx);
  277. //misfSave("TXRFE02501");
  278. misfSave("TXRFE02502");
  279. ds_send.setColumn(0, "filepath", filepath);
  280. sysf_setErrorMsg(false); //자바단에서 에러발생시 1.0은 오류리턴을 안해서...
  281. var oParam = {};
  282. oParam.id = "TRRSD00422";
  283. oParam.service = "reqapp.ReqMngt";
  284. oParam.method = "reqGetReqAttfileDownLoad";
  285. oParam.inds = "req=ds_send";
  286. oParam.outds = "ds_main_attachfile=attachfile";
  287. oParam.async = false;
  288. //oParam.callback = "cf_TRRSD00422";
  289. tranf_submit(oParam);
  290. sysf_setErrorMsg(true);
  291. var fd = new FileDialog;
  292. var objVFile = fd.open("FileSave", FileDialog.SAVE, "%MYDOCUMENT%", filenm); // 단일 파일 선택
  293. if (objVFile != null)
  294. {
  295. var temp = dsf_readFileFromDs(objVFile.fullpath, ds_main_attachfile, 0, "filedata"); // 파일저장
  296. sleep(1000);
  297. if( !utlf_isNull(temp) )
  298. {
  299. var rtn = sysf_messageBox("파일을", "Q004");
  300. if( rtn == 6 )
  301. {
  302. var text = new String(objVFile.fullpath);
  303. var replaceText = text.replace(" ", "");
  304. if( text.length != replaceText.length )
  305. {
  306. sysf_messageBox("공백이 포함된 [파일명/폴더]는 자동열기가 실행되지 않습니다.", "E999", "");
  307. return;
  308. }
  309. else
  310. {
  311. //system.execShell(objVFile.fullpath);
  312. var path = objVFile.fullpath;
  313. var sArg = "";
  314. var objExtCommon = new ExtCommon();
  315. objExtCommon.executeProcess(path, sArg);
  316. }
  317. }
  318. }
  319. }
  320. // var localfile = window.fileDialog("save","|",false,filenm,"","All Files(*.*)|*.*");
  321. //
  322. // if (localfile != "") {
  323. // var qrycnt=group3.grd_fileinfo.valueMatrix(idx,group3.grd_fileinfo.colRef("qrycnt"));
  324. // //qrycnt 가 빈값일 경우는 숫자로 변환해도 0이 아닌 값으로 변환되므로 조건문으로 처리한다.
  325. // if ( qrycnt == "") {
  326. // qrycnt = "0";
  327. // }
  328. // cnt = parseInt(qrycnt)+1;
  329. // model.setValue("/root/main/fileinfo/fileinfolist["+idx+"]/qrycnt",cnt);
  330. // group3.grd_fileinfo.addStatus(idx,"update");
  331. //
  332. // misfSave("TXRFE02501");
  333. //
  334. // model.download(getActionURL("TRRSD00422")+"&filepath="+filepath,localfile);
  335. // var rtn = messageBox("파일을", "Q004");
  336. // if( rtn == 6 ) {
  337. // window.exec(localfile);
  338. // }
  339. // }
  340. // group3.btn_search.dispatch("DOMActivate");
  341. }
  342. /****************************************************************************************
  343. * Components : Button
  344. * Description : 조회
  345. ****************************************************************************************/
  346. function group3_btn_search_onclick(obj:Button, e:ClickEventInfo) {
  347. misfMsterDetailRetrieve();
  348. if( utlf_isNull(ds_main_fileinfo_fileinfolist.getColumnInfo("filedata")) ){
  349. ds_main_fileinfo_fileinfolist.addColumn("filedata", "string");
  350. }
  351. if (ds_main_fileinfo_fileinfolist.rowcount > 0) {
  352. if (ds_main_fileinfo_fileinfolist.getColumn(0, "reqpsnid") == sysf_getUserInfo("userid")) {
  353. group3.btn_save.enable = true;
  354. group3.btn_delgrd.enable = true;
  355. }
  356. else {
  357. group3.btn_save.enable = false;
  358. group3.btn_delgrd.enable = false;
  359. }
  360. }
  361. else {
  362. group3.btn_save.enable = false;
  363. group3.btn_delgrd.enable = false;
  364. }
  365. }
  366. /****************************************************************************************
  367. * Components : Button
  368. * Description : 저장
  369. ****************************************************************************************/
  370. function group3_btn_save_onclick(obj:Button, e:ClickEventInfo) {
  371. misfSave("TXRFE02502");
  372. group3.btn_search.click();
  373. }
  374. /****************************************************************************************
  375. * Components : Button
  376. * Description : 행삭제
  377. ****************************************************************************************/
  378. function group3_btn_delgrd_onclick(obj:Button, e:ClickEventInfo) {
  379. misfGridIUD(group3.grd_fileinfo, "D");
  380. }
  381. /****************************************************************************************
  382. * Components : Button
  383. * Description : 확인
  384. ****************************************************************************************/
  385. function group1_btn_confirm_onclick(obj:Button, e:ClickEventInfo) {
  386. this.close();
  387. }
  388. /****************************************************************************************
  389. * Components : Button
  390. * Description : 취소
  391. ****************************************************************************************/
  392. function group1_btn_cancel_onclick(obj:Button, e:ClickEventInfo) {
  393. this.close();
  394. }
  395. /****************************************************************************************
  396. * Components : Form
  397. * Description : 닫기전 변경데이터 체크
  398. ****************************************************************************************/
  399. function SPRFE02500_onclose(obj:Form, e:CloseEventInfo)
  400. {
  401. var dsUpdate = grdf_getGridUpdateData(group3.grd_fileinfo, "all");
  402. if (dsUpdate.rowcount > 0) {
  403. if (group3.btn_save.enable == true) {
  404. var save_val = sysf_messageBox("삭제 자료가 존재 합니다. ", "Q002");
  405. if (save_val == "6") {
  406. group3.btn_save.click();
  407. }
  408. }
  409. }
  410. }
  411. ]]></Script>
  412. </Form>
  413. </FDL>