SPAHA04410_판정이미지관리.xfdl 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPAHA04410" position="absolute 0 0 1170 690" titletext="판정이미지" oninit="SPAHA04410_oninit" onload="SPAHA04410_onload">
  5. <Layouts>
  6. <Layout>
  7. <Shape position="absolute 0 40 1165 51" linetype="horizontal" id="line8" class="line_10" anchor="default"/>
  8. <Static text="사진 목록" position="absolute 1 26 119 44" id="caption20" class="tit_2" anchor="default"/>
  9. <Button position="absolute 290 390 354 409" id="btn_upload" class="btn5" text="업로드" anchor="default" onclick="btn_upload_onclick"/>
  10. <Button position="absolute 224 390 288 409" id="btn_addfile" class="btn2" text="파일추가" anchor="default" onclick="btn_addfile_onclick"/>
  11. <Grid position="absolute 0 47 354 380" id="grd_attachfile" visible="true" binddataset="ds_main_imagelst_item" anchor="default" autofittype="col" oncellclick="grd_attachfile_oncellclick">
  12. <Formats>
  13. <Format id="default">
  14. <Columns>
  15. <Column size="24"/>
  16. <Column size="307"/>
  17. <Column size="0"/>
  18. <Column size="0"/>
  19. <Column size="0"/>
  20. <Column size="0"/>
  21. </Columns>
  22. <Rows>
  23. <Row size="24" band="head"/>
  24. <Row size="24"/>
  25. </Rows>
  26. <Band id="head">
  27. <Cell/>
  28. <Cell col="1" text="첨부파일명"/>
  29. <Cell col="2" text="서버저장경로"/>
  30. <Cell col="3" text="건진구분"/>
  31. <Cell col="4" text="예약일자"/>
  32. <Cell col="5" text="예약번호"/>
  33. </Band>
  34. <Band id="body">
  35. <Cell celltype="head"/>
  36. <Cell col="1" style="align:left top;padding:5 2 1 2;" text="bind:filenm" wordwrap="word"/>
  37. <Cell col="2" text="bind:filepath"/>
  38. <Cell col="3" text="bind:healexamflag"/>
  39. <Cell col="4" text="bind:rsrvdd"/>
  40. <Cell col="5" text="bind:rsrvno"/>
  41. </Band>
  42. </Format>
  43. </Formats>
  44. </Grid>
  45. <Grid position="absolute 0 410 355 560" id="grd_addiamge" binddataset="ds_send_cond_attach" anchor="default" autofittype="col">
  46. <Formats>
  47. <Format id="default">
  48. <Columns>
  49. <Column size="341"/>
  50. </Columns>
  51. <Rows>
  52. <Row size="24" band="head"/>
  53. <Row size="24"/>
  54. </Rows>
  55. <Band id="head">
  56. <Cell text="파일경로"/>
  57. </Band>
  58. <Band id="body">
  59. <Cell style="align:left top;padding:5 2 1 2;" text="bind:file" wordwrap="word"/>
  60. </Band>
  61. </Format>
  62. </Formats>
  63. </Grid>
  64. <Button position="absolute 300 23 353 42" id="btn_del" class="btn5" text="삭제" anchor="default" onclick="btn_del_onclick"/>
  65. <ImageViewer id="img1" anchor="default" position="absolute 0 0 0 0"/>
  66. <Button position="absolute 1100 23 1164 42" id="btn_down" class="btn2" text="파일저장" anchor="default" onclick="btn_down_onclick"/>
  67. <Static id="caption2" text="판정이미지 관리" class="tit_1" position="absolute 0 0 217 25"/>
  68. <ImageViewer id="img_phot1" taborder="1" stretch="fit" position="absolute 360 48 1164 682" anchor="top right"/>
  69. </Layout>
  70. </Layouts>
  71. <Objects>
  72. <Dataset id="ds_main_imagelst_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  73. <ColumnInfo>
  74. <Column id="filenm" type="STRING" size="256"/>
  75. <Column id="filepath" type="STRING" size="256"/>
  76. <Column id="healexamflag" type="STRING" size="256"/>
  77. <Column id="rsrvdd" type="STRING" size="256"/>
  78. <Column id="rsrvno" type="STRING" size="256"/>
  79. </ColumnInfo>
  80. <Rows>
  81. <Row>
  82. <Col id="filenm"/>
  83. <Col id="filepath"/>
  84. <Col id="healexamflag"/>
  85. <Col id="rsrvdd"/>
  86. <Col id="rsrvno"/>
  87. </Row>
  88. </Rows>
  89. </Dataset>
  90. <Dataset id="ds_main_image_attachfile" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  91. <ColumnInfo>
  92. <Column id="image" type="STRING" size="256"/>
  93. </ColumnInfo>
  94. <Rows>
  95. <Row>
  96. <Col id="image"/>
  97. </Row>
  98. </Rows>
  99. </Dataset>
  100. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  101. <ColumnInfo>
  102. <Column id="healexamflag" type="STRING" size="256" sumtext="건진구분"/>
  103. <Column id="healexamdetlflag" type="STRING" size="256" sumtext="건진상세구분"/>
  104. <Column id="rsrvdd" type="STRING" size="256" sumtext="예약일자"/>
  105. <Column id="rsrvno" type="STRING" size="256" sumtext="예약번호"/>
  106. <Column id="pid" type="STRING" size="256" sumtext="등로번호"/>
  107. <Column id="orddd" type="STRING" size="256" sumtext="건진일자"/>
  108. <Column id="cretno" type="STRING" size="256" sumtext="생성번호"/>
  109. <Column id="pkgcd" type="STRING" size="256" sumtext="패키지코드"/>
  110. <Column id="filepath" type="STRING" size="256"/>
  111. </ColumnInfo>
  112. <Rows>
  113. <Row>
  114. <Col id="healexamflag"/>
  115. <Col id="healexamdetlflag"/>
  116. <Col id="rsrvdd"/>
  117. <Col id="rsrvno"/>
  118. <Col id="pid"/>
  119. <Col id="orddd"/>
  120. <Col id="cretno"/>
  121. <Col id="pkgcd"/>
  122. </Row>
  123. </Rows>
  124. </Dataset>
  125. <Dataset id="ds_init_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  126. <Dataset id="ds_send_image" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  127. <ColumnInfo>
  128. <Column id="filenm" type="STRING" size="256" sumtext="파일명"/>
  129. <Column id="filedata" type="BLOB" size="256" sumtext="파일데이터"/>
  130. <Column id="filesize" type="STRING" size="256" sumtext="파일크기"/>
  131. <Column id="filetype" type="STRING" size="256" sumtext="파일종류"/>
  132. </ColumnInfo>
  133. </Dataset>
  134. <Dataset id="ds_send_cond_attach" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  135. <ColumnInfo>
  136. <Column id="filenm" type="STRING" size="256" sumtext="첨부파일명"/>
  137. <Column id="filedata" type="BLOB" size="256" sumtext="첨부파일데이터"/>
  138. <Column id="filesize" type="STRING" size="256" sumtext="첨부파일크기"/>
  139. <Column id="filetype" type="STRING" size="256" sumtext="파일종류"/>
  140. <Column id="file" type="STRING" size="256"/>
  141. </ColumnInfo>
  142. <Rows>
  143. <Row/>
  144. </Rows>
  145. </Dataset>
  146. <Dataset id="ds_send_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  147. <Dataset id="ds_temp_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  148. <Dataset id="ds_attachfile" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  149. <Dataset id="ds_req" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  150. </Objects>
  151. <Bind>
  152. <BindItem id="item0" compid="img_phot1" propid="image" datasetid="ds_main_image_attachfile" columnid="image"/>
  153. </Bind>
  154. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  155. * System Name :
  156. * Job Name :
  157. * Creator :
  158. * Make Date : 2015-11-13
  159. * Description :
  160. *---------------------------------------------------------------------------------------
  161. * Modify Date Modifier Modify Description
  162. *---------------------------------------------------------------------------------------
  163. * 2015-11-13 Live Converter TF->XP
  164. *
  165. *---------------------------------------------------------------------------------------
  166. ****************************************************************************************/
  167. include "com_commonxp::comm_main.xjs";
  168. include "ast_healexamxp::AHA001.xjs";
  169. include "pam_pamcomnxp::PAM.xjs";
  170. include "ast_healthexambasexp::healcombolist.xjs";
  171. include "ast_healthexamrsrvacptxp::AHA.xjs"
  172. var arErrorCode = new HashArray();
  173. var cnj_img_view = null;
  174. function SPAHA04410_oninit(obj:Form, e:InitEventInfo)
  175. {
  176. frmf_initForm(obj); //폼 초기화
  177. grdf_setRowTypeIcon(grd_attachfile, 0);
  178. }
  179. function SPAHA04410_onload(obj:Form, e:LoadEventInfo)
  180. {
  181. try{
  182. ds_init_send.copyData(arg_ds_init_send);
  183. }catch(e){
  184. sysf_catchTrace(e);
  185. }
  186. fInitialize();
  187. }
  188. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  189. function fInitialize() {
  190. btn_addfile.enable = false;
  191. btn_upload.enable = false;
  192. btn_del.enable = false;
  193. btn_down.enable = false;
  194. if(frmf_checkOpener() == true) {
  195. var rsrvdd = ds_init_send.getColumn(0, "rsrvdd");
  196. var rsrvno = ds_init_send.getColumn(0, "rsrvno");
  197. if(!utlf_isNull(rsrvdd) && !utlf_isNull(rsrvno)) {
  198. ds_send.setColumn(0, "healexamflag", ds_init_send.getColumn(0, "healexamflag"));
  199. ds_send.setColumn(0, "healexamdetlflag", ds_init_send.getColumn(0, "healexamdetlflag"));
  200. ds_send.setColumn(0, "rsrvdd", rsrvdd);
  201. ds_send.setColumn(0, "rsrvno", rsrvno);
  202. ds_send.setColumn(0, "pid", ds_init_send.getColumn(0, "pid"));
  203. ds_send.setColumn(0, "orddd", ds_init_send.getColumn(0, "orddd"));
  204. ds_send.setColumn(0, "cretno", ds_init_send.getColumn(0, "cretno"));
  205. ds_send.setColumn(0, "pkgcd", ds_init_send.getColumn(0, "pkgcd"));
  206. btn_addfile.enable = true;
  207. btn_upload.enable = true;
  208. btn_del.enable = true;
  209. btn_down.enable = true;
  210. var oParam = {};
  211. oParam.id = "TRAHA04415";
  212. oParam.service = "healthexamjudgapp.JudgInpt";
  213. oParam.method = "reqGetJudgImageList";
  214. oParam.inds = "req=ds_send";
  215. oParam.outds = "ds_main_imagelst_item=item";
  216. oParam.async = false;
  217. tranf_submit(oParam);
  218. }else {
  219. btn_addfile.enable = false;
  220. btn_upload.enable = false;
  221. btn_del.enable = false;
  222. btn_down.enable = false;
  223. }
  224. ds_send_cond_attach.clearData();
  225. }
  226. }
  227. function btn_upload_onclick(obj:Button, e:ClickEventInfo)
  228. {
  229. if (ds_send_cond_attach.rowcount == 0)
  230. {
  231. sysf_messageBox("업로드될 파일이", "I004");
  232. return false;
  233. }
  234. var oParam = {};
  235. oParam.id = "TXAHA04413";
  236. oParam.service = "healthexamjudgapp.JudgInpt";
  237. oParam.method = "reqInsJudgImage";
  238. oParam.inds = "file=ds_send_cond_attach req=ds_send";
  239. oParam.outds = "ds_hidden_temp_item=item";
  240. oParam.async = false;
  241. oParam.callback = "cf_TXAHA04413";
  242. tranf_submit(oParam);
  243. if (arErrorCode.pop("TXAHA04413") > -1) {
  244. //submit("TRAHA04415");
  245. var oParam = {};
  246. oParam.id = "TRAHA04415";
  247. oParam.service = "healthexamjudgapp.JudgInpt";
  248. oParam.method = "reqGetJudgImageList";
  249. oParam.inds = "req=ds_send";
  250. oParam.outds = "ds_main_imagelst_item=item";
  251. oParam.async = false;
  252. tranf_submit(oParam);
  253. ds_send_cond_attach.clearData();
  254. }
  255. }
  256. function cf_TXAHA04413(sSvcId, nErrorCode, sErrorMsg) {
  257. arErrorCode.push(sSvcId, nErrorCode);
  258. }
  259. function btn_addfile_onclick(obj:Button, e:ClickEventInfo)
  260. {
  261. // var maxsize = upload1.attribute("filesize");
  262. // files = window.fileDialog("open", "|", true);
  263. // filelist = files.split("|");
  264. // for(var i = 0 ; i < filelist.length ; i++ ) {
  265. // var file = filelist[i];
  266. // if(file != "") {
  267. // grd_addiamge.addRow(false);
  268. // grd_addiamge.valueMatrix(grd_addiamge.rows - 1, 0) = file;
  269. // if (!checkFileSize(upload1)){
  270. // grd_addiamge.removeItem();
  271. // messageBox("파일 크기가 최대치("+maxsize+"Byte)를", "E003");
  272. //
  273. // }
  274. // }
  275. // }
  276. var maxsize = 5242880;
  277. //var name = ds_main_iteminfo.getColumn(0, "attfilenm");
  278. var fd = new FileDialog;
  279. files = fd.open("FileOpen", FileDialog.SINGLELOAD);
  280. //ds_send_cond_attach.clearData();
  281. var addrow = ds_send_cond_attach.addRow();
  282. var file = dsf_writeFileToDs(files,ds_send_cond_attach,addrow, "filedata");
  283. filesize = file.filesize;
  284. if (filesize > maxsize){
  285. sysf_messageBox("파일 크기가 최대치("+maxsize+"Byte)를", "E003");
  286. }
  287. if(utlf_isNull(files)){
  288. //ds_main_cond.setColumn(addrow, "attfile", "");
  289. //ds_main_cond.setColumn(addrow, "attfilepath", "");
  290. ds_send_cond_attach.setColumn(addrow, "file", "");
  291. ds_send_cond_attach.setColumn(addrow, "filedata", "");
  292. ds_send_cond_attach.setColumn(addrow, "filenm", "");
  293. ds_send_cond_attach.setColumn(addrow, "filesize", "");
  294. ds_send_cond_attach.setColumn(addrow, "filetype", "");
  295. }
  296. else{
  297. //ds_main_cond.setColumn(addrow, "attfile", file.filename);
  298. ds_send_cond_attach.setColumn(addrow, "file", file.filename);
  299. ds_send_cond_attach.setColumn(addrow, "filenm", file.filename);
  300. ds_send_cond_attach.setColumn(addrow, "filesize", file.filesize);
  301. ds_send_cond_attach.setColumn(addrow, "filetype", file.filetype);
  302. }
  303. // if (!checkFileSize(vFile.getFileSize()))
  304. // {
  305. // ipt_attfilenm.value = "";
  306. // sysf_messageBox("파일 크기가 최대치("+maxsize+"Byte)를", "E003");
  307. // ds_send_cond_attach.clearData();
  308. // ds_send_cond_attach.addRow();
  309. // }
  310. //dsf_makeValue(ds_main_iteminfo, "fileyn", "string", 'Y');
  311. }
  312. function checkFileSize(fileSize)
  313. {
  314. if (fileSize <= 5242880)
  315. return true;
  316. else
  317. return false;
  318. }
  319. function btn_del_onclick(obj:Button, e:ClickEventInfo)
  320. {
  321. if ( ds_main_imagelst_item.rowposition < 0 || ds_main_imagelst_item.rowcount == 0 ) {
  322. return false;
  323. }
  324. if ( sysf_messageBox("선택된 파일을 ","Q001") != 6 )
  325. {
  326. return false;
  327. }
  328. //grd_attachfile.clearStatus()
  329. var selectrow = grdf_getSelectedRows(grd_attachfile);
  330. ds_main_imagelst_item.enableevent = false;
  331. ds_main_imagelst_item.updatecontrol = false;
  332. for(var i = 0 ; i < selectrow; i++)
  333. {
  334. var cur_row= grd_attachfile.selectstartrow;
  335. ds_main_imagelst_item.setRowType(cur_row, 8);
  336. }
  337. ds_main_imagelst_item.updatecontrol = true;
  338. ds_main_imagelst_item.enableevent = true;
  339. var updateData = grdf_getGridUpdateData(grd_attachfile);
  340. ds_send_savedata.copyData(updateData, true);
  341. if( sysf_messageBox("이미지를 ", "Q001") !=6) return ;
  342. var oParam = {};
  343. oParam.id = "TXAHA04414";
  344. oParam.service = "healthexamjudgapp.JudgInpt";
  345. oParam.method = "reqDelJudgImage";
  346. oParam.inds = "file=ds_send_savedata";
  347. oParam.outds = "ds_temp_item=item";
  348. oParam.async = false;
  349. oParam.callback = "cf_TXAHA04414";
  350. tranf_submit(oParam);
  351. if(arErrorCode.pop("TXAHA04414") > -1) {
  352. var oParam = {};
  353. oParam.id = "TRAHA04415";
  354. oParam.service = "healthexamjudgapp.JudgInpt";
  355. oParam.method = "reqGetJudgImageList";
  356. oParam.inds = "req=ds_send";
  357. oParam.outds = "ds_main_imagelst_item=item";
  358. oParam.async = false;
  359. tranf_submit(oParam);
  360. }
  361. }
  362. function cf_TXAHA04414(sSvcId, nErrorCode, sErrorMsg) {
  363. arErrorCode.push(sSvcId, nErrorCode);
  364. }
  365. function grd_attachfile_oncellclick(obj:Grid, e:GridClickEventInfo)
  366. {
  367. if (e.row >=0 && e.col >= 0) {
  368. var idx = ds_main_imagelst_item.rowposition;
  369. if(idx < 0) return false;
  370. var filepath = ds_main_imagelst_item.getColumn(idx, "filepath");
  371. ds_send.setColumn(0, "filepath", filepath);
  372. //submit("TRAHA04416");
  373. var oParam = {};
  374. oParam.id = "TRAHA04416";
  375. oParam.service = "healthexamjudgapp.JudgInpt";
  376. oParam.method = "reqGetJudgImage";
  377. oParam.inds = "req=ds_send";
  378. oParam.outds = "ds_main_image_attachfile=attachfile";
  379. oParam.async = false;
  380. tranf_submit(oParam);
  381. img_phot1.image = ds_main_image_attachfile.getColumn(0, "filedata");
  382. }
  383. }
  384. function btn_down_onclick(obj:Button, e:ClickEventInfo)
  385. {
  386. if(!utlf_isNull(ds_main_image_attachfile.getColumn(0, "filedata")))
  387. {
  388. var idx = ds_main_imagelst_item.rowposition;
  389. var filepath = ds_main_imagelst_item.getColumn(idx , "filepath");
  390. var filenm = ds_main_imagelst_item.getColumn(idx , "filenm");
  391. ds_req.clearData();
  392. ds_req.addRow();
  393. dsf_makeValue(ds_req, "filepath", "string", filepath);
  394. var oParam = {};
  395. oParam.id = "TRAHA04417";
  396. oParam.service = "healthexamjudgapp.JudgInpt";
  397. oParam.method = "reqGetJudgImage";
  398. oParam.inds = "req=ds_req";
  399. oParam.outds = "ds_attachfile=attachfile";
  400. oParam.async = false;
  401. tranf_submit(oParam);
  402. var fd = new FileDialog;
  403. //var sFileName = ds_main_iteminfo.getColumn(0,"attfilenm");
  404. var objVFile = fd.open("FileSave", FileDialog.SAVE, "%MYDOCUMENT%", filenm); // 단일 파일 선택
  405. if (objVFile != null) {
  406. dsf_readFileFromDs(objVFile.fullpath, ds_download, 0, "attfilecnts"); // 파일저장
  407. }
  408. }
  409. }
  410. ]]></Script>
  411. </Form>
  412. </FDL>