/* - ======================================================================================= Image EMR Viewer Program (SSMRC03300.js) - Version : 1) : Ver.1.00.00 - ======================================================================================= */ //function subsizeinit(window) '°¢°¢ÀÇ obj »çÀÌÁî Á¶Á¤ //function menuinit() 'g_menuÀÇ ¸Þ´º visible ¼³Á¤ //function scanview_setupChart(ViewMode) '½ºÄµ À̹ÌÁö ¸ðµå ¼³Á¤ //function scanview_setChartViewerSize 'import »çÀÌÁî Á¶Á¤ //function scanview_fInitilize //function scanview_resetPageRemove 'ºä¾î¿¡ ¶ç¿î À̹ÌÁö Ŭ¸®¾î //function RefreshFalse 'AutoReflash = False //function RefreshTrue 'AutoReflash = True //function ClearChart 'PageRemove //function PvMovePage 'ÆäÀÌÁö À̵¿ À̺¥Æ® //function PvMousePage '¸¶¿ì½º À̵¿ À̺¥Æ® //function PvFit 'ÂÊ ¸ÂÃã //function PvTurn 'ÆäÀÌÁö¸ðµå À̹ÌÁö ȸÀü //function TvTurn '½æ³×Àϸðµå À̹ÌÁö ȸÀü //function TVSelect 'À̹ÌÁö ¼±Åà /Ãë¼Ò //function TVScreen 'Çà À̹ÌÁö °¹¼ö ¼³Á¤ //function MouseUp //function ThumbnailClick_event '½æ³×ÀÏ ¸ðµå ½Ã Ŭ¸¯ À̺¥Æ® //function ImageClick_event 'À̹ÌÁö ¸ðµå ½Ã Ŭ¸¯ À̺¥Æ® //function ThumbnailDblClick_event '½æ³×ÀÏ ¸ðµå ´õºí Ŭ¸¯ À̺¥Æ® //function ImageDblClick_event 'À̹ÌÁö ¸ðµå ´õºí Ŭ¸¯ À̺¥Æ® //function openImageFileDialogs '·ÎÄà ÆÄÀÏ ¿­±â â Ȱ¼ºÈ­ //function scanLoad ' //function scanInsLoad ' //function SelectLoadChart 'ÆÄÀÏ ºä¾î¿¡ APPEND //function SelectInsLoadChart 'ÆÄÀÏ ºä¾î¿¡ APPEND //function OcrScanInsert 'ºÒ·¯ ¿Â ÆÄÀÏ T_SCAN¿¡ INSERT //function LocalLoadPath //function LTPInit 'LTP ¿¬°á //function LTPClose 'LTP ¿¬°áÇØÁ¦ //function LTPFileGet 'ÆÄÀÏ ´Ù¿î·Îµå //function LTPFilePut 'ÆÄÀÏ Àü¼Û //function LTPFilesGet 'º¹¼öÆÄÀÏ ´Ù¿î·Îµå //function LTPFilesPut 'º¹¼öÆÄÀÏ Àü¼Û //function getFiles 'LTP ¿¬°á ÈÄ ÆÄÀÏ °¡Á®¿À±â //function getltpInfo 'LTP Á¤º¸ SELECT //function imgload 'T_SCANÀÇ ÆÄÀÏ ¿­±â //function appendchart ' //function downloadChart 'for¹®À¸·Î getFiles //function DelScanImg 'T_SCAN ¹× ÆÄÀÏ »èÁ¦ //function DelIndexImg 'CHARTPAGET PAGET DB ¹× ÆÄÀÏ »èÁ¦ //function BlankPage '5kb¹Ì¸¸ À̹ÌÁö °ø¹éÁ¦°Å¿¡ PageAppend //function IndexInsert 'ÀϹݽºÄµ CHARTPAGT PAGET INSERT //function OcrIndexInsert 'OCR½ºÄµ CHARTPAGT PAGET INSERT //function Scan '½ºÄµ //function scanInsert '??? //function findIndex '±×¸®µå¿¡¼­ like ã±â //function scanSetting '½ºÄµ¼³Á¤ ºÒ·¯¿À±â //function saveImageFileDialogs ' À̹ÌÁö ·ÎÄÿ¡ ÀúÀå //function OcrImageLoad 'OCR ÀÎ½Ä //function RefreshPaperList '??? //function scansetting '¿Ö 2°³?? //function DelLocalFolder '·ÎÄà ´Ù¿î·Îµå Àӽà Æú´õ »èÁ¦ //function copyfile 'ÆÄÀÏ º¹»ç //function Trash 'º¹¿ø¿¡ ÇÊ¿ä trash Æú´õ Àӽà »ý¼ºÇؼ­ ÆÄÀÏ º¹»ç var gScanServer; var gScanPort; var gScanUser; var gScanRootPath; var gIndexServer; var gIndexPort; var gIndexUser; var gIndexRootPath; var subwidth = 1125; var subheight = 790; var subsplit = 10; var g_path; function subsizeinit(window) { window.attribute("visibility") = true; // window.attribute("left") = parseInt(g_menu.attribute("left")) + // parseInt(g_menu.attribute("width")) + subsplit; // window.attribute("top") = g_menu.attribute("top"); window.attribute("left") = 1; window.attribute("top") = 30; window.attribute("width") = subwidth + 115; window.attribute("height") = subheight + 123; } function menuinit() { g_submain.visible = false; iv_ocr.visible = false; iv_scan.visible = false; iv_comp.visible = false; iv_etc.visible = false; g_Setting.visible = false; } function scanview_setupChart(ViewMode, opener) { switch(ViewMode) { case "TV": model.toggle("case1"); model.setValue("/root/cond/rdo_viewmode", "TV"); model.refresh(); f_View.ViewMode = 2; // parent.model.setValue("/root/cond/viewmode", "tv"); break; case "PV": model.toggle("case2"); model.setValue("/root/cond/rdo_viewmode", "PV"); model.refresh(); f_View.ViewMode = 0; f_View.fitmode = 3; if(optPageCurrent.text == "" ){ } else{ f_View.PageCurrent = optPageCurrent.text; } // parent.model.setValue("/root/cond/viewmode", "pv"); break; } } function scanview_setChartViewerSize(newWidth, newHeight, grpheight, grptop) { var obj; var obj2; obj2 = document.body; obj2.attribute("width") = newWidth; obj2.attribute("height") = newHeight; group1.attribute("top") =3; group1.attribute("left") =3; group1.attribute("height") = grpheight; group1.attribute("width") = obj2.attribute("width")- 6; obj = document.controls.item("f_View"); obj.attribute("left") = 3; obj.attribute("top") = grptop ; obj.attribute("width") = obj2.attribute("width") - 6; obj.attribute("height") = obj2.attribute("height") - group1.attribute("height") - 9; f_View.ViewMode = 1; } function scanview_fInitilize() { g_path == new Array(); // º¸±â ¹æ¹ýÀÇ ±âº»°ª ¼³Á¤ // ±âº» Æû µðÀÚÀο¡¼­ "TV"·Î ¼³Á¤ µÇ¾î Àֱ⠶§¹® scanview_setupChart("TV"); // µ¥ÀÌÅÍ ÃʱâÈ­ scanview_resetPageRemove(); // ½æ³×ÀÏ ºä¾îÀÇ ·¹À̾ƿô ¼³Á¤ // TVScreen(4); } function scanview_resetPageRemove() { // °³Ã¼¿¡ À̹ÌÁö°¡ µî·ÏµÇ¾î ÀÖ´Ù¸é ÇØÁöÇÑ´Ù. RefreshFalse(); ClearChart(); RefreshTrue(); /* * model.removeNode("/root/hidden/tempcharts"); * model.removeNode("/root/main/charts"); model.refresh(); */ } function RefreshFalse() { f_View.AutoRefresh = false; } function RefreshTrue() { f_View.AutoRefresh = true; } function ClearChart() { f_View.pageremove(0,0); // scanview_setupChart("TV"); } function PvMovePage(Mode) { switch(Mode) { case "first": f_View.PageCurrent = 1; f_View.actionsingle = 2; f_View.fitmode = 3; model.refresh(); break; case "prev": f_View.actionsingle = 4; f_View.fitmode = 3; break; case "next": f_View.actionsingle = 5; f_View.fitmode = 3; break; case "last": f_View.PageCurrent = f_View.pagetotal; f_View.actionsingle = 3; f_View.fitmode = 3; model.refresh(); } } function PvMousePage(Mode) { switch(Mode) { case "normal": f_View.actionsingle =0; break; case "panning": f_View.actionsingle = 21; break; case "zoom": f_View.actionsingle = 22; break; case "regionzoom": f_View.actionsingle = 23; break; } } function PvFit() { f_View.fitmode = 3; } function PvTurn(Mode) { switch(Mode) { case "left": f_View.actionsingle = 7; f_View.ThumbnailSelect(f_View.PageCurrent, true); f_View.actionthumbnail = 12; f_View.actionthumbnail = 3; break; case "right": f_View.actionsingle = 6; f_View.ThumbnailSelect(f_View.PageCurrent, true); f_View.actionthumbnail = 11; f_View.actionthumbnail = 3; break; case "180": f_View.actionsingle = 8; f_View.ThumbnailSelect(f_View.PageCurrent, true); f_View.actionthumbnail = 13; f_View.actionthumbnail = 3; break; } } function TvTurn(Mode) { switch(Mode) { case "left": f_View.actionthumbnail = 12; break; case "right": f_View.actionthumbnail = 11; break; case "180": f_View.actionthumbnail = 13; break; } // TVSelect("none") } function TVSelect(Mode) { switch(Mode) { case "all": f_View.actionthumbnail = 2; break; case "none": f_View.actionthumbnail = 3; break; } } function TVScreen(Mode) { var obj obj = document.controls.item("f_View"); // Á¤º¸¸¦ ±¸ÇÏÁö ¸øÇÔ switch(Mode) { case "1": // f_View.thumbnailwidth = (obj.attribute("width") - 30) / 2 ; f_View.thumbnailwidth = (obj.attribute("width") - 120); f_View.thumbnailheight = f_View.thumbnailwidth * 1.41 ; f_View.focus; break; case "2": f_View.thumbnailwidth = (obj.attribute("width") - 80) / 2 ; f_View.thumbnailheight = f_View.thumbnailwidth * 1.41 ; f_View.focus; break; case "3": f_View.thumbnailwidth = (obj.attribute("width") - 105) / 3; f_View.thumbnailheight = f_View.thumbnailwidth * 1.41; break; case "4": f_View.thumbnailwidth = (obj.attribute("width") - 110) / 4; f_View.thumbnailheight = f_View.thumbnailwidth * 1.41; break; case "5": f_View.thumbnailwidth = (obj.attribute("width") - 150) / 5; f_View.thumbnailheight = f_View.thumbnailwidth * 1.41; break; case "6": f_View.thumbnailwidth = (obj.attribute("width") - 170) / 6; f_View.thumbnailheight = f_View.thumbnailwidth * 1.41; break; } } function MouseUp(mode) { if(model.getValue("/root/cond/rdo_viewmode") == "TV") { // f_View.ViewMode = 2; } var obj; if (mode == "blank") { obj = document.controls.item("f_preview"); obj.attribute("visibility") = "hidden"; f_preview.PageRemove(0,0); } else { obj = parent.document.controls.item("f_preview"); obj.attribute("visibility") = "hidden"; parent.f_preview.PageRemove(0,0); } } function ThumbnailClick_event(fv, page, shift, button, x, y, fv_temp, type, mode) { var LocalPath; var RemotePath; var fso = new ActiveXObject("Scripting.FileSystemObject"); var scanSaveData = "status¢Ëfileno¢Ëpage¢Ëinstcd¢Ì"; var indexSaveData = "status¢Ëpageno¢Ëpage¢Ëinstcd¢Ì"; var indexinfo; var patno = "undo"; TrashFolder() if (page == 0) { } else { if(button == 1) { if(shift == 1) { var i = 0; var first = 0; var last = page; var count = 0; for(i=1; i <= fv.PageTotal; i++) { if(fv.ThumbnailSelect(i) == true) { if(first == 0) { first = i; } } } if(page >= first) { count = last - first; for(i=1; i <= count; i++) { fv.ThumbnailSelect(first + i, true); } } else { count = first - last; for(i=0; i <= count; i++) { fv.ThumbnailSelect(last + i, true); } } } else if (shift == 0) { if(fv.ThumbnailSelect(page) == false) { fv.ThumbnailSelect(page, true); // ÇöÀç ÆäÀÌÁö ÀÔ·Â model.setValue("/root/main/chartinfo/pagecurrent", page); model.refresh(); } else { fv.ThumbnailSelect(page,false); } } else if (shift == 2) { // ½ºÄµÀ̹ÌÁö À§Ä¡ ¹Ù²Ù±â var Imageno = new Array(fv.PageTotal - 1); var cnt = 0; var i = 0; fv_preview.ViewMode = 2; fv_preview.PageRemove(0,0); if(page == 0) { for(i=fv.PageTotal; i >= 1; i--) { if(fv.ThumbnailSelect(i) == true) { fv.PageAppend(fv.PageFilePath(i), 1, 1); fv.PageCurrent = 1; fv.PageHiddenText(fv_temp.PageTotal) = fv.PageHiddenText(i); fv.PageRemove(i, i); } } for(i=fv_preview.PageTotal; i >= 1; i--) { fv.PageAppend(fv_preview.PageFilePath(i), 1, 1); fv.PageCurrent = 1; fv.PageHiddenText(fv.PageTotal) = fv.PageHiddenText(i); } } else { cnt = page; for(i=fv.PageTotal; i >= 1; i--) { if(fv.ThumbnailSelect(i) == true) { fv_temp.PageAppend(fv.PageFilePath(i), 1, 1); fv_temp.PageCurrent = 1; fv_temp.PageHiddenText(fv_temp.PageTotal) = fv.PageHiddenText(i); fv.PageRemove(i, i); if(cnt > i) { cnt = cnt - 1; } } } for(i=fv_temp.PageTotal ; i >= 1 ; i--) { fv.PageInsert(cnt, fv_temp.PageFilePath(i), 1, 1); fv.PageCurrent = i; fv.PageHiddenText(cnt) = fv_temp.PageHiddenText(i); } } for(i=1; i<=fv.PageTotal; i++) { // Imageno[i] = fv.PageFilePath(i); fv.PageText(i, i) // page insert if (type == "index") { indexSaveData += "d¢Ë" + fso.GetBaseName(fv.PageHiddenText(i)) + "¢Ë" + i + "¢Ë" + parent.parent.model.getValue("/root/user/instcd") + "¢Ì"; /* * model.setValue("/root/send/paget/pageno", * fso.GetBaseName(fv.PageHiddenText(i))); * model.setValue("/root/send/paget/treatno", * parent.model.getValue("/root/send/chartpaget/treatno")); * model.setValue("/root/send/paget/formcode", * parent.model.getValue("/root/send/chartpaget/formcode")); * model.setValue("/root/send/paget/page", i); * model.setValue("/root/send/paget/instcd", * parent.parent.model.getValue("/root/user/instcd")); * * model.refresh(); */ } else if (type == "scan") { scanSaveData += "d¢Ë" + fv.PageHiddenText(i) + "¢Ë" + i + "¢Ë" + parent.parent.model.getValue("/root/user/instcd") + "¢Ì"; /* * model.setValue("/root/send/scaninfo/fileno", * fv.PageHiddenText(i)); * model.setValue("/root/send/scaninfo/page", i); * model.setValue("/root/send/scaninfo/instcd", * parent.parent.model.getValue("/root/user/instcd")); * * model.refresh(); */ } } if (type == "index") { model.setValue("/root/send/paget/pageno", indexSaveData); submit("TXMPL03322"); } else if (type == "scan") { model.setValue("/root/send/scaninfo/fileno", scanSaveData); submit("TXMPL03323"); } fv_preview.PageRemove(0,0); fv_preview.ViewMode = 0; } else if (shift == 3) { // Èò»öÀ¸·Î ä¿ì±â CTRL + SHFIT + M(L) copyfile(fv.PageFilePath(page), page, "R") fv.PageCurrent = page; fv.ActionParamINT1 = x; fv.ActionParamINT2 = y; fv.ActionParamINT3 = 16777215; fv.ActionParamINT4 = 10; fv.ActionSingle = 20; fv.FileSaveCreate(fv.PageFilePath(page), -1); fv.ActionParamINT1 = page; fv.ActionThumbnail = 1; // alert("Èò»öä¿ì±â"); // ·ÎÄà -> ¼­¹ö FilePut LocalPath = fv.PageFilePath(page); RemotePath = fv.PageHiddenText(page); LTPFilePut(RemotePath, LocalPath); } else if (shift == 4) { // Àß¶ó³»±â ALT + M(L) copyfile(fv.PageFilePath(page), page, "R") fv.PageCurrent = page; /* * if (y < (fv.PageHeight / 2) && x < (fv.PageWidth / 2)) { * fv.ActionParamINT1 = x; fv.ActionParamINT2 = y; * fv.ActionParamINT3 = fv.PageWidth - 1; fv.ActionParamINT4 = * fv.PageHeight - 1; } else if (y > (fv.PageHeight / 2) && x > * (fv.PageWidth / 2)) { fv.ActionParamINT1 = 0; * fv.ActionParamINT2 = 0; fv.ActionParamINT3 = x; * fv.ActionParamINT4 = y; } else if (y > (fv.PageHeight / 2) && * x < (fv.PageWidth / 2)) { fv.ActionParamINT1 = x; * fv.ActionParamINT2 = 0; fv.ActionParamINT3 = fv.PageWidth - * 1; fv.ActionParamINT4 = y; } else if (y < (fv.PageHeight / 2) && * x > (fv.PageWidth / 2)) { fv.ActionParamINT1 = 0; * fv.ActionParamINT2 = y; fv.ActionParamINT3 = x; * fv.ActionParamINT4 = PageHeight - 1; } */ if (y > (fv.PageHeight / 2) && x > (fv.PageWidth / 2)) { fv.ActionParamINT1 = 0; fv.ActionParamINT2 = 0; fv.ActionParamINT3 = x; fv.ActionParamINT4 = y; } else if (y < (fv.PageHeight / 2) && x > (fv.PageWidth / 2)) { fv.ActionParamINT1 = 0; fv.ActionParamINT2 = y; fv.ActionParamINT3 = x; fv.ActionParamINT4 = PageHeight - 1; } copyfile(fv.PageFilePath(page), page, "R") // fv.ActionSingle = 10; fv.ActionParamINT1 = 16777215; fv.ActionSingle = 16; fv.FileSaveCreate(fv.PageFilePath(page), -1); fv.ActionParamINT1 = page; fv.ActionThumbnail = 1; // ·ÎÄà -> ¼­¹ö FilePut LocalPath = fv.PageFilePath(page); RemotePath = fv.PageHiddenText(page); LTPFilePut(RemotePath, LocalPath); } } else if(button == 2) { if(shift == 0) { if(page == 0 ) { } else { if (mode != "blank") { var obj; obj = parent.document.controls.item("f_preview"); // parent.f_preview.PageRemove(1,1); obj.attribute("visibility") = ""; parent.f_preview.pageappend(fv.PageFilePath(page),1,1) parent.f_preview.PageCurrent = page; parent.f_preview.fitmode = 3; obj.attribute("visibility") = ""; // fv.ViewMode = 0; // fv.BestFit; // fv.PageCurrent = page; } } } else if(shift == 1) { // alert("shift1"); } else if(shift == 2) { // ÅØ½ºÆ® ÀÔ·Â CTRL + M(R) copyfile(fv.PageFilePath(page), page, "R") fv.ActionSingle = 10; fv.PageCurrent = page; fv.ActionParamINT1 = page; fv.DrawString(x, y, parent.rgb(0, 0, 0), parent.rgb(255, 255, 255), cbo_imgstate.value, "±¼¸²Ã¼", 20, true, false, false, false); fv.FileSaveCreate(fv.PageFilePath(page), -1); fv.ActionParamINT1 = page; fv.ActionThumbnail = 1; LocalPath = fv.PageFilePath(page); RemotePath = fv.PageHiddenText(page); LTPFilePut(RemotePath, LocalPath); } else if(shift == 3) { // ±â¿ï±â º¸Á¤ // alert("R shift == 3"); copyfile(fv.PageFilePath(page), page, "R") Deskew(fv, page) // ·ÎÄà -> ¼­¹ö FilePut LocalPath = fv.PageFilePath(page); RemotePath = fv.PageHiddenText(page); LTPFilePut(RemotePath, LocalPath); } else if(shift == 4) { // °¡·Î·Î ÀÚ¸£±â ALT + M(R) copyfile(fv.PageFilePath(page), page, "R") fv.PageCurrent = page; if(y < (fv.PageHeight / 2)) { fv.ActionParamINT1 = 0; fv.ActionParamINT2 = y; fv.ActionParamINT3 = fv.PageWidth - 1; fv.ActionParamINT4 = fv.PageHeight - 1; } else if(y > (fv.PageHeight / 2)) { fv.ActionParamINT1 = 0; fv.ActionParamINT2 = 0; fv.ActionParamINT3 = fv.PageWidth - 1; fv.ActionParamINT4 = y; } fv.ActionSingle = 10; fv.ActionParamINT1 = 16777215; fv.ActionSingle = 16; fv.FileSaveCreate(fv.PageFilePath(page), -1); fv.ActionParamINT1 = page; fv.ActionThumbnail = 1; // ·ÎÄà -> ¼­¹ö FilePut LocalPath = fv.PageFilePath(page); RemotePath = fv.PageHiddenText(page); LTPFilePut(RemotePath, LocalPath); } } } } function ImageClick_event(fv, page, shift, button, x, y, fv_temp, type ) { var LocalPath; var RemotePath; var fso = new ActiveXObject("Scripting.FileSystemObject"); var scanSaveData = "status¢Ëfileno¢Ëpage¢Ëinstcd¢Ì"; var indexSaveData = "status¢Ëpageno¢Ëpage¢Ëinstcd¢Ì"; var indexinfo; TrashFolder() if(button == 1) { if(shift == 0) { } else if (shift == 3) { // Èò»öÀ¸·Î ä¿ì±â CTRL + SHFIT + M(L) copyfile(fv.PageFilePath(page), page, "R") fv.PageCurrent = page; fv.ActionParamINT1 = x; fv.ActionParamINT2 = y; fv.ActionParamINT3 = 16777215; fv.ActionParamINT4 = 10; fv.ActionSingle = 20; fv.FileSaveCreate(fv.PageFilePath(page), -1); fv.ActionParamINT1 = page; fv.ActionThumbnail = 1; // alert("Èò»öä¿ì±â"); // ·ÎÄà -> ¼­¹ö FilePut LocalPath = fv.PageFilePath(page); RemotePath = fv.PageHiddenText(page); LTPFilePut(RemotePath, LocalPath); } } else if (button == 2) { // f_View.fitmode = 3; if(shift == 0) { if(page == 0 ) { } else { parent.f_preview.pageappend(fv.PageFilePath(page),1,1) parent.f_preview.PageCurrent = page; var obj; obj = parent.document.controls.item("f_preview"); obj.attribute("visibility") = ""; // fv.ViewMode = 0; // fv.BestFit; // fv.PageCurrent = page; } } else if(shift == 2) { // ÅØ½ºÆ® ÀÔ·Â CTRL + M(R) copyfile(fv.PageFilePath(page), page, "R") fv.ActionSingle = 10; fv.PageCurrent = page; fv.ActionParamINT1 = page; fv.DrawString(x, y, parent.rgb(0, 0, 0), parent.rgb(255, 255, 255), cbo_imgstate.value, "±¼¸²Ã¼", 20, true, false, false, false); fv.FileSaveCreate(fv.PageFilePath(page), -1); fv.ActionParamINT1 = page; fv.ActionThumbnail = 1; LocalPath = fv.PageFilePath(page); RemotePath = fv.PageHiddenText(page); LTPFilePut(RemotePath, LocalPath); } else if(shift == 4) { // °¡·Î·Î ÀÚ¸£±â ALT + M(R) copyfile(fv.PageFilePath(page), page, "R") fv.PageCurrent = page; if(y < (fv.PageHeight / 2)) { fv.ActionParamINT1 = 0; fv.ActionParamINT2 = y; fv.ActionParamINT3 = fv.PageWidth - 1; fv.ActionParamINT4 = fv.PageHeight - 1; } else if(y > (fv.PageHeight / 2)) { fv.ActionParamINT1 = 0; fv.ActionParamINT2 = 0; fv.ActionParamINT3 = fv.PageWidth - 1; fv.ActionParamINT4 = y; } fv.ActionSingle = 10; fv.ActionParamINT1 = 16777215; fv.ActionSingle = 16; fv.FileSaveCreate(fv.PageFilePath(page), -1); fv.ActionParamINT1 = page; fv.ActionThumbnail = 1; // ·ÎÄà -> ¼­¹ö FilePut LocalPath = fv.PageFilePath(page); RemotePath = fv.PageHiddenText(page); LTPFilePut(RemotePath, LocalPath); } } } function ThumbnailDblClick_event(page) { scanview_setupChart("PV"); f_View.PageCurrent = page; } function ImageDblClick_event(page) { selectpage scanview_setupChart("TV"); f_View.actionparamint1 = page; f_View.actionnail = 10; } function LocalLoadPath(filePath) { var filePath; filePath = g_path[filePath.length] } function openImageFileDialogs() { var file = window.fileDialog("open","|",true,"","","All Files (*.*)|*.*|JPEG Files(*.jpg)|*.jpg|TIFF Files(*.tif)|*.tif"); return file; } function scanLoad(file) { // RefreshFalse(); // ClearChart(); SelectLoadChart(file); // scanview_setupChart("TV"); // RefreshTrue(); } function scanInsLoad(file, page) { RefreshFalse(); // ClearChart(); SelectInsLoadChart(file, page); scanview_setupChart("TV"); RefreshTrue(); } function SelectLoadChart(files) { var l_files; var i = 0; var filename; var addpage; var fso = new ActiveXObject("Scripting.FileSystemObject"); var file; var scancolor; var scanfolder = fso.GetSpecialFolder(2) + "\\LCViewer"; var dfile; var bPage; if (fso.FolderExists(fso.GetSpecialFolder(2) + "\\LCViewer\\") == false) { fso.CreateFolder(fso.GetSpecialFolder(2) + "\\LCViewer\\"); } if (files == "") { return false; } else { l_files = files.split("|"); // f_View.AutoRefresh = false; for(i=0 ; i <= l_files.length -1 ; i++) { scancolor = fso.GetExtensionName(l_files[i]); file = scanfolder + "\\" + getTime() + getMilliseconds() + "." + scancolor; dfile = fso.GetFile(l_files[i]); dfile.Copy(fso.GetSpecialFolder(2) + "\\LCViewer\\" + fso.GetFileName(file)); f_View.pageappend(file,1,1); f_View.ActionParamINT1 = f_View.PageTotal; f_View.ActionThumbnail = 10; f_View.PageCurrent = f_View.PageTotal; f_View.ActionSingle = 3; // f_View.PageText(i) = (f_View.PageTotal, f_View.PageTotal); /* * switch(parent.model.getValue("/root/send/rotate/front")) { case * "Front90": f_View.actionsingle = 6; break; case "Front270": * f_View.actionsingle = 7; break; case "Front180": * f_View.actionsingle = 8; break; } * f_View.FileSaveCreate(l_files[i], -1); */ } // f_View.AutoRefresh = true; } } function SelectInsLoadChart(files, page) { var l_files; var i = 0; var filename; if (files == "") { return false; } else { l_files = files.split("|"); f_View.AutoRefresh = false; for(i=0 ; i <= l_files.length -1 ; i++) { f_View.PageInsert(page, l_files[i],1,1); f_View.PageHiddenText(i) = l_files[i] } f_View.AutoRefresh = true; } } function OcrScanInsert(file, blk) { var l_file; var i ; var remotePath; var remoteFileName; var remoteFullPath; var localPath; var dirs = new Array(); var savefile; var SaveIP; var stryear = getYear(); var strmonth = getMonth(); var strday = getDay(); var strtime var strmilliseconds remotePath = parent.model.getvalue("root/main/ltpscaninfo/ltpscanpath") parent.f_ltp.FolderCreate(remotePath); l_file = file.split("|"); // f_View.AutoRefresh = false; for(i=0; i <= l_file.length - 1 ; i++) { strmilliseconds = getMilliseconds(); strtime =getTime(); remoteFileName = stryear + "" + strmonth + "" + strday + "" + strtime + "" + strmilliseconds if (blk == "1") { remoteFileName = "\\" + remoteFileName + ".tif" } else { remoteFileName = "\\" + remoteFileName + ".jpg" } remoteFullPath = remotePath + remoteFileName; model.setvalue("/root/send/ocrscaninfo/fileno", remoteFullPath); submit("TXMPL03305"); localpath = l_file[i]; LTPFilePut(remoteFullPath, localpath, "parent"); } // f_View.AutoRefresh = true; } function LTPInit(server, port, user, sub) { if (sub == "parent") { if(parent.f_ltp.IsOnline) { } else { parent.f_ltp.server = server; parent.f_ltp.port = '2500'; parent.f_ltp.account = 'user'; if(parent.f_ltp.Connect()) { } else { alert('LTP µ¥¸ó°úÀÇ Á¢¼ÓÀÌ ½ÇÆÐÇÏ¿´½À´Ï´Ù.'); } } } else if (sub == "parentparent") { if(parent.parent.f_ltp.IsOnline) { } else { parent.parent.f_ltp.server = server; parent.parent.f_ltp.port = '2500'; parent.parent.f_ltp.account = 'user'; if(parent.parent.f_ltp.Connect()) { } else { alert('LTP µ¥¸ó°úÀÇ Á¢¼ÓÀÌ ½ÇÆÐÇÏ¿´½À´Ï´Ù.'); } } } else if (sub == "trash") { if(opener.parent.f_ltp.IsOnline) { } else { opener.parent.f_ltp.server = server; opener.parent.f_ltp.port = '2500'; opener.parent.f_ltp.account = 'user'; if(opener.parent.f_ltp.Connect()) { } else { alert('LTP µ¥¸ó°úÀÇ Á¢¼ÓÀÌ ½ÇÆÐÇÏ¿´½À´Ï´Ù.'); } } } else { if(f_ltp.IsOnline) { } else { f_ltp.server = server; f_ltp.port = '2500'; f_ltp.account = 'user'; if(f_ltp.Connect()) { } else { alert('LTP µ¥¸ó°úÀÇ Á¢¼ÓÀÌ ½ÇÆÐÇÏ¿´½À´Ï´Ù.'); } } } } // LTP ¿¬°á ÇØÁ¦ function LTPClose() { f_ltp.Close(); } function LTPFileGet(remotePath, localPath) { LTPInit(model.getvalue("/root/main/ltpscaninfo/ltpscanserver"), model.getvalue("/root/main/ltpscaninfo/ltpscanport"), model.getvalue("/root/main/ltpscaninfo/ltpscanuser")); var is_succeed = f_ltp.FileGet(remotePath, localPath); if (is_succeed == false) { alert("ÆÄÀÏ´Ù¿î·Îµå¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù."); } return is_succeed; } function LTPFilePut(remotePath, localPath, sub) { if (sub == "parent") { LTPInit(parent.model.getvalue("/root/main/ltpscaninfo/ltpscanserver"), parent.model.getvalue("/root/main/ltpscaninfo/ltpscanport"), parent.model.getvalue("/root/main/ltpscaninfo/ltpscanuser"), "parent"); var is_succeed = parent.f_ltp.FilePut(remotePath, localPath); } else if(sub == "trash") { LTPInit(opener.model.getvalue("/root/main/ltpscaninfo/ltpscanserver"), opener.model.getvalue("/root/main/ltpscaninfo/ltpscanport"), opener.model.getvalue("/root/main/ltpscaninfo/ltpscanuser"), "trash"); var is_succeed = opener.parent.f_ltp.FilePut(remotePath, localPath); } else { LTPInit(model.getvalue("/root/main/ltpscaninfo/ltpscanserver"), model.getvalue("/root/main/ltpscaninfo/ltpscanport"), model.getvalue("/root/main/ltpscaninfo/ltpscanuser")); var is_succeed = f_ltp.FilePut(remotePath, localPath); } if (is_succeed == false) { alert("ÆÄÀϾ÷·Îµå¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù."); } return is_succeed; } function LTPFilesGet(remotePath, localPath, sub) { if (sub == "trash") { LTPInit(model.getvalue("/root/main/ltpscaninfo/ltpscanserver"), model.getvalue("/root/main/ltpscaninfo/ltpscanport"), model.getvalue("/root/main/ltpscaninfo/ltpscanuser"), "trash"); return opener.parent.f_ltp.FilesGet(remotePath, localPath); } else { LTPInit(model.getvalue("/root/main/ltpscaninfo/ltpscanserver"), model.getvalue("/root/main/ltpscaninfo/ltpscanport"), model.getvalue("/root/main/ltpscaninfo/ltpscanuser")); return f_ltp.FilesGet(remotePath, localPath); } } function LTPFilesPut(remotePath, localPath, sub) { return f_ltp.FilesPut(remotePath, localPath); } function getFiles(host, port, user, pass, pathRemote, pathLocal, sub) { var result; if (sub == "trash") { LTPInit(host, port, user, "trash"); result = LTPFilesGet(pathRemote, pathLocal, "trash"); } else if (sub == "parent") { LTPInit(host, port, user, "parent"); result = LTPFilesGet(pathRemote, pathLocal); } else { LTPInit(host, port, user); result = LTPFilesGet(pathRemote, pathLocal); } // LTPClose(); return result; } function getYear() { var now = new Date(); return now.getFullYear(); } function getMonth() { var now = new Date(); var month = now.getMonth() + 1; // 1¿ù=0,12¿ù=11À̹ǷΠ1 ´õÇÔ if (("" + month).length == 1) { month = "0" + month; } return month; } function getDay() { var now = new Date(); var day = now.getDate(); if (("" + day).length == 1) { day = "0" + day; } return day; // return getCurrentTime().substr(6,2); // return getCurrentTime(); } function getTime() { return getCurrentTime(); } function getMilliseconds() { var now = new Date(); return now.getMilliseconds(); } function imgload(count, type, row){ var fso = new ActiveXObject("Scripting.FileSystemObject"); var locaffullpath; var i; var trashpageno; var extension; var remotepath if (type == "scan") { RefreshFalse(); } if (fso.FolderExists(fso.GetSpecialFolder(2) + "\\LCViewer\\") == false) { fso.CreateFolder(fso.GetSpecialFolder(2) + "\\LCViewer\\"); } for (i=1; i <= count; i++) { if (type == "scan") { remotepath = parent.model.getValue("/root/main/scaninfo[" + i + "]/fileno"); } else if (type == "trash") { trashpageno = dg_trash.valueMatrix(dg_trash.row, dg_trash.colref("pageno")); extension = dg_trash.valueMatrix(dg_trash.row, dg_trash.colref("extension")); remotepath = trashpageno + "." + extension; } locaffullpath = fso.GetSpecialFolder(2) + "\\LCViewer\\" + fso.GetFileName(remotepath); f_View.PageAppend(locaffullpath, 1, 1); f_View.ActionParamInt1 = i; f_View.PageHiddenText(i) = remotepath; f_View.PageText(i) = (f_View.PageTotal, f_View.PageTotal); if (type == "scan") { // scanview_setupChart("TV"); model.setValue("/root/main/chartinfo/pagecurrent", 1); } else if (type == "trash") { model.setValue("/root/send/scaninfo/fileno", locaffullpath); model.setValue("/root/send/scaninfo/pageno", fso.GetBaseName(remotepath)); } } if (type == "scan") { RefreshTrue(); model.setValue("/root/main/chartinfo/pagetotal", f_View.PageTotal); } f_View.PageCurrent = 1; f_View.actionthumbnail = 4; model.refresh(); } function indeximg() { var fso = new ActiveXObject("Scripting.FileSystemObject"); var path = model.getvalue("root/main/ltpindexinfo/ltpindexserver") var year = getYear(); var month = getMonth(); var day = getDay(); var remotepath; var localpath; remotepath = path + "\\" + year + "" + month f_ltp.FolderCreate(remotepath); remotepath = remotepath + "\\" + day f_ltp.FolderCreate(remotepath); localpath = f_View.PageFilePath(model.getValue("/root/main/chartinfo/pagecurrent")); remotepath = remotepath + "\\" + fso.GetFileName(localpath); LTPFilePutIndex(remotepath, localpath) /* * switch(model.getValue("/root/cond/radio")) { case "PV": localpath = * f_view.PageFilePath(remotepath) * * case "TV": * * for (count = 1; count <= f_View.PageTotal; count++) { * if(f_View.ThumbnailSelect(count) == true) { } } } */ } function LTPFilePutIndex(remotePath, localPath) { LTPInit(model.getvalue("/root/main/ltpindexinfo/ltpindexserver"), model.getvalue("/root/main/ltpindexinfo/ltpindexport"), model.getvalue("/root/main/ltpindexinfo/ltpindexuser")); var is_succeed = f_ltp.FilePut(remotePath, localPath); if (is_succeed == false) { alert("ÆÄÀϾ÷·Îµå¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù."); } return is_succeed; } function appendchart(totpage, shortkey) { var fso = new ActiveXObject("Scripting.FileSystemObject"); var filename; var fullfilename; var remotepath; var localpath; var cdate; var cdateyyyymm; var cdatedd; var path = parent.parent.model.getValue("/root/main/ltpindexinfo/ltpindexpath"); f_View.AutoRefresh = false; for (i = 1; i <= totpage; i++) { if (shortkey == "shortkey") { cdate = parent.iviewer1.model.getValue("/root/main/imgpath[" + i + "] /cdate"); cdateyyyymm = cdate.substr(0,6); cdatedd = cdate.substr(6,2) filename = parent.iviewer1.model.getValue("/root/main/imgpath[" + i + "] /pageno") fullfilename = parent.iviewer1.model.getValue("/root/main/imgpath[" + i + "] /pageno") + "." + parent.iviewer1.model.getValue("/root/main/imgpath[" + i + "] /extension"); } else { cdate = parent.model.getValue("/root/main/imgpath[" + i + "] /cdate"); cdateyyyymm = cdate.substr(0,6); cdatedd = cdate.substr(6,2); filename = parent.model.getValue("/root/main/imgpath[" + i + "] /pageno") fullfilename = parent.model.getValue("/root/main/imgpath[" + i + "] /pageno") + "." + parent.model.getValue("/root/main/imgpath[" + i + "] /extension"); } remotepath = path + "\\" + cdateyyyymm + "\\" + cdatedd + "\\" + filename.substr(filename.length - 1, 1) + "\\" + fullfilename; localpath = fso.GetSpecialFolder(2) + "\\LCViewer\\" + fullfilename; f_View.PageAppend(localpath, 1, 1); f_View.PageHiddenText(i) = remotepath; f_View.PageText(i) = (f_View.PageTotal, f_View.PageTotal); f_View.ActionParamInt1 = i; model.setValue("/root/main/chartinfo/pagecurrent", 1); } f_View.AutoRefresh = true; f_View.PageCurrent = f_View.PageTotal; f_View.ActionThumbnail = 1; f_View.actionsingle = 2; model.setValue("/root/main/chartinfo/pagetotal", f_View.PageTotal); model.refresh(); } function downloadChart(totpage, type, row, shortkey) { var fso = new ActiveXObject("Scripting.FileSystemObject"); var filename; var fullfilename; var remotepath; var pathRemote; var localpath; var pathLocal; var cdate; var cdateyyyymm; var cdatedd; var path; var trashpath = opener.parent.model.getValue("/root/main/ltpindexinfo/ltpindexpath") + "\\" + "delfolder\\"; var trashpageno; var extension; for (i = 1; i <= totpage; i++) { if (type == "index") { if (shortkey == "shortkey") { cdate = parent.iviewer1.model.getValue("/root/main/imgpath[" + i + "] /cdate"); cdateyyyymm = cdate.substr(0,6); cdatedd = cdate.substr(6,2) filename = parent.iviewer1.model.getValue("/root/main/imgpath[" + i + "] /pageno") fullfilename = parent.iviewer1.model.getValue("/root/main/imgpath[" + i + "] /pageno") + "." + parent.iviewer1.model.getValue("/root/main/imgpath[" + i + "] /extension"); path = parent.iviewer1.model.getValue("/root/main/imgpath[" + i + "]/ltppath"); remotepath = path + "\\" + cdateyyyymm + "\\" + cdatedd + "\\" + filename.substr(filename.length - 1, 1) + "\\" + fullfilename; localpath = fso.GetSpecialFolder(2) + "\\LCViewer\\" + fullfilename; } else { cdate = parent.model.getValue("/root/main/imgpath[" + i + "] /cdate"); cdateyyyymm = cdate.substr(0,6); cdatedd = cdate.substr(6,2) filename = parent.model.getValue("/root/main/imgpath[" + i + "] /pageno") fullfilename = parent.model.getValue("/root/main/imgpath[" + i + "] /pageno") + "." + parent.model.getValue("/root/main/imgpath[" + i + "] /extension"); path = parent.model.getValue("/root/main/imgpath[" + i + "]/ltppath"); remotepath = path + "\\" + cdateyyyymm + "\\" + cdatedd + "\\" + filename.substr(filename.length - 1, 1) + "\\" + fullfilename; localpath = fso.GetSpecialFolder(2) + "\\LCViewer\\" + fullfilename; } } else if (type == "scan") { remotepath = parent.model.getValue("/root/main/scaninfo[" + i + "]/fileno"); localpath = fso.GetSpecialFolder(2) + "\\LCViewer\\" + fso.GetFileName(remotepath); } else if (type == "trash") { trashpageno = dg_trash.valueMatrix(dg_trash.row, dg_trash.colref("pageno")); extension = dg_trash.valueMatrix(dg_trash.row, dg_trash.colref("extension")); remotepath = trashpath + trashpageno + "." + extension; localpath = fso.GetSpecialFolder(2) + "\\LCViewer\\" + fso.GetFileName(remotepath); } pathRemote = pathRemote + "|"; pathLocal = pathLocal + "|"; pathRemote = pathRemote + remotepath; pathLocal = pathLocal + localpath; } if (type == "trash") { getFiles(opener.parent.model.getvalue("/root/main/ltpindexinfo/ltpindexserver"), opener.parent.model.getvalue("/root/main/ltpindexinfo/ltpindexport"), opener.parent.model.getvalue("/root/main/ltpindexinfo/ltpindexuser"), "", pathRemote, pathLocal, "trash"); } else { getFiles(parent.parent.model.getvalue("/root/main/ltpindexinfo/ltpindexserver"), parent.parent.model.getvalue("/root/main/ltpindexinfo/ltpindexport"), parent.parent.model.getvalue("/root/main/ltpindexinfo/ltpindexuser"), "", pathRemote, pathLocal, "parentparent"); } } function scantest(ScanServer, ScanPort, ScanUser) { f_Twain.ShowAcquireUI = true; f_Twain.Acquire("C:\SCHTEST\test.tif"); // f_Twain.ShowDialogSelect(); } function f_Twain_PageEnd(PageSeq, PageInFile, FilePath, twRC) { if (twRC == 0) then { } } function DelScanImg(fv, delboolean, workmode, comp) { var fso = new ActiveXObject("Scripting.FileSystemObject"); var fileno; var filename; var filehidden; var instcd; var patno; var ioflag; var sSaveData = "status¢Ëpatno¢Ëioflag¢Ëfileno¢Ëinstcd¢Ì"; var sSaveDataDel = "status¢Ëpatno¢Ëioflag¢Ëpage¢Ëinstcd¢Ì"; var i; var j; var instcd = parent.model.getValue("/root/user/instcd");; var delpage = 0; var dfile; var gridpath; // getUserInfo("dutplceinstcd") fv.AutoRefresh = false; TrashFolder() if (delboolean == "del") { if (parent.model.getValue("/root/cond/gubun") == "SCAN") { patno = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("patid")); ioflag = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("class")); } else { patno = parent.parent.model.getValue("/root/user/scanuser"); ioflag = "Z"; } instcd = parent.parent.model.getValue("/root/user/instcd"); if (rdo_viewmode.value == "TV") { for (i=fv.PageTotal; i>= 1; i--) { if (workmode == "OLD") { if(fv.ThumbnailSelect(i) == true) { filename = fv.PageFilePath(i); filehidden = fv.PageHiddenText(i); page = i copyfile(fv.PageFilePath(i), page, "S") sSaveData += "d¢Ë" + patno + "¢Ë" + ioflag + "¢Ë" + filehidden + "¢Ë" + instcd + "¢Ì"; sSaveDataDel += "d¢Ë" + patno + "¢Ë" + ioflag + "¢Ë" + page + "¢Ë" + instcd + "¢Ì"; parent.parent.f_ltp.FileDelete(filehidden); fv.PageRemove(i,i); fv.ActionParamINT1 = i; fv.ActionThumbnail = 10; fv.PageCurrent = i; delpage = delpage + 1; } } else { if (comp == "COMP") { filename = fv.PageFilePath(i); for (j=parent.dg_treat.rows - 1; j >= 1; j--) { gridpath = parent.dg_treat.valueMatrix(j, parent.dg_treat.colref("fileno")); if (gridpath == filename) { filehidden = fv.PageHiddenText(i); page = i copyfile(fv.PageFilePath(i), page, "S") sSaveData += "d¢Ë" + patno + "¢Ë" + ioflag + "¢Ë" + filehidden + "¢Ë" + instcd + "¢Ì"; sSaveDataDel += "d¢Ë" + patno + "¢Ë" + ioflag + "¢Ë" + page + "¢Ë" + instcd + "¢Ì"; parent.parent.f_ltp.FileDelete(filehidden); fv.PageRemove(i,i); parent.dg_treat.deleteitem(j); fv.ActionParamINT1 = i-1; fv.ActionThumbnail = 10; fv.PageCurrent = i-1; delpage = delpage + 1; } } } else { if(fv.ThumbnailSelect(i) == true) { filename = fv.PageFilePath(i); filehidden = fv.PageHiddenText(i); page = i sSaveData += "d¢Ë" + patno + "¢Ë" + ioflag + "¢Ë" + filehidden + "¢Ë" + instcd + "¢Ì"; sSaveDataDel += "d¢Ë" + patno + "¢Ë" + ioflag + "¢Ë" + page + "¢Ë" + instcd + "¢Ì"; parent.parent.f_ltp.FileDelete(filehidden); fv.PageRemove(i,i); fv.ActionParamINT1 = f_View.PageTotal; fv.ActionThumbnail = 10; fv.PageCurrent = f_View.PageTotal; delpage = delpage + 1; copyfile(fv.PageFilePath(i), page, "S") } } } } } else { i = fv.PageCurrent; filename = fv.PageFilePath(i); filehidden = fv.PageHiddenText(i); page = i sSaveData += "d¢Ë" + patno + "¢Ë" + ioflag + "¢Ë" + filehidden + "¢Ë" + instcd + "¢Ì"; sSaveDataDel += "d¢Ë" + patno + "¢Ë" + ioflag + "¢Ë" + page + "¢Ë" + instcd + "¢Ì"; parent.parent.f_ltp.FileDelete(filehidden); fv.PageRemove(i,i); fv.ActionParamINT1 = i; fv.ActionThumbnail = 10; fv.PageCurrent = i; copyfile(fv.PageFilePath(i), page, "S") } model.setValue("/root/send/delimage/updata", sSaveDataDel); submit("TXMPL03329"); model.setValue("/root/send/delimage/fileno", sSaveData); submit("TXMPL03318"); } else if (delboolean == "blank") { patno = opener.parent.dg_treat.valueMatrix(opener.parent.dg_treat.row, opener.parent.dg_treat.colref("patid")); ioflag = opener.parent.parent.model.getValue("/root/user/class"); instcd = opener.parent.parent.model.getValue("/root/user/instcd"); model.setValue("/root/send/delimage/patno", patno); model.setValue("/root/send/delimage/instcd", ioflag); model.setValue("/root/send/delimage/ioflag", instcd); for (i=fv.PageTotal; i>= 1; i--) { if(fv.ThumbnailSelect(i) == false) { filename = opener.f_View.PageFilePath(fv.PageHiddenText(i)); filehidden = opener.f_View.PageHiddenText(fv.PageHiddenText(i)); model.setValue("/root/send/delimage/fileno", filehidden); model.setValue("/root/send/delimage/page", fv.PageHiddenText(i)); sSaveData += "d¢Ë" + patno + "¢Ë" + ioflag + "¢Ë" + filehidden + "¢Ë" + instcd + "¢Ì"; opener.f_View.PageRemove(fv.PageHiddenText(i), fv.PageHiddenText(i)); fv.PageRemove(i,i) opener.optPageTotal.text = parseInt(opener.optPageTotal.text) - 1; opener.parent.parent.f_ltp.FileDelete(filehidden); opener.model.refresh(); submit("TXMPL03329"); delpage = delpage + 1; copyfile(fv.PageFilePath(i), i, "S") } } opener.optPageTotal.text = opener.optPageTotal.text - delpage; model.setValue("/root/send/delimage/fileno", sSaveData); submit("TXMPL03318"); } for (i=1; i <= fv.PageTotal; i++) { fv.PageText(i, i); } fv.AutoRefresh = true; } function DelIndexImgFile(fv, delboolean) { var fso = new ActiveXObject("Scripting.FileSystemObject"); var fileno; var filename; var filehidden; var instcd; var patno = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("patid")); var ioflag; var i; var instcd; var delpage; // getUserInfo("dutplceinstcd") TrashFolder(); delpage = 0; fv.AutoRefresh = false; if (delboolean == "del") { if (rdo_viewmode.value == "TV") { for (i=fv.PageTotal; i>= 1; i--) { if(fv.ThumbnailSelect(i) == true) { filehidden = fv.PageHiddenText(i); // ȯÀÚ³ª ¼­½Ä À̵¿À» À§ÇØ trashfolder¿¡ Àӽà º¹»ç filename = fv.PageFilePath(i); copyfile(fv.PageFilePath(i), i, "Y") parent.parent.f_ltp.FileDelete(filehidden); fv.PageRemove(i,i); fv.PageCurrent = i; } } } else { i = fv.PageCurrent; filehidden = fv.PageHiddenText(i); // ȯÀÚ³ª ¼­½Ä À̵¿À» À§ÇØ trashfolder¿¡ Àӽà º¹»ç filename = fv.PageFilePath(i); copyfile(fv.PageFilePath(i), page, "Y") parent.parent.f_ltp.FileDelete(filehidden); fv.PageRemove(i, i); delpage = 1; fv.ActionParamINT1 = i; fv.ActionThumbnail = 10; fv.PageCurrent = i; } model.refresh(); parent.dg_index1.textmatrix(parent.dg_index1.row, 1) = fv.PageTotal; for (i=1; i <= fv.PageTotal; i++) { fv.PageText(i, i); } } fv.AutoRefresh = true; } function DelIndexImg(cutyn, delpage, trash) { var filename; // = model.getValue("root/send/delimage/imageno"); var fso = new ActiveXObject("Scripting.FileSystemObject"); var pageno; var selpage; var i; var cdate; var ctime; var delfoler = parent.parent.model.getValue("/root/main/ltpindexinfo/ltpindexpath") + "\\" + "delfolder"; var bDelData = "status¢Ëpageno¢Ëinstcd¢Ì"; var bUpdpageData = "status¢Ëtreatno¢Ëformcode¢Ëpage¢Ëinstcd¢Ì" var bIntPageDelLogt = "status¢Ëpageno¢Ëpatid¢Ëindate¢Ëclincode¢Ëclass¢Ëdoccode¢Ëformcode¢Ëpage¢Ëcdate¢Ëctime¢Ëcuserid¢Ëtreatno¢Ëocrcode¢Ëinstcd¢Ì"; var instcd = parent.parent.model.getValue("/root/user/instcd"); var cuserid = parent.parent.model.getValue("/root/user/scanuser"); var patid = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("patid")); var ioflag = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("class")); var formcode = parent.model.getValue("/root/send/paget/formcode"); var treatno = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("treatno")); var clincode = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("clincode")); var indate = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("indate")); var doccode = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("doccode")); var page; var cdate; var ctime; var cutFilename = ""; parent.parent.f_ltp.FolderCreate(delfoler); submit("TRMPL03311"); cdate = model.getValue("/root/main/now/sysdate").substr(0, 8); ctime = model.getValue("/root/main/now/sysdate").substr(8, 6); if (delpage == "") { if (rdo_viewmode.value == "TV") { for (i=1; i <= f_View.PageTotal; i++) { if(f_View.ThumbnailSelect(i) == true) { filename = f_View.PageFilePath(i); filehidden = f_View.PageHiddenText(i); var fso = new ActiveXObject("Scripting.FileSystemObject"); selpage = i; model.setValue("/root/cond/scanmode", "add"); page = i; if (trash != "trash") { LTPFilePut(delfoler + "\\" + fso.GetFileName(filehidden), filename, "parentparent"); } filehidden = fso.GetBaseName(filehidden); bDelData += "d¢Ë" + filehidden + "¢Ë" + instcd + "¢Ì"; bUpdpageData += "d¢Ë" + treatno + "¢Ë" + formcode + "¢Ë" + page + "¢Ë" + instcd + "¢Ì"; bIntPageDelLogt += "d¢Ë" + filehidden + "¢Ë" + patid + "¢Ë" + indate + "¢Ë" + clincode + "¢Ë" + ioflag + "¢Ë00000¢Ë" + formcode + "¢Ë" + page + "¢Ë" + cdate + "¢Ë" + ctime + "¢Ë" + cuserid + "¢Ë" + treatno + "¢Ë" + "" + "¢Ë" + instcd + "¢Ì"; if(cutFilename == "") { cutFilename = filename; } else { cutFilename = cutFilename + "|"; cutFilename = cutFilename + filename; } if (cutyn == "cut") { parent.iviewer1.f_View.PageAppend(filename, 1, 1); } } } model.setValue("/root/send/delimage/updpage", bUpdpageData); submit("TXMPL03320"); model.setValue("/root/send/delimage/pageno", bDelData); submit("TXMPL03317"); if (trash != "trash") { if (cutyn != "cut") { model.setValue("/root/send/deletepagetinfo/intdellog", bIntPageDelLogt); submit("TXMPL03333"); } } } else { i = f_View.PageCurrent; filename = f_View.PageFilePath(i); filehidden = f_View.PageHiddenText(i); var fso = new ActiveXObject("Scripting.FileSystemObject"); selpage = i; model.setValue("/root/cond/scanmode", "add"); page = i; LTPFilePut(delfoler + "\\" + fso.GetFileName(filehidden), filename, "parentparent"); filehidden = fso.GetBaseName(filehidden); bDelData += "d¢Ë" + filehidden + "¢Ë" + instcd + "¢Ì"; bUpdpageData += "d¢Ë" + treatno + "¢Ë" + formcode + "¢Ë" + page + "¢Ë" + instcd + "¢Ì"; bIntPageDelLogt += "d¢Ë" + filehidden + "¢Ë" + patid + "¢Ë" + indate + "¢Ë" + clincode + "¢Ë" + ioflag + "¢Ë00000¢Ë" + formcode + "¢Ë" + page + "¢Ë" + cdate + "¢Ë" + ctime + "¢Ë" + cuserid + "¢Ë" + treatno + "¢Ë" + "" + "¢Ë" + instcd + "¢Ì"; if(cutFilename == "") { cutFilename = filename; } else { cutFilename = cutFilename + "|"; cutFilename = cutFilename + filename; } if (cutyn == "cut") { parent.iviewer1.f_View.PageAppend(filename, 1, 1); } model.setValue("/root/send/delimage/updpage", bUpdpageData); submit("TXMPL03320"); model.setValue("/root/send/delimage/pageno", bDelData); submit("TXMPL03317"); if (trash != "trash") { model.setValue("/root/send/deletepagetinfo/intdellog", bIntPageDelLogt); submit("TXMPL03333"); } } if (cutyn == "cut") { scanInsertBatch(cutFilename, "add", "parentparent"); } } else { filename = f_View.PageFilePath(delpage); filehidden = f_View.PageHiddenText(delpage); var fso = new ActiveXObject("Scripting.FileSystemObject"); filehidden = fso.GetBaseName(filehidden); sSaveData += "d¢Ë" + filehidden + "¢Ì"; f_View.PageRemove(delpage, delpage); if (fso.FileExists(filehidden) == true) { fso.DeleteFile(filehidden); } selpage = delpage; model.setValue("root/send/delimage/page", delpage) model.setValue("root/send/delimage/pageno", sSaveData); submit("TXMPL03317"); // submit("TXMPL03319"); submit("TXMPL03320"); } } function BlankPage() { var i; var filename; var filehidden; var filesize; var fso = new ActiveXObject("Scripting.FileSystemObject"); for (i=1; i<= opener.f_View.PageTotal; i++) { filename = opener.f_View.PageFilePath(i); filehidden = opener.f_View.PageHiddenText(i); filesize = fso.GetFile(filename).size; if(filesize < 5000) { f_View.PageAppend(filename, 1, 1); f_View.ActionParamInt1 = i; f_View.ViewMode = 2; f_View.PageHiddenText(f_View.PageTotal) = i; } else { } } } function IndexInsert(fv, fv_1, type) { var cdate; var ctime; var cdateyyyymm; var cdatedd; var filename; var filehidden; var remotepath; var pageno; var fso = new ActiveXObject("Scripting.FileSystemObject"); var extension; var ltppath = parent.model.getvalue("/root/main/ltpindexinfo/ltpindexpath"); var i; var j; var filesize; var pagecount = 0; var page = 0; var pathid = parent.model.getvalue("/root/main/ltpindexinfo/pathid"); var cuserid = parent.model.getValue("/root/user/scanuser"); var treatno = dg_treat.valueMatrix(dg_treat.row, dg_treat.colref("treatno")); var formcode = model.getvalue("/root/send/paget/formcode"); var instcd = parent.model.getValue("/root/user/instcd"); var sSaveData = "status¢Ëpageno¢Ëpathid¢Ëcdate¢Ëcuserid¢Ëfilesize¢Ëextension¢Ëinstcd¢Ëtreatno¢Ëformcode¢Ì"; var sSaveDataUpPage = "status¢Ëtreatno¢Ëformcode¢Ëpage¢Ëinstcd¢Ì"; var sSaveDataPage = "status¢Ëpageno¢Ëpathid¢Ëcdate¢Ëcuserid¢Ëfilesize¢Ëextension¢Ëinstcd¢Ëtreatno¢Ëformcode¢Ëpage¢Ì"; var addpage = 0; var currentpage; cdate = parent.model.getValue("/root/main/now/sysdate"); ctime = parent.model.getValue("/root/main/now/sysdate"); cdate = cdate.substr(0, 8); ctime = ctime.substr(8, 6); cdateyyyymm = cdate.substr(0, 6); cdatedd = cdate.substr(6, 2); fv.AutoRefresh = false; fv_1.AutoRefresh = false; if (type == "add") { if (iviewer1.rdo_viewmode.value == "TV") { for (i=1; i<=fv.PageTotal; i++) { if (fv.ThumbnailSelect(i) == true) { filesize = ""; filename = fv.PageFilePath(i); extension = fso.GetExtensionName(filename); filesize = fso.GetFile(filename).size; sSaveData += "d¢Ë" + pageno + "¢Ë" + pathid + "¢Ë" + cdate + "¢Ë" + cuserid + "¢Ë" + filesize + "¢Ë" + extension + "¢Ë" + instcd + "¢Ë" + treatno + "¢Ë" + formcode + "¢Ì"; fv_1.PageAppend(filename, 1, 1); fv_1.PageText(i) = (fv_1.PageTotal, fv_1.PageTotal); addpage = addpage + 1; } } model.setValue("/root/send/paget/pageno", sSaveData); submit("TXMPL03301"); } else { filesize = ""; filename = fv.PageFilePath(iviewer1.optPageCurrent.text); extension = fso.GetExtensionName(filename); filesize = fso.GetFile(filename).size; sSaveData += "d¢Ë" + pageno + "¢Ë" + pathid + "¢Ë" + cdate + "¢Ë" + cuserid + "¢Ë" + filesize + "¢Ë" + extension + "¢Ë" + instcd + "¢Ë" + treatno + "¢Ë" + formcode + "¢Ì"; fv_1.PageAppend(filename, 1, 1); fv_1.PageText(i) = (fv_1.PageTotal, fv_1.PageTotal); model.setValue("/root/send/paget/pageno", sSaveData); submit("TXMPL03301"); } fv_1.PageCurrent = fv_1.PageTotal; fv_1.ActionThumbnail = 5; fv_1.actionsingle = 3; } else if(type == "ins") { page = iviewer2.optPageCurrent.text; if (iviewer1.rdo_viewmode.value == "TV") { for (i=1; i<=fv.PageTotal; i++) { if (fv.ThumbnailSelect(i) == true) { filesize = ""; filename = fv.PageFilePath(i); extension = fso.GetExtensionName(filename); filesize = fso.GetFile(filename).size; sSaveDataUpPage += "d¢Ë" + treatno + "¢Ë" + formcode + "¢Ë" + page + "¢Ë" + instcd + "¢Ì"; sSaveDataPage += "d¢Ë" + pageno + "¢Ë" + pathid + "¢Ë" + cdate + "¢Ë" + cuserid + "¢Ë" + filesize + "¢Ë" + extension + "¢Ë" + instcd + "¢Ë" + treatno + "¢Ë" + formcode + "¢Ë" + page + "¢Ì"; fv_1.PageInsert(page, filename, 1, 1); fv_1.ActionParamINT1 = page; fv_1.ActionThumbnail = 10; page = parseInt(page) + 1; } } model.setValue("/root/send/paget/uppage", sSaveDataUpPage); submit("TXMPL03321"); model.setValue("/root/send/paget/pageno", sSaveDataPage); submit("TXMPL03302"); } else { filesize = ""; filename = fv.PageFilePath(iviewer1.optPageCurrent.text); extension = fso.GetExtensionName(filename); filesize = fso.GetFile(filename).size; sSaveDataUpPage += "d¢Ë" + treatno + "¢Ë" + formcode + "¢Ë" + page + "¢Ë" + instcd + "¢Ì"; sSaveDataPage += "d¢Ë" + pageno + "¢Ë" + pathid + "¢Ë" + cdate + "¢Ë" + cuserid + "¢Ë" + filesize + "¢Ë" + extension + "¢Ë" + instcd + "¢Ë" + treatno + "¢Ë" + formcode + "¢Ë" + page + "¢Ì"; fv_1.PageInsert(page, filename, 1, 1); model.setValue("/root/send/paget/uppage", sSaveDataUpPage); submit("TXMPL03321"); model.setValue("/root/send/paget/pageno", sSaveDataPage); submit("TXMPL03302"); } fv_1.PageCurrent = page; fv_1.actionsingle = 10; } else if(type == "rep") { page = iviewer2.optPageCurrent.text; if (iviewer1.rdo_viewmode.value == "TV") { page = iviewer2.optPageCurrent.text; for (i=1; i<=fv.PageTotal; i++) { if (fv.ThumbnailSelect(i) == true) { filesize = ""; filename = fv.PageFilePath(i); extension = fso.GetExtensionName(filename); filesize = fso.GetFile(filename).size; sSaveDataUpPage += "d¢Ë" + treatno + "¢Ë" + formcode + "¢Ë" + page + "¢Ë" + instcd + "¢Ì"; sSaveDataPage += "d¢Ë" + pageno + "¢Ë" + pathid + "¢Ë" + cdate + "¢Ë" + cuserid + "¢Ë" + filesize + "¢Ë" + extension + "¢Ë" + instcd + "¢Ë" + treatno + "¢Ë" + formcode + "¢Ë" + page + "¢Ì"; fv_1.PageInsert(page, filename, 1, 1); page = parseInt(page) + 1; } } model.setValue("/root/send/paget/uppage", sSaveDataUpPage); submit("TXMPL03321"); model.setValue("/root/send/paget/pageno", sSaveDataPage); submit("TXMPL03302"); } else { filesize = ""; filename = fv.PageFilePath(iviewer1.optPageCurrent.text); extension = fso.GetExtensionName(filename); filesize = fso.GetFile(filename).size; sSaveDataUpPage += "d¢Ë" + treatno + "¢Ë" + formcode + "¢Ë" + page + "¢Ë" + instcd + "¢Ì"; sSaveDataPage += "d¢Ë" + pageno + "¢Ë" + pathid + "¢Ë" + cdate + "¢Ë" + cuserid + "¢Ë" + filesize + "¢Ë" + extension + "¢Ë" + instcd + "¢Ë" + treatno + "¢Ë" + formcode + "¢Ë" + page + "¢Ì"; fv_1.PageInsert(page, filename, 1, 1); model.setValue("/root/send/paget/uppage", sSaveDataUpPage); submit("TXMPL03321"); model.setValue("/root/send/paget/pageno", sSaveDataPage); submit("TXMPL03302"); } fv_1.PageCurrent = page; fv_1.actionsingle = 10; } // iviewer2.optPageTotal.text = fv_1.PageTotal; dg_index1.textmatrix(dg_index1.row, 1) = fv_1.PageTotal; for (i=1; i<=fv_1.PageTotal; i++) { fv_1.PageText(i) = i; } fv.AutoRefresh = true; fv_1.AutoRefresh = true; // fv_1.ActionParamINT1 = // fv_1.ActionThumbnail = 10; model.refresh(); } function IndexInsertbyocr(fv) { var cdate; var ctime; var cdateyyyymm; var cdatedd; var filename; var filehidden; var remotepath; var pageno; var fso = new ActiveXObject("Scripting.FileSystemObject"); var extension; var ltppath = parent.model.getvalue("/root/main/ltpindexinfo/ltpindexpath"); var i; var j; var filesize; var pagecount = 0; var page = 0; var pathid = parent.model.getvalue("/root/main/ltpindexinfo/pathid"); var cuserid = parent.model.getValue("/root/user/scanuser"); var treatno; var formcode; var instcd = parent.model.getValue("/root/user/instcd"); var sSaveData = "status¢Ëpageno¢Ëpathid¢Ëcdate¢Ëcuserid¢Ëfilesize¢Ëextension¢Ëinstcd¢Ëtreatno¢Ëformcode¢Ì"; var sSaveDataUpPage = "status¢Ëtreatno¢Ëformcode¢Ëpage¢Ëinstcd¢Ì"; var sSaveDataPage = "status¢Ëpageno¢Ëpathid¢Ëcdate¢Ëcuserid¢Ëfilesize¢Ëextension¢Ëinstcd¢Ëtreatno¢Ëformcode¢Ëpage¢Ì"; var addpage = 0; var currentpage; var gridpath; cdate = parent.model.getValue("/root/main/now/sysdate"); ctime = parent.model.getValue("/root/main/now/sysdate"); cdate = cdate.substr(0, 8); ctime = ctime.substr(8, 6); cdateyyyymm = cdate.substr(0, 6); cdatedd = cdate.substr(6, 2); fv.AutoRefresh = false; for (i=1; i<= dg_treat.rows - 1; i++) { gridpath = dg_treat.valueMatrix(i, dg_treat.colref("fileno")); for (j=1; j<=fv.PageTotal; j++) { filename = fv.PageFilePath(j); if (gridpath == filename) { treatno = dg_treat.valueMatrix(i, dg_treat.colref("treatno")); formcode = dg_treat.valueMatrix(i, dg_treat.colref("formcode")); filesize = ""; extension = fso.GetExtensionName(filename); filesize = fso.GetFile(filename).size; sSaveData += "d¢Ë" + pageno + "¢Ë" + pathid + "¢Ë" + cdate + "¢Ë" + cuserid + "¢Ë" + filesize + "¢Ë" + extension + "¢Ë" + instcd + "¢Ë" + treatno + "¢Ë" + formcode + "¢Ì"; } } } model.setValue("/root/send/paget/pageno", sSaveData); submit("TXMPL03301"); } function OcrIndexInsert(fv, type) { var cdate; var ctime; var cdateyyyymm = getYear() + "" + getMonth(); var cdatedd = getDay(); var fso = new ActiveXObject("Scripting.FileSystemObject"); var sSaveData = "status¢Ëpageno¢Ëpathid¢Ëcdate¢Ëcuserid¢Ëfilesize¢Ëextension¢Ëinstcd¢Ëtreatno¢Ëformcode¢Ì"; var sOcrData = "status¢Ëocrtag¢Ëscanuser¢Ëinstcd¢Ì"; var ioflag = model.getValue("/root/send/delimage/ioflag"); var pathid = parent.model.getvalue("/root/main/ltpindexinfo/pathid"); var cuserid = parent.model.getValue("/root/user/scanuser"); var treatno; var formcode; var instcd = parent.model.getValue("/root/user/instcd"); var pageno; var i; var ocrtag; var count; var gridpath; var imgpath; var j; var ltppath = model.getvalue("/root/main/ltpindexinfo/ltpindexpath"); cdate = parent.model.getValue("/root/main/now/sysdate"); ctime = parent.model.getValue("/root/main/now/sysdate"); cdate = cdate.substr(0, 8); ctime = ctime.substr(8, 6); cdateyyyymm = cdate.substr(0, 6); cdatedd = cdate.substr(6, 2); model.setValue("/root/send/paget/cdate", cdate); for (i=1; i<= dg_treat.rows - 1; i++) { gridpath = dg_treat.valueMatrix(i, dg_treat.colref("fileno")); for (j=1; j<=fv.PageTotal; j++) { filename = fv.PageFilePath(j); if (gridpath == filename) { treatno = dg_treat.valueMatrix(i, dg_treat.colref("treatno")); formcode = dg_treat.valueMatrix(i, dg_treat.colref("formcode")); filesize = ""; extension = fso.GetExtensionName(filename); filesize = fso.GetFile(filename).size; ocrtag = dg_treat.valueMatrix(i, dg_treat.colref("ocrtag")); sSaveData += "d¢Ë" + pageno + "¢Ë" + pathid + "¢Ë" + cdate + "¢Ë" + cuserid + "¢Ë" + filesize + "¢Ë" + extension + "¢Ë" + instcd + "¢Ë" + treatno + "¢Ë" + formcode + "¢Ì"; sOcrData += "d¢Ë" + ocrtag + "¢Ë" + cuserid + "¢Ë" + instcd + "¢Ì"; } } } model.setValue("/root/send/paget/pageno", sSaveData); model.setValue("/root/send/ocrinfo/ocrtag", sOcrData); submit("TXMPL03301") var count = getNodesetCount("/root/main/paget/pageno"); if (count == dg_treat.rows - 1) { submit("TXMPL04301"); } else { } } function Scan(type, file) { var status; var cdateyyyymm = getYear() + "" + getMonth(); var fso = new ActiveXObject("Scripting.FileSystemObject"); var scancolor = fso.GetExtensionName(file); var scanfolder = fso.GetSpecialFolder(2) + "\\LCViewer"; var bPage = iviewer1.f_View.PageTotal; if (type=="add") { file = scanfolder + "\\" + fso.GetBaseName(file) + "." + scancolor; iviewer1.window.javascript.scanLoad(file); scanInsertBatch(file, type, "parent", bPage); // iviewer1.model.setValue("/root/main/chartinfo/pagetotal", // iviewer1.window.javascript.f_View.PageTotal); } else if (type == "ins") { for (i = 1; i <= iviewer1.window.javascript.f_View.PageTotal; i++) { if (iviewer1.window.javascript.f_View.ThumbnailSelect(i) == true) { selpage = i; scanmode = "ins" break; } } file = scanfolder + "\\" + fso.GetBaseName(file) + "0001." + scancolor; iviewer1.window.javascript.scanInsLoad(file, selpage); model.setValue("/root/send/scaninfo/page", selpage); submit("TXMPL03316"); // var remotePath = model.getvalue("root/main/ltpscaninfo/ltpscanpath") scanInsert(file, type); } else if (type == "rep") { for (i = 1; i <= iviewer1.window.javascript.f_View.PageTotal; i++) { if (iviewer1.window.javascript.f_View.ThumbnailSelect(i) == true) { selpage = i; scanmode = "rep" delfileno = iviewer1.window.f_View.PageHiddenText(i); sSaveData += "d¢Ë" + delfileno +"¢Ì"; break; } } file = scanfolder + "\\" + fso.GetBaseName(file) + "0001." + scancolor; iviewer1.window.javascript.scanInsLoad(file, selpage); model.setValue("/root/send/scaninfo/page", selpage); model.setValue("root/send/delimage/fileno", sSaveData); model.setValue("root/send/delimage/instcd", model.getValue("/root/user/instcd")); submit("TXMPL03318"); // iviewer1.window.javascript.f_View.PageRemove(selpage, selpage); iviewer1.window.javascript.scanview_resetPageRemove() scanInsert(file, type); } } function scanInsert(file, type, sub) { var l_file; var i ; var remotePath; var remoteFileName; var remoteFullPath; var localPath; var dirs = new Array(); var savefile; var SaveIP; var stryear = getYear(); var strmonth = getMonth(); var strday = getDay(); var strtime var strmilliseconds var i; var extension; var fso = new ActiveXObject("Scripting.FileSystemObject"); if (sub == "trash") { remotePath = opener.model.getvalue("root/main/ltpscaninfo/ltpscanpath"); opener.f_ltp.FolderCreate(remotePath); } else if (sub == "parent") { remotePath = parent.model.getvalue("root/main/ltpscaninfo/ltpscanpath"); parent.f_ltp.FolderCreate(remotePath); } else if (sub == "parentparent") { remotePath = parent.parent.model.getvalue("root/main/ltpscaninfo/ltpscanpath"); parent.parent.f_ltp.FolderCreate(remotePath); } else { remotePath = model.getvalue("root/main/ltpscaninfo/ltpscanpath"); f_ltp.FolderCreate(remotePath); } l_file = file.split("|"); for(i=0; i <= l_file.length -1 ; i++) { strmilliseconds = getMilliseconds(); strtime = getTime(); localpath = l_file[i]; extension = fso.GetExtensionName(localpath); remoteFileName = "\\" + stryear + "" + strmonth + "" + strday + "" + strtime + "" + strmilliseconds + "." + extension remoteFullPath = remotePath + remoteFileName; model.setvalue("/root/send/scaninfo/fileno", remoteFullPath); if (type == "add") { submit("TXMPL03306"); } else if(type == "ins") { submit("TXMPL03307"); } else if(type == "rep") { submit("TXMPL03307"); } if (sub == "trash") { LTPFilePut(remoteFullPath, localpath, "trash"); // opener.optPageTotal.text = pareseInt(opener.optPageTotal.text) + // 1; } else if (sub == "parent") { LTPFilePut(remoteFullPath, localpath, "parent"); // optPageTotal.text = optPageTotal.text - delpage; // iviewer1.optPageTotal.text = parseInt(iviewer1.optPageTotal.text) // + 1; } else if (sub == "parentparent") { LTPFilePut(remoteFullPath, localpath, "parentparent"); } else { LTPFilePut(remoteFullPath, localpath); // parent.iviewer1.optPageTotal.text = // parseInt(parent.iviewer1.optPageTotal.text) + 1; } } } function scanInsertBatch(file, type, sub, bPage) { var l_file; var i ; var remotePath; var remoteFileName; var remoteFullPath; var localPath; var dirs = new Array(); var savefile; var SaveIP; var stryear = getYear(); var strmonth = getMonth(); var strday = getDay(); var strtime var strmilliseconds var i; var extension; var fso = new ActiveXObject("Scripting.FileSystemObject"); var sSaveData = "status¢Ëpatid¢Ëioflag¢Ëpathid¢Ëfileno¢Ëscanuser¢Ëinstcd¢Ì"; var pathid; var scanuser; var instcd; var patid; var ioflag; var page; var bPage; if (parent.model.getValue("/root/cond/scantype") == "OCR") { patid = parent.model.getValue("/root/user/scanuser"); ioflag = "Z"; instcd = parent.model.getValue("/root/user/instcd"); scanuser = parent.model.getValue("/root/user/scanuser"); pathid = parent.model.getValue("/root/user/pathid"); } else { if (sub == "parent") { patid = dg_treat.valueMatrix(dg_treat.row, dg_treat.colref("patid")); ioflag = dg_treat.valueMatrix(dg_treat.row, dg_treat.colref("class")); instcd = parent.model.getValue("/root/user/instcd"); scanuser = parent.model.getValue("/root/user/scanuser"); pathid = parent.model.getValue("/root/user/pathid"); } else if (sub == "parentparent") { patid = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("patid")); ioflag = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("class")); instcd = parent.parent.model.getValue("/root/user/instcd"); scanuser = parent.parent.model.getValue("/root/user/scanuser"); pathid = parent.parent.model.getValue("/root/user/pathid"); } else if (sub =="trash") { patid = opener.ipt_pid.currentText; ioflag = dg_trash.valueMatrix(dg_trash.row, dg_trash.colref("class")); instcd = opener.parent.model.getValue("/root/user/instcd"); scanuser = opener.parent.model.getValue("/root/user/scanuser"); pathid = opener.parent.model.getValue("/root/user/pathid"); } } if (sub == "parent") { remotePath = parent.model.getvalue("root/main/ltpscaninfo/ltpscanpath"); parent.f_ltp.FolderCreate(remotePath); } else if (sub == "parentparent") { remotePath = parent.parent.model.getvalue("root/main/ltpscaninfo/ltpscanpath"); parent.parent.f_ltp.FolderCreate(remotePath); } else if (sub == "trash") { remotePath = opener.parent.model.getvalue("root/main/ltpscaninfo/ltpscanpath"); opener.parent.f_ltp.FolderCreate(remotePath); } l_file = file.split("|"); for(i=0; i <= l_file.length -1 ; i++) { strmilliseconds = getMilliseconds(); strtime = getTime(); localpath = l_file[i]; extension = fso.GetExtensionName(localpath); remoteFileName = "\\" + stryear + "" + strmonth + "" + strday + "" + strtime + "" + strmilliseconds + "." + extension remoteFullPath = remotePath + remoteFileName; if (sub == "parentparent") { // parent.iviewer1.f_View.PageHiddenText(i + bPage + 1) = // remoteFullPath; // parent.iviewer1.f_View.PageText(i + bPage + 1) = i + bPage + 1; } else if (sub == "trash") { opener.iviewer1.f_View.PageHiddenText(i + bPage + 1) = remoteFullPath; opener.iviewer1.f_View.PageText(i + bPage + 1) = i + bPage + 1; } else { iviewer1.f_View.PageHiddenText(i + bPage + 1) = remoteFullPath; iviewer1.f_View.PageText(i + bPage + 1) = i + bPage + 1; } sSaveData += "d¢Ë" + patid + "¢Ë" + ioflag + "¢Ë" + pathid + "¢Ë" + remoteFullPath + "¢Ë" + scanuser + "¢Ë" + instcd + "¢Ì"; if (sub == "parent") { LTPFilePut(remoteFullPath, localpath, "parent"); } else if (sub == "parentparent") { LTPFilePut(remoteFullPath, localpath, "parentparent"); } else if (sub == "trash") { LTPFilePut(remoteFullPath, localpath, "trash"); } else { LTPFilePut(remoteFullPath, localpath); } } model.setvalue("/root/send/scaninfo/fileno", sSaveData); if (type == "add") { submit("TXMPL03306"); } else if(type == "ins") { submit("TXMPL03307"); } else if(type == "rep") { submit("TXMPL03307"); } } function findIndex(data, type) { if (rdo_index.value == "clinname") { var col = 0; } else { var col = 2; } var startRow = model.getValue("/root/send/paget/findrow"); var findrow = dg_index1.findrow(data, parseInt(startRow), parseInt(col), false, false); dg_index1.select(findrow, 0, findrow, 2) = true; if (type == "OLD") { model.setValue("/root/send/paget/formcode", dg_index1.textmatrix(findrow, 2)); model.refresh(); submit("TRMPL03316") var totpage = dg_index1.valueMatrix(findrow, dg_index1.colref("page")); iviewer2.window.javascript.ClearChart(); iviewer2.window.javascript.downloadChart(totpage, "index"); iviewer2.window.javascript.appendchart(totpage); model.setvalue("/root/send/beforeclick/index", dg_index1.row) model.setValue("/root/send/paget/findrow", findrow + 1); } dg_index1.topRow = findrow; return findrow; } function scanSetting(codekey) { var scantype; var scancolor; var scanfront; var scanback; var scansize; var scandpi; var scansetid; var scanArry; model.setValue("/root/cond/scanset/codekey", codekey); model.setValue("/root/cond/scanset/modekey", "scan"); model.setValue("/root/cond/scanset/instcd", parent.model.getValue("/root/user/instcd")); model.setValue("/root/cond/scanset/userid", parent.model.getValue("/root/user/scanuser")); submit("TRMPL03310"); var scansetting = model.getValue("/root/main/scanset/scansetting"); if (scansetting == "") { alert("ÀúÀå µÈ ¼³Á¤ÀÌ ¾ø½À´Ï´Ù."); return; } scanArry = scansetting.split("|") scantype = scanArry[0]; scancolor = scanArry[1]; scanfront = scanArry[2]; scanback = scanArry[3]; scansize = scanArry[4]; scandpi = scanArry[5]; scanfront.value = scanfront; scanback.value = scanback; scansize.value = scansize; scandpi.value = scandpi; switch(scanfront) { case "Front0": model.setValue("/root/main/combofront", scanfront); case "Front90": model.setValue("/root/main/combofront", scanfront); case "Front180": model.setValue("/root/main/combofront", scanfront); case "Front270": model.setValue("/root/main/combofront", scanfront); } switch(scanback) { case "Back0": model.setValue("/root/main/comboback", scanback); case "Back90": model.setValue("/root/main/comboback", scanback); case "Back180": model.setValue("/root/main/comboback", scanback); case "Back270": model.setValue("/root/main/comboback", scanback); } switch(scansize) { case "A4": model.setValue("/root/main/combosize", scansize); case "A3": model.setValue("/root/main/combosize", scansize); } switch(scandpi) { case "200dpi": model.setValue("/root/main/combodpi", scandpi); case "300dpi": model.setValue("/root/main/combodpi", scandpi); } switch(scantype) { case "´Ü¸é": btn_feed1.disabled = "true"; btn_feed2.disabled = "false"; btn_feed3.disabled = "false"; break; case "¾ç¸é": btn_feed1.disabled = "false"; btn_feed2.disabled = "true"; btn_feed3.disabled = "false"; break; case "ÆòÆÇ": btn_feed1.disabled = "false"; btn_feed2.disabled = "false"; btn_feed3.disabled = "true"; break; default: btn_feed1.disabled = "false"; btn_feed2.disabled = "false"; btn_feed3.disabled = "false"; break; } switch(scancolor) { case "BLK": btn_color1.disabled = "true"; btn_color2.disabled = "false"; btn_color3.disabled = "false"; break; case "PLT": btn_color1.disabled ="false"; btn_color2.disabled = "true"; btn_color3.disabled = "false"; break; case "RGB": btn_color1.disabled = "false"; btn_color2.disabled = "false"; btn_color3.disabled = "true"; break; default: btn_color1.disabled = "false"; btn_color2.disabled = "false"; btn_color3.disabled = "false"; break; } model.refresh(); } function saveImageFileDialogs(maxBytes) { var savename; var file; savename = parent.model.getValue("/root/send/scaninfo/patid") + "_" + parent.model.getValue("/root/send/scaninfo/clincode"); file = window.fileDialog("save","","false",savename,"","All Files (*.*)|*.*|JPEG Files(*.jpg)|*.jpg|GIF Files(*.gif)|*.gif|BMP Files(*.bmp)|*.bmp"); if (file != "" && maxBytes != null) { // ÆÄÀÏ Å©±â È®ÀÎ var fso = new ActiveXObject("Scripting.FileSystemObject"); var f = fso.GetFile(file); if (f.size > maxBytes) { messageBox("ÆÄÀÏ Å©±â°¡ ÃÖ´ëÄ¡("+(maxBytes/1024)+"K)¸¦","E003"); return ""; } } return file; } function OcrImageLoad(ocrtag) { var rc; var ResultBuffer; var i; var arrocrtag; var ocrtag; for (i = 1; i <= iviewer1.window.f_View.PageTotal; i++) { if (OCR.TypeAppend("E:\\HIS\\friendlyImaging\\2012-04-24\\friendlyWrapperOCR_Tester\\OCRTYPES.bmp", "#+0123456789") == false) { alert("ȰÀÚ ½ÇÆÐ"); } rc= OCR.Recognition(iviewer1.window.f_View.PageFilePath(i), 1, 1); arrocrtag = OCR.LastRecogedText.split("RECOG_TEXT : "); ocrtag = arrocrtag[1].substring(1, 13); } } function RefreshPaperList() { var papers; var i; var scanArry; var scantype; // cmbPaper.Clear // alert(f_Twain.FeaturePaper); /* * if(UBound(f_Twain.FeaturePaper) < 0) { } * * papers = f_Twain.FeaturePaper * * scanArry = papers.split("|") * * scantype = scanArry[0]; * * //alert(papers); * * for (i = LBound(papers); i < UBound(papers); i++) { //cmbPaper.AddItem * papers(i) * * if (f_Twain.ScannerPaper == papers(i)) { //cmbPaper.ListIndex = i } } */ } function scanersetting(scantype, scancolor, size, dpi, brightness, threshold, contrast) { // feeder , pixel type, size, dpi, ¹à±â, ÀÓ°è°ª, ´ëºñ // alert("2 " + scantype); /* * * if (scantype == "´Ü¸é") { scantype = "ADF(¾Õ¸é)" } else if (scantype == "¾ç¸é") { * scantype = "ADF(¾ç¸é)" } */ //alert("scanersetting " + scantype); // scantype = "ADF(¾Õ¸é)" parent.f_Twain.ScannerFeeder = scantype; parent.f_Twain.ScannerAcquireUI = false; parent.f_Twain.ScannerAcquireIndicator = false; parent.f_Twain.ScannerPixelType = scancolor parent.f_Twain.ScannerXResolution = dpi.substr(0, 3); parent.f_Twain.ScannerYResolution = dpi.substr(0, 3); parent.f_Twain.ScannerBrightness = brightness parent.f_Twain.ScannerThreshold = threshold parent.f_Twain.ScannerContrast = contrast } function DelLocalFolder() { var fso = new ActiveXObject("Scripting.FileSystemObject"); if (fso.FolderExists(fso.GetSpecialFolder(2) + "\\LCViewer") == true) { fso.DeleteFolder(fso.GetSpecialFolder(2) + "\\LCViewer"); } if (fso.FolderExists(fso.GetSpecialFolder(2) + "\\LCViewer") == false) { fso.CreateFolder(fso.GetSpecialFolder(2) + "\\LCViewer"); } } function TrashFolder() { var fso = new ActiveXObject("Scripting.FileSystemObject"); if (fso.FolderExists(fso.GetSpecialFolder(2) + "\\LCViewer\\trash") == true) { fso.DeleteFolder(fso.GetSpecialFolder(2) + "\\LCViewer\\trash"); } if (fso.FolderExists(fso.GetSpecialFolder(2) + "\\LCViewer\\trash") == false) { fso.CreateFolder(fso.GetSpecialFolder(2) + "\\LCViewer\\trash"); } } function copyfile(org_path, page, type) { var fso = new ActiveXObject("Scripting.FileSystemObject"); var dfile; var patno = "undo"; if (fso.FileExists(org_path) == true) { dfile = fso.GetFile(org_path); dfile.Copy(fso.GetSpecialFolder(2) + "\\LCViewer\\trash\\" + patno + "-" + page + "-" + type + "-" + fso.GetFileName(org_path)); } } function Trash(fv) { var fso = new ActiveXObject("Scripting.FileSystemObject"); var filename = fv.PageFilePath(optPageCurrent.text); var RemotePath = fv.PageHiddenText(optPageCurrent.text); var dfile; if (fso.FileExists(fso.GetSpecialFolder(2) + "\\LCViewer\\" + "trash\\" + fso.GetFileName(filename)) == true) { dfile = fso.GetFile(fso.GetSpecialFolder(2) + "\\LCViewer\\" + "trash\\" + fso.GetFileName(filename)); } if (fso.FileExists(filename) == true) { fso.DeleteFile(filename); } dfile.Move(fso.GetSpecialFolder(2) + "\\LCViewer\\" + fso.GetFileName(filename)); LocalPath = fv.PageFilePath(optPageCurrent.text); RemotePath = fv.PageHiddenText(optPageCurrent.text); LTPFilePut(RemotePath, LocalPath); } function openScanLoad(filename) { var file; opener.iviewer1.f_View.AutoRefresh = false; opener.iviewer1.f_View.pageappend(filename, 1, 1); opener.iviewer1.f_View.PageHiddenText(i) = filename opener.iviewer1.f_View.AutoRefresh = true; } function fileFut(fv, type, page, gubun) { var filename; var ltppath = parent.model.getvalue("/root/main/ltpindexinfo/ltpindexpath"); var cdate; var ctime; var cdateyyyymm; var cdatedd; var pageno; var j = 1; var extension; var fso = new ActiveXObject("Scripting.FileSystemObject"); var gridpath; var n; cdate = parent.model.getValue("/root/main/now/sysdate"); cdate = cdate.substr(0, 8); cdateyyyymm = cdate.substr(0, 6); cdatedd = cdate.substr(6, 2); if (iviewer1.rdo_viewmode.value == "TV") { for (i=1; i<=fv.PageTotal; i++) { if (type == "OLD") { if (fv.ThumbnailSelect(i) == true) { pageno = model.getValue("/root/main/paget[" + j + "]/pageno"); filename = fv.PageFilePath(i); extension = fso.GetExtensionName(filename); remotepath = ltppath + "\\" + cdateyyyymm + "\\" + cdatedd + "\\" + pageno.substr(pageno.length - 1, 1) + "\\" + pageno + "." + extension iviewer2.f_View.PageHiddenText(parseInt(page) + parseInt(j)) = remotepath; LTPFilePut(remotepath, filename, "parent"); j = j + 1; } } else { filename = fv.PageFilePath(i); for (n=1; n <= dg_treat.rows - 1; n++) { gridpath = dg_treat.valueMatrix(n, dg_treat.colref("fileno")); if (gridpath == filename) { pageno = model.getValue("/root/main/paget[" + n + "]/pageno"); extension = fso.GetExtensionName(filename); remotepath = ltppath + "\\" + cdateyyyymm + "\\" + cdatedd + "\\" + pageno.substr(pageno.length - 1, 1) + "\\" + pageno + "." + extension LTPFilePut(remotepath, filename, "parent"); j = j + 1; } } } } } else if (iviewer1.rdo_viewmode.value == "PV") { pageno = model.getValue("/root/main/paget/pageno"); filename = fv.PageFilePath(fv.PageCurrent); extension = fso.GetExtensionName(filename); remotepath = ltppath + "\\" + cdateyyyymm + "\\" + cdatedd + "\\" + pageno.substr(pageno.length - 1, 1) + "\\" + pageno + "." + extension LTPFilePut(remotepath, filename, "parent"); } } function repFile(fv, fv_1) { var localPath; var remotePath; var i; var localpage = fv.model.getValue("/root/main/chartinfo/pagecurrent"); var remotepage = fv_1.model.getValue("/root/main/chartinfo/pagecurrent"); localPath = fv.f_View.PageFilePath(localpage); remotePath = fv_1.f_View.PageHiddenText(remotepage); /* * alert(localpage); alert(remotepage); alert(localPath); alert(remotePath); */ LTPFilePut(remotePath, localPath, "parent"); fv_1.f_View.PageInsert(remotepage, localPath, 1, 1); // fv_1.f_View.PageCurrent = remotepage; // fv_1.f_View.PageRemove(remotepage + 1, remotepage + 1); // fv.PageHiddenText(remotepage) = fv_temp.PageHiddenText(i); } function Skew() { var i; var movepath; var LocalPath; var RemotePath; var fso = new ActiveXObject("Scripting.FileSystemObject"); var dfile; var patno = "undo"; TrashFolder() f_View.AutoRefresh = false; for (i=1; i <= f_View.PageTotal; i++) { if(f_View.ThumbnailSelect(i) == true) { f_View.PageCurrent= i f_View.ActionParamINT1 = parent.rgb(255, 255, 255); f_View.ActionSingle = 16; copyfile(f_View.PageFilePath(i), i, "R") f_View.FileSaveCreate(f_View.PageFilePath(i), -1); f_View.ActionParamINT1 = i; f_View.ActionThumbnail = 1; LocalPath = f_View.PageFilePath(i); RemotePath = f_View.PageHiddenText(i); LTPFilePut(RemotePath, LocalPath); } } f_View.AutoRefresh = true; } function PageCurrentChanged() { model.setValue("/root/main/chartinfo/pagecurrent", f_View.PageCurrent); model.setValue("/root/main/chartinfo/pagetotal", f_View.PageTotal); model.refresh(); } function fvSaveCreate() { var i; var localPath; var remotePath; if (rdo_viewmode.value == "TV") { for (i=1; i <= f_View.PageTotal; i++) { if(f_View.ThumbnailSelect(i) == true) { localPath = f_View.PageFilePath(i); RemotePath = f_View.PageHiddenText(i); LTPFilePut(RemotePath, localPath); } } } else { localPath = f_View.PageFilePath(f_View.PageCurrent); RemotePath = f_View.PageHiddenText(f_View.PageCurrent); LTPFilePut(RemotePath, localPath); } } function shortkey(formcode) { parent.iviewer2.window.javascript.ClearChart(); parent.rdo_index.value == "clincode" parent.model.setValue("/root/cond/rdo_index", "clincode"); parent.model.refresh(); parent.input1.currentText = formcode var data; var toprow var startRow = 1; var col = 2; data = parent.input1.currentText; if (parent.rdo_index.value == "clinname") { col = 0; } else if (parent.rdo_index.value == "clincode") { col = 2; } var findrow = parent.dg_index1.findrow(data, parseInt(startRow), parseInt(col), false, false); parent.dg_index1.select(findrow, 0, findrow, 2) = true; parent.dg_index1.topRow = findrow; model.setvalue("/root/send/paget/treatno", parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("treatno"))) model.setvalue("/root/send/paget/formcode", parent.input1.currentText); model.setvalue("/root/send/paget/instcd", parent.parent.model.getValue("/root/user/instcd")); submit("TRMPL03316") var totpage = getNodesetCount("/root/main/imgpath"); parent.iviewer2.window.javascript.downloadChart(totpage, "index", "", "shortkey"); parent.iviewer2.window.javascript.appendchart(totpage, "shortkey"); // parent.model.setvalue("/root/send/beforeclick/index", // parent.dg_index1.row); parent.dg_index1.textmatrix(parent.dg_index1.row, 1) = parent.iviewer2.f_View.PageTotal; parent.btn_add.dispatch("onclick"); } function selectshortkey() { var i; var selflag; parent.chk_indexlist.value = "Y" parent.btn_indexsear.dispatch("onclick"); if (parent.chk_indexlist.value != "Y") { alert("Àüü À妽º¸¦ ¼³Á¤ ÈÄ ÁøÇà Çϼ¼¿ä"); return; } for (i=1; i <= f_View.PageTotal; i++) { if(f_View.ThumbnailSelect(i) == true) { selflag = "true"; } } if (selflag != "true") { alert("¼±Åà µÈ À̹ÌÁö°¡ ¾ø½À´Ï´Ù."); return; } submit("TRMPL03324"); var count = getNodesetCount("/root/main/shortinfo/formcode"); if (count > 0) { parent.model.setValue("/root/send/paget/formcode", model.getValue("/root/main/shortinfo/formcode")); shortkey(model.getValue("/root/main/shortinfo/formcode")); } else { alert("ÀúÀå µÈ ´ÜÃàŰ ¼³Á¤ÀÌ ¾ø½À´Ï´Ù."); } parent.chk_indexlist.value = "" parent.btn_indexsear.dispatch("onclick"); } function findshortkey(shortkey) { var i; for (i=1; i <= dg_shortkey.rows - 1; i++) { if (dg_shortkey.textmatrix(i, 0) == shortkey) { alert("ÀúÀå µÈ ´ÜÃà Ű ¼³Á¤ÀÌ ÀÖ½À´Ï´Ù."); return; } } dg_shortkey.textmatrix(dg_shortkey.row, 0) = shortkey; } function findformcode(formcode) { var i; for (i=1; i <= dg_shortkey.rows - 1; i++) { if (dg_shortkey.textmatrix(i, 1) == formcode) { alert(dg_shortkey.textmatrix(i, 0) + " À¸·Î ÁöÁ¤ µÈ ¼­½Ä ÀÔ´Ï´Ù."); return; } } dg_shortkey.textmatrix(dg_shortkey.row, 1) = dg_index1.textmatrix(dg_index1.row, 1); dg_shortkey.textmatrix(dg_shortkey.row, 2) = dg_index1.textmatrix(dg_index1.row, 0); } function trashbackup(type) { var fso, f, fc, s; var workmode = model.getValue("/root/cond/workmode"); var pageno; var patno; var patid = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("patid")); var pathid = parent.parent.model.getvalue("/root/main/ltpindexinfo/pathid"); var cuserid = parent.parent.model.getValue("/root/user/scanuser"); var treatno = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("treatno")); var formcode = parent.model.getvalue("/root/send/paget/formcode"); var instcd = parent.parent.model.getValue("/root/user/instcd"); var sSaveData = "status¢Ëpageno¢Ëpathid¢Ëcdate¢Ëcuserid¢Ëfilesize¢Ëextension¢Ëinstcd¢Ëtreatno¢Ëformcode¢Ì"; var sColorData = "status¢Ëpatid¢Ëfileno¢Ëgubun¢Ëinstcd¢Ì"; var cdate = parent.parent.model.getValue("/root/main/now/sysdate"); var cdateyyyymm; var cdatedd; var localpath; var ltppath = parent.parent.model.getvalue("/root/main/ltpindexinfo/ltpindexpath"); cdate = cdate.substr(0, 8); cdateyyyymm = cdate.substr(0, 6); cdatedd = cdate.substr(6, 2); fso = new ActiveXObject("Scripting.FileSystemObject"); if (fso.FolderExists(fso.GetSpecialFolder(2) + "\\LCViewer\\trash") == true) { // f = // fso.GetFolder("C:\\Users\\Administrator\\AppData\\Local\\Temp\\LCViewer\\Trash"); f = fso.GetFolder(fso.GetSpecialFolder(2) + "\\LCViewer\\trash"); fc = new Enumerator(f.files); s = ""; for (; !fc.atEnd(); fc.moveNext()) { var remotePath = fc.item(); var trashfilename = fso.GetFileName(fc.item()); var ltpPath; // var localPath = fso.GetSpecialFolder(2) + "\\LCViewer\\" + // trashfilename; var localPath = fso.GetSpecialFolder(2) + "\\LCViewer\\"; var page; var localfullpath; filename = trashfilename.split("-"); trashType = filename[2]; page = filename[1]; localfilename = filename[3]; localfullpath = localPath + localfilename // ltpPath = // parent.parent.model.getValue("/root/main/ltpscaninfo/ltpscanpath") // + "\\" + trashfilename; ltpPath = parent.parent.model.getValue("/root/main/ltpscaninfo/ltpscanpath") + "\\" + localfilename; switch(trashType) { case "I", "S": // insert update Ãß°¡ if (workmode == "OCR") { model.setValue("/root/send/scaninfo/patid", parent.parent.model.getValue("/root/user/scanuser")); model.setValue("/root/send/scaninfo/class", "Z"); } else { model.setValue("/root/send/scaninfo/patid", parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("patid"))); model.setValue("/root/send/scaninfo/class", parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("class"))); } model.setValue("/root/send/scaninfo/instcd", parent.parent.model.getValue("/root/user/instcd")); model.setValue("/root/send/scaninfo/pathid", parent.parent.model.getValue("/root/user/pathid")); model.setValue("/root/send/scaninfo/fileno", ltpPath); model.setValue("/root/send/scaninfo/scanuser", parent.parent.model.getValue("/root/user/scanuser")); model.setValue("/root/send/scaninfo/page", page); submit("TXMPL03316"); submit("TXMPL03307"); dfile = fso.GetFile(remotePath); dfile.Copy(localfullpath); if (fso.FileExists(localPath) == true) { fso.DeleteFile(localPath); } LTPFilePut(ltpPath, localfullpath, "parentparent"); // f_View.PageAppend(localPath, 1, 1); f_View.PageInsert(page, localfullpath, 1, 1); f_View.PageCurrent = f_View.PageTotal f_View.PageHiddenText(f_View.PageTotal) = ltpPath; break; // var bPage = f_View.PageTotal; // scanInsertBatch(trashfilename, "add", "parentparent", // bPage); case "R": dfile = fso.GetFile(remotePath); dfile.Copy(localfullpath); if (fso.FileExists(localPath) == true) { fso.DeleteFile(localPath); } // ltpPath = f_View.PageHiddenText(page); LTPFilePut(ltpPath, localfullpath, "parentparent"); f_View.PageRemove(page, page); f_View.PageInsert(page, localfullpath, 1, 1); f_View.PageCurrent = page; f_View.PageHiddenText(page) = ltpPath; f_View.ActionParamINT1 = page; f_View.ActionThumbnail = 1; break; case "Y": dfile = fso.GetFile(remotePath); dfile.Copy(localfullpath); if (fso.FileExists(localPath) == true) { fso.DeleteFile(localPath); } filesize = ""; extension = fso.GetExtensionName(localfullpath); filesize = fso.GetFile(localfullpath).size; sSaveData += "d¢Ë" + pageno + "¢Ë" + pathid + "¢Ë" + cdate + "¢Ë" + cuserid + "¢Ë" + filesize + "¢Ë" + extension + "¢Ë" + instcd + "¢Ë" + treatno + "¢Ë" + formcode + "¢Ì"; f_View.PageAppend(localfullpath, 1, 1); f_View.PageText(i) = (f_View.PageTotal, f_View.PageTotal); parent.dg_index1.textmatrix(parent.dg_index1.row, 1) = f_View.PageTotal; break; case "B": dfile = fso.GetFile(remotePath); dfile.Copy(localfullpath); if (fso.FileExists(localPath) == true) { fso.DeleteFile(localPath); } LTPFilePut(ltpPath, localfullpath, "parentparent"); f_View.PageRemove(page, page); f_View.PageInsert(page, localfullpath, 1, 1); f_View.PageCurrent = page; f_View.PageHiddenText(page) = ltpPath; f_View.ActionParamINT1 = page; f_View.ActionThumbnail = 1; ltpPath = ltpPath.replace("jpg", "tif") sColorData += "d¢Ë" + patid + "¢Ë" + ltpPath + "¢Ë" + "B" + "¢Ë" + instcd + "¢Ì"; break; } } switch(type) { case "index": model.setValue("/root/send/paget/pageno", sSaveData); submit("TXMPL03301"); f = fso.GetFolder(fso.GetSpecialFolder(2) + "\\LCViewer\\trash"); fc = new Enumerator(f.files); s = ""; var i = 0; for (; !fc.atEnd(); fc.moveNext()) { i = i + 1; pageno = model.getValue("/root/main/paget[" + i + "]/pageno"); localpath = fc.item(); extension = fso.GetExtensionName(fc.item()); remotepath = ltppath + "\\" + cdateyyyymm + "\\" + cdatedd + "\\" + pageno.substr(pageno.length - 1, 1) + "\\" + pageno + "." + extension LTPFilePut(remotepath, localpath, "parentparent"); f_View.PageHiddenText(i) = remotepath; } break; } switch(trashType) { case "B": model.setValue("/root/send/colortobw/fileno", sColorData); submit("TXMPL03345"); break; } } for (i=1; i<=f_View.PageTotal; i++) { f_View.PageText(i) = i; } } function trashmove() { var filename; // = model.getValue("root/send/delimage/imageno"); var fso = new ActiveXObject("Scripting.FileSystemObject"); var pageno; var selpage; var i; var cdate; var ctime; var delfoler = parent.parent.model.getValue("/root/main/ltpindexinfo/ltpindexpath") + "\\" + "delfolder"; var bDelData = "status¢Ëpageno¢Ëinstcd¢Ì"; var bUpdpageData = "status¢Ëtreatno¢Ëformcode¢Ëpage¢Ëinstcd¢Ì" var bIntPageDelLogt = "status¢Ëpageno¢Ëpatid¢Ëindate¢Ëclincode¢Ëclass¢Ëdoccode¢Ëformcode¢Ëpage¢Ëcdate¢Ëctime¢Ëcuserid¢Ëtreatno¢Ëocrcode¢Ëinstcd¢Ì"; var instcd = parent.parent.model.getValue("/root/user/instcd"); var cuserid = parent.parent.model.getValue("/root/user/scanuser"); var patid = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("patid")); var ioflag = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("class")); var formcode = parent.model.getValue("/root/send/paget/formcode"); var treatno = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("treatno")); var clincode = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("clincode")); var indate = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("indate")); var doccode = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("doccode")); var page; var cdate; var ctime; var cutFilename = ""; parent.parent.f_ltp.FolderCreate(delfoler); submit("TRMPL03311"); cdate = model.getValue("/root/main/now/sysdate").substr(0, 8); ctime = model.getValue("/root/main/now/sysdate").substr(8, 6); if (delpage == "") { if (rdo_viewmode.value == "TV") { for (i=1; i <= f_View.PageTotal; i++) { if(f_View.ThumbnailSelect(i) == true) { filename = f_View.PageFilePath(i); filehidden = f_View.PageHiddenText(i); var fso = new ActiveXObject("Scripting.FileSystemObject"); selpage = i; model.setValue("/root/cond/scanmode", "add"); page = i; if (trash != "trash") { LTPFilePut(delfoler + "\\" + fso.GetFileName(filehidden), filename, "parentparent"); } filehidden = fso.GetBaseName(filehidden); bDelData += "d¢Ë" + filehidden + "¢Ë" + instcd + "¢Ì"; bUpdpageData += "d¢Ë" + treatno + "¢Ë" + formcode + "¢Ë" + page + "¢Ë" + instcd + "¢Ì"; bIntPageDelLogt += "d¢Ë" + filehidden + "¢Ë" + patid + "¢Ë" + indate + "¢Ë" + clincode + "¢Ë" + ioflag + "¢Ë00000¢Ë" + formcode + "¢Ë" + page + "¢Ë" + cdate + "¢Ë" + ctime + "¢Ë" + cuserid + "¢Ë" + treatno + "¢Ë" + "" + "¢Ë" + instcd + "¢Ì"; if(cutFilename == "") { cutFilename = filename; } else { cutFilename = cutFilename + "|"; cutFilename = cutFilename + filename; } if (cutyn == "cut") { parent.iviewer1.f_View.PageAppend(filename, 1, 1); } } } model.setValue("/root/send/delimage/updpage", bUpdpageData); submit("TXMPL03320"); model.setValue("/root/send/delimage/pageno", bDelData); submit("TXMPL03317"); if (trash != "trash") { model.setValue("/root/send/deletepagetinfo/intdellog", bIntPageDelLogt); submit("TXMPL03333"); } } else { i = f_View.PageCurrent; filename = f_View.PageFilePath(i); filehidden = f_View.PageHiddenText(i); var fso = new ActiveXObject("Scripting.FileSystemObject"); selpage = i; model.setValue("/root/cond/scanmode", "add"); page = i; LTPFilePut(delfoler + "\\" + fso.GetFileName(filehidden), filename, "parentparent"); filehidden = fso.GetBaseName(filehidden); bDelData += "d¢Ë" + filehidden + "¢Ë" + instcd + "¢Ì"; bUpdpageData += "d¢Ë" + treatno + "¢Ë" + formcode + "¢Ë" + page + "¢Ë" + instcd + "¢Ì"; bIntPageDelLogt += "d¢Ë" + filehidden + "¢Ë" + patid + "¢Ë" + indate + "¢Ë" + clincode + "¢Ë" + ioflag + "¢Ë00000¢Ë" + formcode + "¢Ë" + page + "¢Ë" + cdate + "¢Ë" + ctime + "¢Ë" + cuserid + "¢Ë" + treatno + "¢Ë" + "" + "¢Ë" + instcd + "¢Ì"; if(cutFilename == "") { cutFilename = filename; } else { cutFilename = cutFilename + "|"; cutFilename = cutFilename + filename; } if (cutyn == "cut") { parent.iviewer1.f_View.PageAppend(filename, 1, 1); } model.setValue("/root/send/delimage/updpage", bUpdpageData); submit("TXMPL03320"); model.setValue("/root/send/delimage/pageno", bDelData); submit("TXMPL03317"); if (trash != "trash") { model.setValue("/root/send/deletepagetinfo/intdellog", bIntPageDelLogt); submit("TXMPL03333"); } } if (cutyn == "cut") { scanInsertBatch(cutFilename, "add", "parentparent"); } } else { filename = f_View.PageFilePath(delpage); filehidden = f_View.PageHiddenText(delpage); var fso = new ActiveXObject("Scripting.FileSystemObject"); filehidden = fso.GetBaseName(filehidden); sSaveData += "d¢Ë" + filehidden + "¢Ì"; f_View.PageRemove(delpage, delpage); if (fso.FileExists(filehidden) == true) { fso.DeleteFile(filehidden); } selpage = delpage; model.setValue("root/send/delimage/page", delpage) model.setValue("root/send/delimage/pageno", sSaveData); submit("TXMPL03317"); // submit("TXMPL03319"); submit("TXMPL03320"); } } function selectprntcancle() { var i; for (i=1; i<= dg_treat.rows - 1; i++) { //alert(i); model.makeNode("/root/send/temp[" + i + "]/ocrtag"); ocrtag = dg_treat.valueMatrix(i, dg_treat.colref("ocrtag")) model.setValue("/root/send/temp[" + i + "]/ocrtag", ocrtag); // copyNodeset("/root/send/ocrreturn/ocrtag", "/root/send/temp[" + i + // "]/ocrtag"); } } function blankcheck() { var i; var filename; var filesize; var chkflag; var fso = new ActiveXObject("Scripting.FileSystemObject"); for (i=1; i <= iviewer1.f_View.PageTotal; i++) { filename = iviewer1.f_View.PageFilePath(i); filesize = fso.GetFile(filename).size; if(filesize < 5000) { chkflag = "true" } } return chkflag; } function DelIndexImgByHit(patid, ioflag, indate, clincode, formcode, cuserid, instcd) { var fso = new ActiveXObject("Scripting.FileSystemObject"); var pageno; var treatno; var formcode; var page; var patid; var indate; var clincode; var doccode; var cdate; var ctime; var extension; var delfoler = model.getValue("/root/main/ltpindexinfo/ltpindexpath") + "\\" + "delfolder"; var filepath = model.getValue("/root/main/ltpindexinfo/ltpindexpath"); var bDelData = "status¢Ëpageno¢Ëinstcd¢Ì"; var bUpdpageData = "status¢Ëtreatno¢Ëformcode¢Ëpage¢Ëinstcd¢Ì" var bIntPageDelLogt = "status¢Ëpageno¢Ëpatid¢Ëindate¢Ëclincode¢Ëclass¢Ëdoccode¢Ëformcode¢Ëpage¢Ëcdate¢Ëctime¢Ëcuserid¢Ëtreatno¢Ëocrcode¢Ëinstcd¢Ì"; var page; var count; parent.parent.f_ltp.FolderCreate(delfoler); submit("TRMPL03333"); count = getNodesetCount("/root/main/ocrinfobyocr/pid") for (i=1; i <= count; i++) { pageno = model.getValue("/root/send/trashinfo[" + i + "]/pageno"); extension = model.getValue("/root/send/trashinfo[" + i + "]/extension"); treatno = model.getValue("/root/send/trashinfo[" + i + "]/treatno"); page = model.getValue("/root/send/trashinfo[" + i + "]/page"); doccode = model.getValue("/root/send/trashinfo[" + i + "]/doccode"); cdate = model.getValue("/root/send/trashinfo[" + i + "]/cdate"); ctime = model.getValue("/root/send/trashinfo[" + i + "]/ctime"); filepath = filepath + "\\" + cdate.substr(0,6) + "\\" + cdate.substr(6,2) + "\\" + pageno.substr(pageno.length - 1, 1) + "\\" + pageno + "." + extension; LTPFilePut(delfoler + "\\" + fso.GetFileName(pageno), filepath, "parentparent"); bDelData += "d¢Ë" + pageno + "¢Ë" + instcd + "¢Ì"; bUpdpageData += "d¢Ë" + treatno + "¢Ë" + formcode + "¢Ë" + page + "¢Ë" + instcd + "¢Ì"; bIntPageDelLogt += "d¢Ë" + pageno + "¢Ë" + patid + "¢Ë" + indate + "¢Ë" + clincode + "¢Ë" + ioflag + "¢Ë" + doccode + "¢Ë" + formcode + "¢Ë" + page + "¢Ë" + cdate + "¢Ë" + ctime + "¢Ë" + cuserid + "¢Ë" + treatno + "¢Ë" + "¢Ë" + instcd + "¢Ì"; } model.setValue("/root/send/delimage/updpage", bUpdpageData); submit("TXMPL03320"); model.setValue("/root/send/delimage/pageno", bDelData); submit("TXMPL03317"); model.setValue("/root/send/deletepagetinfo/intdellog", bIntPageDelLogt); submit("TXMPL03333"); } function copyaaa() { var fso = new ActiveXObject("Scripting.FileSystemObject"); var spath; var dpath; spath = "C:\\2012040913481450.tif" dPath = "C:\\test\\2012040913481450.tif" } function ColorToBw() { var moveRootPath; var movePath; var patid = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("patid")); var ioflag = parent.dg_treat.valueMatrix(parent.dg_treat.row, parent.dg_treat.colref("class")); var instcd = parent.parent.model.getValue("/root/user/instcd"); var tempfile; var page; var fso = new ActiveXObject("Scripting.FileSystemObject"); var sSaveData = "status¢Ëpatid¢Ëfileno¢Ëgubun¢Ëinstcd¢Ì"; var fileno; TrashFolder() f_View.AutoRefresh = false; if (rdo_viewmode.value == "TV") { for (i = 1; i <=f_View.PageTotal; i++) { if(f_View.ThumbnailSelect(i) == true) { if (fso.GetExtensionName(f_View.PageFilePath(i)) == "tif") { } else { f_View.PageCurrent = i f_View.ActionSingle = 17; copyfile(f_View.PageFilePath(i), i, "B") fileno = f_View.PageFilePath(i).replace("jpg", "tif"); sSaveData += "d¢Ë" + patid + "¢Ë" + f_View.PageHiddenText(i) + "¢Ë" + "C" + "¢Ë" + instcd + "¢Ì"; RemotePath = f_View.PageHiddenText(i).replace("jpg", "tif"); f_View.FileSaveCreate(fileno, -1); f_View.ActionParamINT1 = i; f_View.ActionThumbnail = 1; f_View.PageRemove(i, i) f_View.PageInsert(i, fileno, 1, 1) LocalPath = f_View.PageFilePath(i); LTPFilePut(RemotePath, fileno); } } } } else { /* * if (fso.GetExtensionName(f_View.PageFilePath(i)) == "TIF") { } else { * i = f_View.PageCurrent * * f_View.ActionSingle = 17; * * copyfile(fv.PageFilePath(i), page, "B") * * fileno = f_View.PageHiddenText(i).replace("jpg", "tif"); * * sSaveData += "d¢Ë" + patid + "¢Ë" + fileno + "¢Ë" + instcd + "¢Ì"; * * f_View.FileSaveCreate(fileno, -1); f_View.ActionParamINT1 = i; * f_View.ActionThumbnail = 1; * * f_View.PageRemove(i, i) f_View.PageInsert(i, fileno, 1, 1) * * LocalPath = f_View.PageFilePath(i); RemotePath = * f_View.PageHiddenText(i).replace("jpg", "tif"); alert("RemotePath " + * RemotePath); alert("fileno " + fileno); LTPFilePut(RemotePath, * fileno); } */ } model.setValue("/root/send/colortobw/fileno", sSaveData); submit("TXMPL03345"); f_View.AutoRefresh = true; } function printChart(docName, msg) { var strPage; var strPrintLog; var bFirstPage; var selCount; var start = getCurrentDateTime(); switch(rdo_viewmode.value) { case "PV": var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent")); if(pageCurrent > 0) { strPath = g_path[pageCurrent]; strPage = g_page[pageCurrent]; f_print.DocumentBegin(docName); f_print.PageBegin(); f_preview.pageremove(0,0); f_preview.viewmode = 2; f_preview.pageappend(f_View.PageFilePath(pageCurrent),f_View.PageFilePage(pageCurrent) + 1 ,f_View.PageFilePage(pageCurrent) + 1 ); f_preview.pagecurrent = i; if(f_preview.pagewidth > f_preview.pageheight) { if(f_View.PageFilePath(i).substr(0,3) =! "utf") { f_preview.actionthumbnail = 2; TvTurnSelect("left"); } } f_print.PrintImage(f_View.PageFilePath(pageCurrent),f_View.PageFilePage(pageCurrent) + 1, 0, 0, f_print.PrintableWidth, f_print.PrintableHeight, 2,1,1,12); // »çº»¹ß±Þ½Ã if (docName=="SMMRC03000") { f_print.FontFaceName = "HY¿ï¸ªµµM" f_print.FontSize = 12 f_print.FontBold = true f_print.PrintText(360, f_print.PrintableHeight - f_print.PrintTextHeight("ÀÌ ¼­½ÄÀº »çº»ÀÔ´Ï´Ù(¿øº» ´ëÁ¶ÇÊ)", 0),f_print.PrintableWidth,f_print.PrintableHeight,"ÀÌ ¼­½ÄÀº »çº»ÀÔ´Ï´Ù(¿øº» ´ëÁ¶ÇÊ)",2048,0xff0000,0xff0000); // f_print.PrintText(0, 0 // ,f_print.PrintableWidth,f_print.PrintableHeight,"ÀÌ ¼­½ÄÀº // »çº»ÀÔ´Ï´Ù(¿øº» ´ëÁ¶ÇÊ)",2048,0xff0000,0xff0000); } // »çº»¹ß±Þ Ãâ·Â¼­½ÄÀÇ ÇÏ´Ü¿¡ »çº»¹ß±Þ¿ëµµ(¸ñÀû) Ãâ·Â¿äû(2010-04-05 ¹ÚÁ¾ÈÆ) // [¿äû¹øÈ£ : 11336, TaskNo : 43930, ¿ì¼±¼øÀ§ : SY] // »çº»¹ß±Þ½Ã(¹ß±Þ¿ëµµ) if (msg != null || msg != "") { f_print.FontFaceName = "HY¿ï¸ªµµM" f_print.FontSize = 12 f_print.FontBold = true f_print.PrintText(25, f_print.PrintableHeight - 20,f_print.PrintableWidth,f_print.PrintableHeight,msg,2048,0xff0000,0xff0000); // f_print.PrintText(0, 0 // ,f_print.PrintableWidth,f_print.PrintableHeight,msg,2048,0xff0000,0xff0000); } f_print.PageEnd(); model.setValue("/root/main/printcount", parseInt(model.getValue("/root/main/printcount")) + 1 ); if(f_preview.pagewidth > f_preview.pageheight) { if(f_View.PageFilePath(i).substr(0,3) =! "utf") { f_preview.actionthumbnail = 2; TvTurnSelect("right"); } } f_print.DocumentEnd(); // Ãâ·Â Å뺸 model.setAttribute("sCMR_Param", printLog(pageCurrent)); } else { alert("Ãâ·ÂÇÒ ÆäÀÌÁö°¡ ¾ø½À´Ï´Ù."); return false; } break; case "TV": selCount = getSelectPageCount() // alert("selCount " + selCount) if(selCount == 0) { f_print.DocumentBegin(docName); bFirstPage = true; strPrintLog = ""; for(i = 1; i <= f_View.PageTotal; i++) { f_print.PageBegin(); f_preview.pageremove(0,0); f_preview.viewmode = 2; f_preview.pageappend(f_View.PageFilePath(i),f_View.PageFilePage(i) + 1,f_View.PageFilePage(i) + 1); f_preview.pagecurrent = i; if(f_preview.pagewidth > f_preview.pageheight) { if(f_View.PageFilePath(i).substr(0,3) =! "utf") { f_preview.actionthumbnail = 2; TvTurnSelect("left"); } } f_print.PrintImage(f_View.PageFilePath(i),f_View.PageFilePage(i) + 1, 0, 0, f_print.PrintableWidth, f_print.PrintableHeight, 2,1,1,12); // »çº»¹ß±Þ½Ã if (docName=="SMMRC03000") { f_print.FontFaceName = "HY¿ï¸ªµµM" f_print.FontSize = 12 f_print.FontBold = true f_print.PrintText(360, f_print.PrintableHeight - f_print.PrintTextHeight("ÀÌ ¼­½ÄÀº »çº»ÀÔ´Ï´Ù(¿øº» ´ëÁ¶ÇÊ)", 0),f_print.PrintableWidth,f_print.PrintableHeight,"ÀÌ ¼­½ÄÀº »çº»ÀÔ´Ï´Ù(¿øº» ´ëÁ¶ÇÊ)",2048,0xff0000,0xff0000); // f_print.PrintText(0, 0 // ,f_print.PrintableWidth,f_print.PrintableHeight,"ÀÌ ¼­½ÄÀº // »çº»ÀÔ´Ï´Ù(¿øº» ´ëÁ¶ÇÊ)",2048,0xff0000,0xff0000); } // »çº»¹ß±Þ Ãâ·Â¼­½ÄÀÇ ÇÏ´Ü¿¡ »çº»¹ß±Þ¿ëµµ(¸ñÀû) Ãâ·Â¿äû(2010-04-05 ¹ÚÁ¾ÈÆ) // [¿äû¹øÈ£ : 11336, TaskNo : 43930, ¿ì¼±¼øÀ§ : SY] // »çº»¹ß±Þ½Ã(¹ß±Þ¿ëµµ) if (msg != null || msg != "") { f_print.FontFaceName = "HY¿ï¸ªµµM" f_print.FontSize = 12 f_print.FontBold = true f_print.PrintText(25, f_print.PrintableHeight - 10,f_print.PrintableWidth,f_print.PrintableHeight,msg,2048,0xff0000,0xff0000); // f_print.PrintText(0, 0 // ,f_print.PrintableWidth,f_print.PrintableHeight,msg,2048,0xff0000,0xff0000); } f_print.PageEnd(); model.setValue("/root/main/printcount", parseInt(model.getValue("/root/main/printcount")) + 1 ); if(f_preview.pagewidth > f_preview.pageheight) { if(f_View.PageFilePath(i).substr(0,3) =! "utf") { f_preview.actionthumbnail = 2; TvTurnSelect("right"); } } strPrintLog += printLog(i); } f_print.DocumentEnd(); // alert(model.getValue("/root/main/printcount") ) model.setAttribute("sCMR_Param", strPrintLog); break; } else { f_print.DocumentBegin(docName); bFirstPage = true; strPrintLog = ""; for(i = 1; i <= f_View.PageTotal; i++) { if(f_View.ThumbnailSelect(i) == true) { f_print.PageBegin(); f_preview.pageremove(0,0); f_preview.viewmode = 2; f_preview.pageappend(f_View.PageFilePath(i),f_View.PageFilePage(i) + 1,f_View.PageFilePage(i) + 1); f_preview.pagecurrent = i; if(f_preview.pagewidth > f_preview.pageheight) { if(f_View.PageFilePath(i).substr(0,3) =! "utf") { f_preview.actionthumbnail = 2; TvTurnSelect("left"); } } f_print.PrintImage(f_View.PageFilePath(i),f_View.PageFilePage(i) + 1, 0, 0, f_print.PrintableWidth, f_print.PrintableHeight, 2,1,1,12); // model.setValue("/root/main/printcount", // parseInt(model.getValue("/root/main/printcount")) + 1 ); // »çº»¹ß±Þ½Ã if (docName=="SMMRC03000") { f_print.FontFaceName = "HY¿ï¸ªµµM" f_print.FontSize = 12 f_print.FontBold = true f_print.PrintText(360, f_print.PrintableHeight - f_print.PrintTextHeight("ÀÌ ¼­½ÄÀº »çº»ÀÔ´Ï´Ù(¿øº» ´ëÁ¶ÇÊ)", 0),f_print.PrintableWidth,f_print.PrintableHeight,"ÀÌ ¼­½ÄÀº »çº»ÀÔ´Ï´Ù(¿øº» ´ëÁ¶ÇÊ)",2048,0xff0000,0xff0000); } // »çº»¹ß±Þ Ãâ·Â¼­½ÄÀÇ ÇÏ´Ü¿¡ »çº»¹ß±Þ¿ëµµ(¸ñÀû) Ãâ·Â¿äû(2010-04-05 ¹ÚÁ¾ÈÆ) // [¿äû¹øÈ£ : 11336, TaskNo : 43930, ¿ì¼±¼øÀ§ : SY] // »çº»¹ß±Þ½Ã(¹ß±Þ¿ëµµ) if (msg != null || msg != "") { f_print.FontFaceName = "HY¿ï¸ªµµM" f_print.FontSize = 12 f_print.FontBold = true f_print.PrintText(25, f_print.PrintableHeight - f_print.PrintTextHeight("ÀÌ ¼­½ÄÀº »çº»ÀÔ´Ï´Ù(¿øº» ´ëÁ¶ÇÊ)", 0),f_print.PrintableWidth,f_print.PrintableHeight,msg,2048,0xff0000,0xff0000); } f_print.PageEnd(); // model.setValue("/root/main/printcount", // parseInt(model.getValue("/root/main/printcount")) + 1 ); if(f_preview.pagewidth > f_preview.pageheight) { if(f_View.PageFilePath(i).substr(0,3) =! "utf") { f_preview.actionthumbnail = 2; TvTurnSelect("right"); } } // strPrintLog += printLog(i); } } f_print.DocumentEnd(); // model.setAttribute("sCMR_Param", strPrintLog); break; } } return true; } function getSelectPageCount() { var seletedpage; seletedpage = 0; for (count = 1; count <= f_View.PageTotal; count++) { if(f_View.ThumbnailSelect(count) == true) { seletedpage = seletedpage + 1 } } return seletedpage } function DrawGrid() { var usercount; var datecount; var cdate; var cuserid; var scancnt; var i; var j; datecount = getNodesetCount("/root/hidden/scancnt/cdate"); usercount = getNodesetCount("/root/main/scancntuser/cuserid"); // dg_scancnt.rebuild(); for (i = dg_scancnt.cols-1; i >= 1; i--) { dg_scancnt.deleteColumn(i); } for (j = dg_scancnt.rows-1; j > 1; j--) { dg_scancnt.deleteRow(j); } var nodename = "a"; if ( datecount != "" ) fAddCol( datecount, "/root/main/grid1/grid", "/root/temp/grid", dg_scancnt, nodename, "input" ); if ( usercount != "" ) fAddRow(dg_scancnt, usercount); dg_scancnt.refresh(); } function fAddRow(gridObj, rows) { for(var i=1; i= 1; i--) { if(fv.ThumbnailSelect(i) == true) { filehidden = fv.PageHiddenText(i); // ȯÀÚ³ª ¼­½Ä À̵¿À» À§ÇØ trashfolder¿¡ Àӽà º¹»ç filename = fv.PageFilePath(i); f_ltp.FileDelete(filehidden); fv.PageRemove(i,i); fv.PageCurrent = i; } } model.refresh(); for (i=1; i <= fv.PageTotal; i++) { fv.PageText(i, i); } fv.AutoRefresh = true; } function DelIndexImg(fv) { var filename; // = model.getValue("root/send/delimage/imageno"); var fso = new ActiveXObject("Scripting.FileSystemObject"); var pageno; var i; var bDelData = "status¢Ëpageno¢Ì"; var bUpdpageData = "status¢Ëtreatno¢Ëformcode¢Ëpage¢Ì" var treatno = parent.model.getValue("/root/send/treatinfo/treatno"); var formcode = parent.model.getvalue("/root/send/treatinfo/formcode"); var page; for (i=1; i <= fv.PageTotal; i++) { if(fv.ThumbnailSelect(i) == true) { filename = f_View.PageFilePath(i); filehidden = f_View.PageHiddenText(i); page = i; filehidden = fso.GetBaseName(filehidden); bDelData += "d¢Ë" + filehidden + "¢Ì"; bUpdpageData += "d¢Ë" + treatno + "¢Ë" + formcode + "¢Ë" + page + "¢Ì"; } } model.setValue("/root/send/delimage/updpage", bUpdpageData); submit("TXMPL03320"); model.setValue("/root/send/delimage/pageno", bDelData); submit("TXMPL03317"); } function ThumbnailClick_event1(fv, page, shift, button, x, y, fv_temp, type, mode) { var LocalPath; var RemotePath; var fso = new ActiveXObject("Scripting.FileSystemObject"); var scanSaveData = "status¢Ëfileno¢Ëpage¢Ëinstcd¢Ì"; var indexSaveData = "status¢Ëpageno¢Ëpage¢Ëinstcd¢Ì"; var indexinfo; var patno = "undo"; TrashFolder() if (page == 0) { } else { if(button == 1) { if(shift == 1) { var i = 0; var first = 0; var last = page; var count = 0; for(i=1; i <= fv.PageTotal; i++) { if(fv.ThumbnailSelect(i) == true) { if(first == 0) { first = i; } } } if(page >= first) { count = last - first; for(i=1; i <= count; i++) { fv.ThumbnailSelect(first + i, true); } } else { count = first - last; for(i=0; i <= count; i++) { fv.ThumbnailSelect(last + i, true); } } } else if (shift == 0) { if(fv.ThumbnailSelect(page) == false) { fv.ThumbnailSelect(page, true); // ÇöÀç ÆäÀÌÁö ÀÔ·Â model.setValue("/root/main/chartinfo/pagecurrent", page); model.refresh(); } else { fv.ThumbnailSelect(page,false); } } } } } function fvSaveCreate1() { var i; var localPath; var remotePath; for (i=1; i <= f_View.PageTotal; i++) { if(f_View.ThumbnailSelect(i) == true) { localPath = f_View.PageFilePath(i); RemotePath = f_View.PageHiddenText(i); LTPFilePut(RemotePath, localPath, "parent"); } } } /* * - * ======================================================================================= * * Image EMR Viewer Program (SSMRC03300.js) - Version : 1) : Ver.1.00.00 - * ======================================================================================= */