| | |
| | | unit CB_IMGPSScanImp; |
| | | unit CB_IMGPSScanImp; |
| | | |
| | | {$WARN SYMBOL_PLATFORM OFF} |
| | | |
| | |
| | | RejectCase : Boolean; |
| | | ErrIndex : Integer; |
| | | |
| | | //*****¹w³]°Ï*****// |
| | | Def_DeviceDelete : Boolean; //ªÅ¥Õ¶§R°£±Ò°Ê |
| | | Def_DeviceDeleteSize : Integer; //ªÅ¥Õ¶Size |
| | | Def_ScannerReverse : Boolean; //¬O§_»Ý¤Ï¬Û |
| | | Def_BoardClear : Boolean; //¬O§_²M¶ÂÃä |
| | | Def_ScanDpi : Integer; //±½ºËDPI |
| | | Def_ScanDuplex : Boolean; //¬O§_Âù±±½ºË |
| | | Def_ScanRotate : Integer; //±½ºË®É±ÛÂਤ«× |
| | | Def_ScanDeskew : Boolean; //¬O§_¶É±×ÁB¥¿ |
| | | Def_ScanBright : Integer; //«G«× |
| | | Def_ScanContrast : Integer; //¹ï¤ñ |
| | | Def_ScanImgShowMode : Integer; //0:²M·¡¼v¹³ 1:¤£²M·¡¼v¹³ 2:¤£Åã¥Ü |
| | | Def_ScanImgSetUse : Boolean; //¬O§_¨Ï¥Î«G«×¹ï¤ñ³]©w |
| | | //*****¹w³]°Ï*****// |
| | | //*****預設區*****// |
| | | Def_DeviceDelete : Boolean; //空白頁刪除啟動 |
| | | Def_DeviceDeleteSize : Integer; //空白頁Size |
| | | Def_ScannerReverse : Boolean; //是否需反相 |
| | | Def_BoardClear : Boolean; //是否清黑邊 |
| | | Def_ScanDpi : Integer; //掃瞄DPI |
| | | Def_ScanDuplex : Boolean; //是否雙面掃瞄 |
| | | Def_ScanRotate : Integer; //掃瞄時旋轉角度 |
| | | Def_ScanDeskew : Boolean; //是否傾斜矯正 |
| | | Def_ScanBright : Integer; //亮度 |
| | | Def_ScanContrast : Integer; //對比 |
| | | Def_ScanImgShowMode : Integer; //0:清楚影像 1:不清楚影像 2:不顯示 |
| | | Def_ScanImgSetUse : Boolean; //是否使用亮度對比設定 |
| | | //*****預設區*****// |
| | | |
| | | Const |
| | | ISBName = 'PreViewISB'; |
| | | |
| | | {Àò¨ú¦Û¨ª©¥»¸¹©Ò»Ýn } |
| | | {獲取自身版本號所需要 } |
| | | type |
| | | TVersionLanguage = (vlArabic, vlBulgarian, vlCatalan, vlTraditionalChinese, |
| | | vlCzech, vlDanish, vlGerman, vlGreek, vlUSEnglish, vlCastilianSpanish, |
| | |
| | | $0418, $0419, $041A, $041B, $041C, $041D, $041E, $041F, $0420, $0421, |
| | | $0804, $0807, $0809, $080A, $080C, $0810, $0813, $0814, $0816, $081A, |
| | | $0C0C, $100C, $0000); |
| | | {Àò¨ú¦Û¨ª©¥»¸¹©Ò»Ýn end} |
| | | {獲取自身版本號所需要 end} |
| | | |
| | | |
| | | type |
| | |
| | | ImageCount : LongInt; |
| | | end; |
| | | TOMRErrInfo = record |
| | | Display : Boolean; //¬O§_Åã¥Ü |
| | | Ignore : Boolean; //¥i§_§R°£ |
| | | Display : Boolean; //是否顯示 |
| | | Ignore : Boolean; //可否刪除 |
| | | Info : String; |
| | | Mode : String; |
| | | end; |
| | |
| | | { Private declarations } |
| | | HotKeyId1,HotKeyId2,HotKeyId3,HotKeyId4 :Integer; |
| | | |
| | | ////////¶Ç¤J°Ñ¼Æ///////// |
| | | ////////傳入參數///////// |
| | | FUrl : String; |
| | | FCaseID : String; |
| | | FMode : String; //NSCAN:·s¥ó;ESCAN:×§ï |
| | | FMode : String; //NSCAN:新件;ESCAN:修改 20170306 DSCAN:被配合待掃瞄清單使用 |
| | | FModeName : String; |
| | | FWork_no : String; |
| | | FUserID : String; |
| | |
| | | FVerify : String; |
| | | FReWrite : String; |
| | | FLanguage : String; |
| | | FLoanDoc_Value : String; //·s¼W±Â«H¨÷ªºÈ |
| | | FLoanDoc_Enable : String; //·s¼W±Â«H¨÷¬O§_¥i²§°Ê |
| | | FUseProxy : String; //¬O§_¨Ï¥ÎProxy |
| | | FC_DocNoList : String; //¥~±¶Ç¨Ón·s¼Wªº¤å¥ó½s¸¹ |
| | | FC_DocNameList : String; //¥~±¶Ç¨Ón·s¼Wªº¦Ûq¤å¥ó |
| | | FFixFileList : String; //nÂê¦íªºÀɦW |
| | | FIs_In_Wh : String; //¬O§_¥uÅã¥Ü¤J®w¤å¥ó (Y:¥uÅã¥Ü¤J®w N:¥uÅã¥Ü«D¤J®w ªÅ¥Õ:³£Åã¥Ü) |
| | | FOldCaseInfo : String; //ÂÂ¥ó¸ê°T CaseID_year[tab]CaseID_year |
| | | FPrintyn : String; //¬O§_¥i¦C¦L |
| | | FIs_OldCase : String; //¬O§_¬O®ײĤ@¦¸¶i¤J |
| | | FCustDocYN : String; //¬O§_¥i¦Ûq¤å¥ó |
| | | ////////¶Ç¤J°Ñ¼Æ/////// |
| | | FLoanDoc_Value : String; //新增授信卷的值 |
| | | FLoanDoc_Enable : String; //新增授信卷是否可異動 |
| | | FUseProxy : String; //是否使用Proxy |
| | | FC_DocNoList : String; //外面傳來要新增的文件編號 |
| | | FC_DocNameList : String; //外面傳來要新增的自訂文件 |
| | | FFixFileList : String; //要鎖住的檔名 |
| | | FIs_In_Wh : String; //是否只顯示入庫文件 (Y:只顯示入庫 N:只顯示非入庫 空白:都顯示) |
| | | FOldCaseInfo : String; //舊件資訊 CaseID_year[tab]CaseID_year |
| | | FPrintyn : String; //是否可列印 |
| | | FIs_OldCase : String; //是否是舊案第一次進入 |
| | | FCustDocYN : String; //是否可自訂文件 |
| | | //20170222 新增 |
| | | FImgDPI:integer;//DPI 依業務別決定 150~~1200 預設300 |
| | | FScanColor:integer;///掃瞄色彩 依業務別決定 0 :黑白 1:灰階 2:彩色 預設黑白 |
| | | FFileSizeLimit:integer;//匯入單一檔案大小限 依業務別決定 以KB為單位 預設5*1024kb |
| | | FCaseNoLength:integer;//案件編號長度檢查 依業務別決定 無預設 一定要傳入 |
| | | FImgDelete:string; // Y/N 有權限可在補件時刪除影像 |
| | | FIsExternal:string;//Y/N |
| | | FCheck_main_form:string; //Y/N |
| | | ////////傳入參數/////// |
| | | |
| | | //********Http°Ñ¼Æ******** |
| | | HttpErrStr : String; //¿ù»~°T®§ |
| | | //********Http°Ñ¼Æ******** |
| | | //********Http參數******** |
| | | HttpErrStr : String; //錯誤訊息 |
| | | //********Http參數******** |
| | | |
| | | //********ini°Ñ¼Æ******** |
| | | DeviceDelete : Boolean; //ªÅ¥Õ¶§R°£±Ò°Ê |
| | | DeviceDeleteSize : Integer; //ªÅ¥Õ¶Size |
| | | ScannerReverse : Boolean; //¬O§_»Ý¤Ï¬Û |
| | | BoardClear : Boolean; //¬O§_²M¶ÂÃä |
| | | ScanDpi : Integer; //±½ºËDPI |
| | | ScanDuplex : Boolean; //¬O§_Âù±±½ºË |
| | | ScanRotate : Integer; //±½ºË®É±ÛÂਤ«× |
| | | ScanDeskew : Boolean; //¬O§_¶É±×ÁB¥¿ |
| | | ScanBright : Integer; //«G«× |
| | | ScanContrast : Integer; //¹ï¤ñ |
| | | ScanImgShowMode : Integer; //0:²M·¡¼v¹³ 1:¤£²M·¡¼v¹³ 2:¤£Åã¥Ü |
| | | ScanImgSetUse : Boolean; //¬O§_¨Ï¥Î«G«×¹ï¤ñ³]©w |
| | | //********ini參數******** |
| | | DeviceDelete : Boolean; //空白頁刪除啟動 |
| | | DeviceDeleteSize : Integer; //空白頁Size |
| | | ScannerReverse : Boolean; //是否需反相 |
| | | BoardClear : Boolean; //是否清黑邊 |
| | | ScanDpi : Integer; //掃瞄DPI |
| | | ScanDuplex : Boolean; //是否雙面掃瞄 |
| | | ScanRotate : Integer; //掃瞄時旋轉角度 |
| | | ScanDeskew : Boolean; //是否傾斜矯正 |
| | | ScanBright : Integer; //亮度 |
| | | ScanContrast : Integer; //對比 |
| | | ScanImgShowMode : Integer; //0:清楚影像 1:不清楚影像 2:不顯示 |
| | | ScanImgSetUse : Boolean; //是否使用亮度對比設定 |
| | | |
| | | //********ini°Ñ¼Æ******** |
| | | //********ini參數******** |
| | | ScanColor : TImageFormat; |
| | | |
| | | //********®É¶¡******** |
| | | //********時間******** |
| | | ServerDate : String; |
| | | ServerTime : String; |
| | | Balance : Longint; //local¸òserverªº®É¶¡®t |
| | | ScanDenialTime : String; //°±¤î¶i¥ó®É¶¡ |
| | | //********®É¶¡******** |
| | | ScanDenialHint : String; //±½´yÅã¥Ü´£¿ô¦r¦ê |
| | | Balance : Longint; //local跟server的時間差 |
| | | ScanDenialTime : String; //停止進件時間 |
| | | //********時間******** |
| | | ScanDenialHint : String; //掃描顯示提醒字串 |
| | | |
| | | //********¸ô®|******** |
| | | //********路徑******** |
| | | ScanPath : String; // SpecifyDir\Workid\userunit\mode |
| | | ImagePath : String; // SpecifyDir\Workid\userunit\mode |
| | | ImageSavePath : String; // ImagePath\ |
| | | ScaniniPath : String; // SpecifyDir\Workid\userunit\ |
| | | LngPath :String; //¦h°ê»y¨¥Àɥؿý |
| | | CheckXmlPath : String; //Àˮ֥ΪºXml¦s©ñ¥Ø¿ý |
| | | SitePath : String; //µn¥´¦ì¸m(¤Áñ¦W¥Î) |
| | | SamplePath : String; //½d¥»¥Ø¿ý |
| | | TransPath : String; //ÀɮפW¶Çªº¸ô®|(¸É¥R¥ó·|¦h¤@¼h¥Ø¿ý) |
| | | //********¸ô®|******** |
| | | ScanSaveFilename : String; //±½ºËªºÀɦW |
| | | ScanCaseno : String; //±½ºË®Éªº®×¸¹ |
| | | ScanDocDir : String; //±½´y®Éªº¤å¥ó¥N¸¹¥Ø¿ý |
| | | //********²M³æ°Ï******** |
| | | Doc_Inf_List : TStringList; //Doc_Inf ²M³æ |
| | | DM_FORM_INF_List :TstringList; //DM_FORM_INF ²M³æ |
| | | FORM_INF_List : TStringList; //FORM_INFªº²M³æ |
| | | CHECK_RULE_INF_List : TStringList; //CHECK_RULE_INF ²M³æ |
| | | MEMO_INF_List : TStringList; //MEMO_INF ²M³æ |
| | | WORK_INF_List : TStringList; //WORK_INF ²M³æ |
| | | LASTEST_FORM_INF_List : TStringList; // LASTEST_FORM_INF ²M³æ |
| | | LngPath :String; //多國語言檔目錄 |
| | | CheckXmlPath : String; //檢核用的Xml存放目錄 |
| | | SitePath : String; //登打位置(切簽名用) |
| | | SamplePath : String; //範本目錄 |
| | | TransPath : String; //檔案上傳的路徑(補充件會多一層目錄) |
| | | //********路徑******** |
| | | ScanSaveFilename : String; //掃瞄的檔名 |
| | | ScanCaseno : String; //掃瞄時的案號 |
| | | ScanDocDir : String; //掃描時的文件代號目錄 |
| | | //********清單區******** |
| | | Doc_Inf_List : TStringList; //Doc_Inf 清單 |
| | | DM_FORM_INF_List :TstringList; //DM_FORM_INF 清單 |
| | | FORM_INF_List : TStringList; //FORM_INF的清單 |
| | | CHECK_RULE_INF_List : TStringList; //CHECK_RULE_INF 清單 |
| | | MEMO_INF_List : TStringList; //MEMO_INF 清單 |
| | | WORK_INF_List : TStringList; //WORK_INF 清單 |
| | | LASTEST_FORM_INF_List : TStringList; // LASTEST_FORM_INF 清單 |
| | | |
| | | FindResult : TStringList; //§äSQLDataªºµ²ªG |
| | | CaseList : TStringList; //°O¿ý±½ºË®×¥óªº¶¶§Ç |
| | | Context_DocnoList : TStringlist; //®×¥ó¸ÌªºDocno²M³æ |
| | | CaseDocNoList : TStringlist; //®×¥ó¸ÌªºDocNo²M³æ(¤£«½Æ) |
| | | CaseDocNo_CopiesList : TStringlist; //®×¥ó¸ÌªºDocNo¥÷¼Æ²M³æ |
| | | ContextList : TStringlist; //®×¥ó¸ÌªºÀɮײM³æ |
| | | OMRFileList : TStringList; //nOMRÀˮ֪º¤å¥ó(¥uÀˬd¨CºØFormªº²Ä¤@¶) |
| | | Cust_DocNoList : TStringlist; //¦Û¦æ©w¸q¤å¥ó¦WºÙ |
| | | IN_WH_DocNoList : TStringlist; //¤J®wªº¤å¥ó²M³æ |
| | | FindResult : TStringList; //找SQLData的結果 |
| | | CaseList : TStringList; //記錄掃瞄案件的順序 |
| | | Context_DocnoList : TStringlist; //案件裡的Docno清單 |
| | | CaseDocNoList : TStringlist; //案件裡的DocNo清單(不重複) |
| | | CaseDocNo_CopiesList : TStringlist; //案件裡的DocNo份數清單 |
| | | ContextList : TStringlist; //案件裡的檔案清單 |
| | | OMRFileList : TStringList; //要OMR檢核的文件(只檢查每種Form的第一頁) |
| | | Cust_DocNoList : TStringlist; //自行定義文件名稱 |
| | | IN_WH_DocNoList : TStringlist; //入庫的文件清單 |
| | | |
| | | FormCode_PageSize : TStringList; //¤å¥óªº¹w³]¤j¤p FormCode_Height_Width |
| | | DocNo_NeedDoc : TStringList; //¦³Docno®Én¬Û¨Ìªº¤å¥ó DocNo_¬Û¨Ì¤å¥ó_¬Û¨Ì¤å¥ó |
| | | DocNo_NoDoc : TstringList; //¦³Docno®É¤¬¥¸ªº¤å¥ó DocNo_¤¬¥¸¤å¥ó_¤¬¥¸¤å¥ó |
| | | DocNo_VerinCase : TStringlist; //®×¥ó¸ÌªºDocNo+ª©¥»ªº²M³æ |
| | | FormCode_PageSize : TStringList; //文件的預設大小 FormCode_Height_Width |
| | | DocNo_NeedDoc : TStringList; //有Docno時要相依的文件 DocNo_相依文件_相依文件 |
| | | DocNo_NoDoc : TstringList; //有Docno時互斥的文件 DocNo_互斥文件_互斥文件 |
| | | DocNo_VerinCase : TStringlist; //案件裡的DocNo+版本的清單 |
| | | |
| | | NoSaveBarCodeList : TStringlist; //¤£Àx¦sªº±ø½X²M³æ |
| | | FormID_List : TStringlist; //FormID ²M³æ 20130403 ¦]¬°ìFormCode2Docno·|«ÜºC..§âFormID©â¥X¨Ó |
| | | DocNo_List : TStringlist; //DocNo ²M³æ 20130403 ¦]¬°ìFormCode2Docno·|«ÜºC..§âDocNo©â¥X¨Ó |
| | | NowShowFileList : TStringlist; //¥Ø«eÅã¥Üªº¼v¹³²M³æ |
| | | NowSelectFileList : TStringlist; //¥Ø«e³QÂI¿ïªº¼v¹³²M³æ |
| | | GuideFormIDList : TStringlist; //n·í¾É¤Þ¶ªí³æ²M³æ |
| | | //********²M³æ°Ï******** |
| | | NoSaveBarCodeList : TStringlist; //不儲存的條碼清單 |
| | | FormID_List : TStringlist; //FormID 清單 20130403 因為原FormCode2Docno會很慢..把FormID抽出來 |
| | | DocNo_List : TStringlist; //DocNo 清單 20130403 因為原FormCode2Docno會很慢..把DocNo抽出來 |
| | | NowShowFileList : TStringlist; //目前顯示的影像清單 |
| | | NowSelectFileList : TStringlist; //目前被點選的影像清單 |
| | | GuideFormIDList : TStringlist; //要當導引頁表單清單 |
| | | DivPageFormIDList:TStringlist; //要當分案頁表單清單 |
| | | LastInitFormidList:TStringList; |
| | | LastAddFormidList:TstringList; |
| | | SampleFormIDList:TStringList; //20170627 已存在範本的formid |
| | | //********清單區******** |
| | | |
| | | //********Åã¥Ü°Ï******** |
| | | NowCaseno : String; //¥Ø«eÅã¥Üªº®×¥ó½s¸¹ |
| | | NowDocNo : String; //¥Ø«eªº¤å¥ó½s¸¹ |
| | | NowDocDir : String; //¥Ø«eªº¤å¥ó¥Ø¿ý |
| | | NowFormCode : String; //¥Ø«eÅã¥Üªºªí³æ½s¸¹ |
| | | NowFormName : String; //¥Ø«eÅã¥Üªºªí³æ¦WºÙ |
| | | NowPage : Integer; //¥Ø«eÂI¿ïªº¶½X |
| | | DisplayPath : String; //¥Ø«eÅã¥Üªº¥Ø¿ý |
| | | //********Åã¥Ü°Ï******** |
| | | //********顯示區******** |
| | | NowCaseno : String; //目前顯示的案件編號 |
| | | NowDocNo : String; //目前的文件編號 |
| | | NowDocDir : String; //目前的文件目錄 |
| | | NowFormCode : String; //目前顯示的表單編號 |
| | | NowFormName : String; //目前顯示的表單名稱 |
| | | NowPage : Integer; //目前點選的頁碼 |
| | | DisplayPath : String; //目前顯示的目錄 |
| | | //********顯示區******** |
| | | |
| | | //******¯Á¤Þ¸ê®Æ********* |
| | | Case_loandoc : String; //¬O§_·s¼W±Â«H¨÷ |
| | | //******¯Á¤Þ¸ê®Æ********* |
| | | //******索引資料********* |
| | | Case_loandoc : String; //是否新增授信卷 |
| | | //******索引資料********* |
| | | |
| | | //********¤Q¦r©w¦ìÂI¸ê°T******** |
| | | UpLPoint : Tpoint; //¥ª¤W¤èªº¤Q¦rÂI |
| | | UpRPoint : Tpoint; //¥k¤W¤èªº¤Q¦rÂI |
| | | DownLPoint : Tpoint; //¥ª¤U¤èªº¤Q¦rÂI |
| | | DownRPoint : Tpoint; //¥k¤U¤èªº¤Q¦rÂI |
| | | Point_Width : String; //¤Q¦rÂIªº¼e |
| | | Point_Height : String; //¤Q¦rÂIªº°ª |
| | | //********¤Q¦r©w¦ìÂI¸ê°T******** |
| | | //********十字定位點資訊******** |
| | | UpLPoint : Tpoint; //左上方的十字點 |
| | | UpRPoint : Tpoint; //右上方的十字點 |
| | | DownLPoint : Tpoint; //左下方的十字點 |
| | | DownRPoint : Tpoint; //右下方的十字點 |
| | | Point_Width : String; //十字點的寬 |
| | | Point_Height : String; //十字點的高 |
| | | //********十字定位點資訊******** |
| | | |
| | | CaseIDLength : Integer; //®×¥ó½s¸¹ªø«× |
| | | FormIDLength : Integer; //FormIDªø«× |
| | | DocNoLength : Integer; //Docnoªø«× |
| | | CaseIDLength : Integer; //案件編號長度 |
| | | FormIDLength : Integer; //FormID長度 |
| | | DocNoLength : Integer; //Docno長度 |
| | | |
| | | PEFileName : String; //±½´y®ÉªºÀɦW |
| | | PEFileName : String; //掃描時的檔名 |
| | | |
| | | ISB : TImageScrollBox; |
| | | ScanInfo : TScanInfo; |
| | |
| | | MpsBarcodeinf : TMpsBarcodeinf; |
| | | ScanMode : TScanMode; |
| | | Mpskey : String; |
| | | Seg : Integer; //Åã¥ÜªºÃä¬ÉÈ |
| | | VMode : Integer; //Åã¥Üªºindex |
| | | NowClick : Integer; //¥Ø«eÂI¨ìªº«ö¶s¥\¯àIndex |
| | | ScanIP : String; //±½ºËºÝªºIP |
| | | DisplayISB : TImageScrollBox; //³QÂI¨ìªº¼v¹³ |
| | | SelectISB : TImageScrollBox; //³QÂI¨ìªºÁY¹Ï |
| | | SelectPage : Integer; //³QÂI¨ìªº¶¼Æ |
| | | Seg : Integer; //顯示的邊界值 |
| | | VMode : Integer; //顯示的index |
| | | NowClick : Integer; //目前點到的按鈕功能Index |
| | | ScanIP : String; //掃瞄端的IP |
| | | DisplayISB : TImageScrollBox; //被點到的影像 |
| | | SelectISB : TImageScrollBox; //被點到的縮圖 |
| | | SelectPage : Integer; //被點到的頁數 |
| | | NewTreeNode,MyTreeNode1,MyTreeNode2,MyTreeNode3 : TTreenode; |
| | | InitialOk : Boolean; //¸ê°T¸ü¤J¬O§_§¹¦¨ |
| | | ShowText : String; //DataLoading®Én¨q¥Xªº°T®§ |
| | | Ext : String; //ªþÀɦW .tif .jpg |
| | | SafePixel : Integer; //OMR®e§Ô»~®tÈÂI¼Æ |
| | | OMRErrInfo : Array[1..11] of TOMRErrInfo; //Àˮ֪º¤è¦¡¤Î°T®§ |
| | | ScrollRec : Array[1..8] of TScrollRec; //ÂsÄýµ¡ªºScroll°O¿ý |
| | | RecHozPos,RecVerPos : Integer; //°O¿ýMPSViewX1ªºScrollBar¦ì¸m |
| | | InitialOk : Boolean; //資訊載入是否完成 |
| | | ShowText : String; //DataLoading時要秀出的訊息 |
| | | Ext : String; //附檔名 .tif .jpg |
| | | SafePixel : Integer; //OMR容忍誤差值點數 |
| | | OMRErrInfo : Array[1..11] of TOMRErrInfo; //檢核的方式及訊息 |
| | | ScrollRec : Array[1..8] of TScrollRec; //瀏覽窗的Scroll記錄 |
| | | RecHozPos,RecVerPos : Integer; //記錄MPSViewX1的ScrollBar位置 |
| | | ReczoomPercent : Single; |
| | | SortMode : Boolean; |
| | | PreMytreeNode2Name:String; |
| | | HS,VS : Integer; |
| | | iRate : Single; |
| | | Bt : Integer; //¥hª½½u®É¾î½u§PÂ_ªº®e§ÔÈ |
| | | BarCodeRotate : Integer; //±ø½XnÂ઺¨¤«× |
| | | HaveAppDoc : Boolean; //¸É¥þ®É¬O§_¦³¸É¤Jn«O®Ñ |
| | | Bt : Integer; //去直線時橫線判斷的容忍值 |
| | | BarCodeRotate : Integer; //條碼要轉的角度 |
| | | HaveAppDoc : Boolean; //補全時是否有補入要保書 |
| | | PageLVclear : Boolean; |
| | | CaseCount,PageCount : Integer; //Á`®×¥ó¶q¤ÎÁ`¶¼Æ |
| | | CaseCount,PageCount : Integer; //總案件量及總頁數 |
| | | Item : TMenuItem; |
| | | SampleAnchorMode : String; //½d¥»±½ºË¤Q¦r½uªº¼Ò¦¡ NONE:µL;ANCHOR:¤Q¦r;FRAME:Ã䮨 |
| | | DownImgStatus : String; //¤U¸ü¼v¹³ªºª¬ºA(NO_DATA:¨S¸ê®Æ;NO_FILE:¨S¼v¹³) |
| | | TransForm_Field : String; //n¥ÎOMR¤Ä¿ï½T»{¬O§_Âà´«FORMIDªºÄæ¦ì¦WºÙ |
| | | NowWork_No : String; //²{¦bªº§@·~§O |
| | | CropBarcode : String; //n¤Á¼v¹³ªº±ø½X |
| | | Has_Authorize :String; //¬O§_¦³±ÂÅv®Ñ¼v¹³ |
| | | AttName : String; //¥¼ÂkÃþ¥Ø¿ý¦WºÙ |
| | | SampleAnchorMode : String; //範本掃瞄十字線的模式 NONE:無;ANCHOR:十字;FRAME:邊框 |
| | | DownImgStatus : String; //下載影像的狀態(NO_DATA:沒資料;NO_FILE:沒影像) |
| | | TransForm_Field : String; //要用OMR勾選確認是否轉換FORMID的欄位名稱 |
| | | NowWork_No : String; //現在的作業別 |
| | | CropBarcode : String; //要切影像的條碼 |
| | | Has_Authorize :String; //是否有授權書影像 |
| | | AttName : String; //未歸類目錄名稱 |
| | | NowGuideFormID : String; |
| | | NowDivPageFormID:String; |
| | | |
| | | FirstDocDir : String; |
| | | |
| | |
| | | FEvents: ICB_IMGPSScanXEvents; |
| | | |
| | | procedure HotKeyDown (var Msg : TMessage);message WM_HOTKEY; |
| | | Procedure InitialLanguage(Sender: TObject); //µe±¸ü¤J¦h°ê»y¨¥ |
| | | Procedure InitialLanguage(Sender: TObject); //畫面載入多國語言 |
| | | //Function _Msg(S:String):String; |
| | | |
| | | //*********SQL¬ÛÃö************ |
| | | Procedure SetSQLData(ColumeStr:String;FromList,ToList:TStringlist); //§âSQLȶë¤J |
| | | Function GetSQLData(TableList:TStringlist;Colname:String;colNo:Integer):String; //¨ÌÄæ¦ì¤Î¯Á¤Þ¨úÈ |
| | | Function FindSQLData(TableList:TStringlist;ColumeStr,KeyColumeStr,KeyStr:String;ColNo:Integer;Var ResultList:TStringlist):Boolean; //§ä«ü©wªº¸ê®Æ |
| | | //*********SQL相關************ |
| | | Procedure SetSQLData(ColumeStr:String;FromList,ToList:TStringlist); //把SQL值塞入 |
| | | Function GetSQLData(TableList:TStringlist;Colname:String;colNo:Integer):String; //依欄位及索引取值 |
| | | Function FindSQLData(TableList:TStringlist;ColumeStr,KeyColumeStr,KeyStr:String;ColNo:Integer;Var ResultList:TStringlist):Boolean; //找指定的資料 |
| | | Function GetFindResult(Col:String):String; |
| | | //*********SQL¬ÛÃö************ |
| | | //*********SQL相關************ |
| | | |
| | | |
| | | //*******Âà´«°Ï********* |
| | | Function FindDivFormCode(FormCode:String):Boolean; //§ä¦³¨S¦³¤À®×ªº±ø½X |
| | | Function FormCode2FormName(CaseID,FormCode:String):String; //¥ÎFormCodeÂন¤å¥ó¦WºÙ |
| | | Function FormCode2FileName(FormCode:String;List:TStrings):String; //¥ÎFormCode§ä¥XÀɦW(²Ä¤@¶) |
| | | Function FileName2FormCode(FileName:String):String; //±qÀɦW¨ú¥XFormCode |
| | | Function FileName2FormName(CaseID,FileName:String):String; //±qÀɦW¨ú¥X¤å¥ó¦WºÙ |
| | | Function FileName2ScanPage(FileName:String):Integer; //±qÀɦW¨ú¥X±½ºË¶¼Æ |
| | | Function FileName2NoQuene_Filename(FileName:String):String; //¨ú¥X¨S¦³§Ç¸¹ªºÀɦW |
| | | Function FileName2Index(FileName:String):Integer; //±qÀɦW¨ú¥X¦bContextListªº§Ç¸¹ |
| | | Function FileName2NowDcoNo(FileName:String;CtList,DNList:TStrings):String; //±qÀɦW¨ú¥XÂkÄݪº¤å¥ó¥N¸¹ |
| | | Function FormCode2DocNo(FormCode:String):String; //FormCodeÂàDocno |
| | | Function FormCode2Version(FormCode:String):String; //FormCodeÂ઩¥» |
| | | Function FormCode2Page(FormCode:String):String; //FormCodeÂà¤å¥ó¶¼Æ |
| | | Function DocNo2DocName(CaseID,DocNo:String):String; //DocnoÂàDoc¦WºÙ |
| | | Function DocNo2FileName(DocNo:String;List:TStrings):String; //¥ÎDocNo§ä¥XÀɦW(²Ä¤@¶) |
| | | Function FormCode2WorkNo(FormCode:String):String; //¥ÎFormCode¨ú¥X§@·~§O |
| | | Function DocNo2WorkNo(DocNo:String):String; //¥ÎDocNo¨ú¥X§@·~§O |
| | | Function DocNo2DocNoDir(Path,DocNo:String):String; //DocNoÂনDocNo(¥÷¼Æ)¥Ø¿ý |
| | | Function DocNoDir2DocNo(DocNoDir:String):String; //DocNo(¥÷¼Æ)¥Ø¿ýÂনDocNo |
| | | Function DocNoDir2Index(Path,DocNoDir:String):Integer; //DocNo(¥÷¼Æ)¥Ø¿ýÂনindex |
| | | //*******轉換區********* |
| | | Function FindDivFormCode(FormCode:String):Boolean; //找有沒有分案的條碼 |
| | | Function FormCode2FormName(CaseID,FormCode:String):String; //用FormCode轉成文件名稱 |
| | | Function FormCode2FileName(FormCode:String;List:TStrings):String; //用FormCode找出檔名(第一頁) |
| | | Function FileName2FormCode(FileName:String):String; //從檔名取出FormCode |
| | | Function FileName2FormName(CaseID,FileName:String):String; //從檔名取出文件名稱 |
| | | Function FileName2ScanPage(FileName:String):Integer; //從檔名取出掃瞄頁數 |
| | | Function FileName2NoQuene_Filename(FileName:String):String; //取出沒有序號的檔名 |
| | | Function FileName2Index(FileName:String):Integer; //從檔名取出在ContextList的序號 |
| | | Function FileName2NowDcoNo(FileName:String;CtList,DNList:TStrings):String; //從檔名取出歸屬的文件代號 |
| | | Function FormCode2DocNo(FormCode:String):String; //FormCode轉Docno |
| | | Function FormCode2Version(FormCode:String):String; //FormCode轉版本 |
| | | Function FormCode2Page(FormCode:String):String; //FormCode轉文件頁數 |
| | | Function DocNo2DocName(CaseID,DocNo:String):String; //Docno轉Doc名稱 |
| | | Function DocNo2FileName(DocNo:String;List:TStrings):String; //用DocNo找出檔名(第一頁) |
| | | Function FormCode2WorkNo(FormCode:String):String; //用FormCode取出作業別 |
| | | Function DocNo2WorkNo(DocNo:String):String; //用DocNo取出作業別 |
| | | Function DocNo2DocNoDir(Path,DocNo:String):String; //DocNo轉成DocNo(份數)目錄 |
| | | Function DocNoDir2DocNo(DocNoDir:String):String; //DocNo(份數)目錄轉成DocNo |
| | | Function DocNoDir2Index(Path,DocNoDir:String):Integer; //DocNo(份數)目錄轉成index |
| | | |
| | | Function DocNoNeedDiv(DocNo:String):Boolean; //¬O§_¬O»Ý¤À¥÷¼Æªº¤å¥ó¥N¸¹ |
| | | Function DocNoNeedDiv(DocNo:String):Boolean; //是否是需分份數的文件代號 |
| | | //Function CaseNo2DocNo(CaseNo:String):TStringList; |
| | | |
| | | Function CaseNode2Info(Node:TTreeNode;Mode:Char):String; //®×¥óNode¨ú®×¥ó½s¸¹ Mode: I:Caseno;P:Page |
| | | Function DocNode2Info(Node:TTreeNode;Mode:Char):String; //¤å¥óNode¨ú¤å¥ó¥N¸¹ Mode: I:Docno;N:Docname;P:Page;G:Group |
| | | Function FormNode2Info(Node:TTreeNode;Mode:Char):String; //ªí³æNode¨úªí³æ¥N¸¹ Mode: I:FormID;N:FormName;P:Page |
| | | //*******Âà´«°Ï********* |
| | | Function CaseNode2Info(Node:TTreeNode;Mode:Char):String; //案件Node取案件編號 Mode: I:Caseno;P:Page |
| | | Function DocNode2Info(Node:TTreeNode;Mode:Char):String; //文件Node取文件代號 Mode: I:Docno;N:Docname;P:Page;G:Group |
| | | Function FormNode2Info(Node:TTreeNode;Mode:Char):String; //表單Node取表單代號 Mode: I:FormID;N:FormName;P:Page |
| | | //*******轉換區********* |
| | | |
| | | Procedure PriorPage(Page:Integer); //¤W¤@¶ |
| | | Procedure NextPage(Page:Integer); //¤U¤@¶ |
| | | Procedure PriorPage(Page:Integer); //上一頁 |
| | | Procedure NextPage(Page:Integer); //下一頁 |
| | | |
| | | Function DocNoExistsinTree(CaseNode:TTreeNode;DocNo:String):Boolean; //DocNo¬O§_¤v¦s¦b¾ð¸Ì |
| | | Function DocnoNeedGroup(DocNo:String):Boolean; //¶Ç¤JªºDocNo¬O§_»Ý¤À²Õ |
| | | Function DocNoExistsinTree(CaseNode:TTreeNode;DocNo:String):Boolean; //DocNo是否己存在樹裡 |
| | | Function DocnoNeedGroup(DocNo:String):Boolean; //傳入的DocNo是否需分組 |
| | | |
| | | function GetSiteOMR(FileName, Site: String;bt: Integer): Integer; |
| | | Function FindISB2View(Vmode:Integer):TImageScrollBox; //§äªÅªºISB¨ÓÅã¥Ü |
| | | Procedure R_W_ScanIni(Mode:Char); //'R'Ū¨ú;'W'¼g¤J |
| | | Procedure GetDefScanIni; //¨ú±o±½ºËªº¹w³]È |
| | | Function FindISB2View(Vmode:Integer):TImageScrollBox; //找空的ISB來顯示 |
| | | Procedure R_W_ScanIni(Mode:Char); //'R'讀取;'W'寫入 |
| | | Procedure GetDefScanIni; //取得掃瞄的預設值 |
| | | procedure DesableImage; |
| | | procedure EnableImage(v:integer;Sender : TObject); |
| | | Procedure ViewMouseMode(v:Integer); |
| | | Procedure GoViewMode; |
| | | Procedure DisplayMode(index,H_Count,W_Count:Integer;BasePanel:TPanel); |
| | | Function GetServerDate : Boolean; //¨ú¥D¾÷®É¶¡ |
| | | Function GetSetInf1 : Boolean; //¨ú¨t²Î³]©w¸ê°Tmode1 DOC_INF |
| | | Function GetSetInf2 : Boolean; //¨ú¨t²Î³]©w¸ê°Tmode2 DM_FORM_INF |
| | | Function GetSetInf3 : Boolean; //¨ú¨t²Î³]©w¸ê°Tmode3 FORM_INF |
| | | Function GetSetInf4 : Boolean; //¨ú¨t²Î³]©w¸ê°Tmode4 CHECK_RULE_INF |
| | | Function GetSetInf5 : Boolean; //¨ú¨t²Î³]©w¸ê°Tmode5 MEMO_INF |
| | | Function GetSetInf6 : Boolean; //¨ú¨t²Î³]©w¸ê°Tmode6 WORK_INF |
| | | Function GetSetInf7 : Boolean; //¨ú¨t²Î³]©w¸ê°Tmode7 LASTESTFORM_INF |
| | | Procedure SetFormID_DocNo; //±NFormID¤ÎDocno©â¥X¨Ó¥t¦s¤Jlist¸Ì |
| | | Procedure SetIn_WH_DocNo; //±Nn¤J®wªºDocNo©â¥X¨Ó¥t¦s¤Jlist¸Ì |
| | | Function GetServerDate : Boolean; //取主機時間 |
| | | Function GetSetInf1 : Boolean; //取系統設定資訊mode1 DOC_INF |
| | | Function GetSetInf2 : Boolean; //取系統設定資訊mode2 DM_FORM_INF |
| | | Function GetSetInf3 : Boolean; //取系統設定資訊mode3 FORM_INF |
| | | Function GetSetInf4 : Boolean; //取系統設定資訊mode4 CHECK_RULE_INF |
| | | Function GetSetInf5 : Boolean; //取系統設定資訊mode5 MEMO_INF |
| | | Function GetSetInf6 : Boolean; //取系統設定資訊mode6 WORK_INF |
| | | Function GetSetInf7 : Boolean; //取系統設定資訊mode7 LASTESTFORM_INF |
| | | Procedure SetFormID_DocNo; //將FormID及Docno抽出來另存入list裡 |
| | | Procedure SetIn_WH_DocNo; //將要入庫的DocNo抽出來另存入list裡 |
| | | |
| | | Procedure DataLoading(Loading,UseTimer:Boolean); //¸ê®Æ¸ü¤J¤¤n°±¤îÂI¿ïªº°Ê§@ |
| | | procedure ClearView(stkv:Integer); //²M°£ÂsÄýµ¡ªº¼v¹³ |
| | | Function DrawDocItem2(CaseNode : TTreenode;Caseno:String):Boolean; //µe¥X¤å¥ó¦WºÙªºTree |
| | | Procedure DataLoading(Loading,UseTimer:Boolean); //資料載入中要停止點選的動作 |
| | | procedure ClearView(stkv:Integer); //清除瀏覽窗的影像 |
| | | Function DrawDocItem2(CaseNode : TTreenode;Caseno:String):Boolean; //畫出文件名稱的Tree |
| | | |
| | | Procedure initkscan; //Àˬd±½´y¾¹ªº¥\¯à |
| | | procedure LoadImgFile; //¸ü¤J®×¥ó |
| | | procedure LoadImgFile1; //¸ü¤J®×¥ó |
| | | Procedure DistinctFormCode(CaseID:String); //®×¥ó¸ÌªºFormCode¨ú¥X²Ä¤@¶ |
| | | Function OMRCheckCase(CaseID:String):Boolean; //OMRÀ訅 |
| | | Procedure OMRErr2ini(CaseID,Reason,FileName,Site,RelaFileName,RelaSite,Anchor,Anchor1:String;Del,Ingnore,Display:Boolean); //OMRÀˮ֥¢±Ñ¼g¤Jini |
| | | Procedure OMRErrini2List(CaseID:String;ErrlistForm : TErrlistForm); //OMRÀˮ֥¢±Ñ±qini¼g¤JListView |
| | | Function DownLanguage:Boolean; //¤U¸ü¦h°ê»y¨¥ÀÉ |
| | | Procedure initkscan; //檢查掃描器的功能 |
| | | procedure LoadImgFile; //載入案件 |
| | | procedure LoadImgFile1; //載入案件 |
| | | Procedure DistinctFormCode(CaseID:String); //案件裡的FormCode取出第一頁 |
| | | Function OMRCheckCase(CaseID:String):Boolean; //OMR檢核 |
| | | Procedure OMRErr2ini(CaseID,Reason,FileName,Site,RelaFileName,RelaSite,Anchor,Anchor1:String;Del,Ingnore,Display:Boolean); //OMR檢核失敗寫入ini |
| | | Procedure OMRErrini2List(CaseID:String;ErrlistForm : TErrlistForm); //OMR檢核失敗從ini寫入ListView |
| | | Function DownLanguage:Boolean; //下載多國語言檔 |
| | | Function FindMpsView(Vmode:Integer):TImageScrollBox; |
| | | Function CaseAsk(CaseID:String):Integer; //¸ß°Ý¬O§_¥i¤W¶Ç (-1:¥¢±Ñ;0:¥i¥H;1:¤£¦æ;) |
| | | Function CaseComplete(Path,CaseID:String;MainCase:Boolean):Boolean; //³qª¾¶Ç°e§¹¦¨ |
| | | Function GetCaseFormID(Path:String):String; //¨ú®×¥óªºFormID |
| | | Procedure CreateFormID_FormName(Path,CaseID:String); //²£¥ÍFormID_FormName.dat |
| | | Procedure CreateDocNo_DocName(Path,CaseID:String); //²£¥ÍDocNo_DocName.dat |
| | | Procedure CreateIn_WH(CaseID:String); //²£¥ÍIn_WH.dat |
| | | Function CreateDocNo_Info(CaseID:String):String; //²£¥Í«OºÞ³U¤å¥ó DocNo[tab]¥÷¼Æ[tab]Á`¶¼Æ[tab]¬O§_²§°Ê[´«¦æ]DocNo[tab]¥÷¼Æ[tab]Á`¶¼Æ[tab]¬O§_²§°Ê |
| | | Function CreateCustDocNo_Info(CaseID:String):String; //²£¥Í¦Ûq¤å¥ó DocName[tab]¥÷¼Æ[tab]Á`¶¼Æ[tab]¬O§_²§°Ê[#13#10]DocName[tab]¥÷¼Æ[tab]Á`¶¼Æ[tab]¬O§_²§°Ê |
| | | Function CreateAttach_Info(CaseID:String):String; //²£¥Í¬O§_¦³Attach Y:¦³ N:¨S¦³ |
| | | Function CreateDocnoFrom_Info(CaseID:String):String; //²£¥Í³Q¤Þ¶iªº«OºÞ³U¤å¥ó¸ê°T Docno[tab]¥÷¼Æ[tab]®×¥ó½s¸¹#13#10Docno[tab]¥÷¼Æ[tab]®×¥ó½s¸¹ |
| | | Function CreateCustDocNoFrom_Info(CaseID:String):String; //²£¥Í³Q¤Þ¶iªº¦Û©w¤å¥ó¸ê°T Docno[tab]¥÷¼Æ[tab]®×¥ó½s¸¹#13#10Docno[tab]¥÷¼Æ[tab]®×¥ó½s¸¹ |
| | | Function CaseAsk(CaseID:String):Integer; //詢問是否可上傳 (-1:失敗;0:可以;1:不行;) |
| | | Function CaseComplete(Path,CaseID:String;MainCase:Boolean):Boolean; //通知傳送完成 |
| | | Function GetCaseFormID(Path:String):String; //取案件的FormID |
| | | Procedure CreateFormID_FormName(Path,CaseID:String); //產生FormID_FormName.dat |
| | | Procedure CreateDocNo_DocName(Path,CaseID:String); //產生DocNo_DocName.dat |
| | | Procedure CreateIn_WH(CaseID:String); //產生In_WH.dat |
| | | Function CreateDocNo_Info(CaseID:String):String; //產生保管袋文件 DocNo[tab]份數[tab]總頁數[tab]是否異動[換行]DocNo[tab]份數[tab]總頁數[tab]是否異動 |
| | | Function CreateCustDocNo_Info(CaseID:String):String; //產生自訂文件 DocName[tab]份數[tab]總頁數[tab]是否異動[#13#10]DocName[tab]份數[tab]總頁數[tab]是否異動 |
| | | //Function CreateCustDocNo_Info(path,CaseID:String):String; overload |
| | | Function CreateAttach_Info(CaseID:String):String; //產生是否有Attach Y:有 N:沒有 |
| | | Function CreateDocnoFrom_Info(CaseID:String):String; //產生被引進的保管袋文件資訊 Docno[tab]份數[tab]案件編號#13#10Docno[tab]份數[tab]案件編號 |
| | | Function CreateCustDocNoFrom_Info(CaseID:String):String; //產生被引進的自定文件資訊 Docno[tab]份數[tab]案件編號#13#10Docno[tab]份數[tab]案件編號 |
| | | |
| | | Function GetDocNoEdit(CaseID,DocNo,DocName:String):String; //¨ú¥XDocNo¬O§_³Q²§°Ê (Y/N) |
| | | Function GetDocNo_Count(Path,DocNo:String):Integer; //¨ú¥X¤å¥ó¥÷¼Æ |
| | | Function GetDocNo_Page(Path,DocNo:String):Integer; //¨ú¥X¤å¥óÁ`¶¼Æ |
| | | Function FormIDExists(FormCode:String;CheckDate:Boolean;index:Integer):Boolean; //ÀˬdFormID¬O§_¦s¦b¤Î¬O§_nÀˬd±Ò¥Î°±¥Î¤é´Á |
| | | Function Case_DocNoExists(CaseID,Docno:String):Boolean; //Docno¬O§_¦s¦b®×¥ó¸Ì |
| | | Procedure ReSortFileName_New(Path:String); //ÀɦW«·s±Æ§Ç |
| | | Procedure ReSortFileName(Path:String); //ÀɦW«·s±Æ§Ç |
| | | Procedure ReSortFileName2Scanlist(Path:String); //ÀɦW«·s±Æ§Çµ¹Scanlist.dat |
| | | Function GetOMRCheckSet:Boolean; //¤U¸üOMRÀË®ÖXMLÀÉ |
| | | Function GetKeyinSet : Boolean; //¨úµn¥´³]©w |
| | | Procedure CheckRule2OMRErrInfo; //ÀˮֳW«h¶ñ¤JOMRErrINFo Record |
| | | Function GetDocNoEdit(CaseID,DocNo,DocName:String):String; //取出DocNo是否被異動 (Y/N) |
| | | Function GetDocNo_Count(Path,DocNo:String):Integer; //取出文件份數 |
| | | Function GetDocNo_Page(Path,DocNo:String):Integer; //取出文件總頁數 |
| | | Function FormIDExists(FormCode:String;CheckDate:Boolean;index:Integer):Boolean; //檢查FormID是否存在及是否要檢查啟用停用日期 |
| | | Function Case_DocNoExists(CaseID,Docno:String):Boolean; //Docno是否存在案件裡 |
| | | Procedure ReSortFileName_New(Path:String); //檔名重新排序 |
| | | Procedure ReSortFileName(Path:String); //檔名重新排序 |
| | | Procedure ReSortFileName2Scanlist(Path:String); //檔名重新排序給Scanlist.dat |
| | | Function GetOMRCheckSet:Boolean; //下載OMR檢核XML檔 |
| | | Function GetKeyinSet : Boolean; //取登打設定 |
| | | Procedure CheckRule2OMRErrInfo; //檢核規則填入OMRErrINFo Record |
| | | Procedure ReNameContext(Path,OldName,NewName:String); |
| | | Procedure DeleteImageFile(Path,FileName,CaseID:String); // §R°£ÀÉ®× |
| | | Procedure DeleteFormCodeFile(CaseID,DocDir,FormID:String); //§R°£«ü©wFormID¤å¥ó |
| | | Function DeleteDocNoFile(Path,DocNo:String):Boolean; //§R°£«ü©wDocNo¤å¥ó |
| | | Procedure DeleteShowFile(Path:String); //§R°£Åã¥Ü¤¤ªº¼v¹³ |
| | | Function GetDataDocNoPage(MainDocNo,MainVersion:String):Integer; //¨ú°O¿ýªº¤å¥ó_ª©¥»¶¼Æ |
| | | Function CheckCaseDocNoPage(CaseID,DocNo,Version:String;Pages:Integer):Integer; //Àˬd®×¥ó¸Ìªº¤å¥ó_ª©¥»¶¼Æ |
| | | Function FindFormCodePages(CaseID,FormCode:String):Integer; //pºâ®×¥ó¸ÌFormIDªº¶¼Æ |
| | | Function GetDataFormCodePages(FormCode:String):Integer; //¨ú°O¿ýªºFormcIDªº¶¼Æ |
| | | Procedure CaseReSize(CaseID:String); //®×¥óªº¼v¹³ÁY©ñ |
| | | Procedure ImageReSize(CaseID,FileName:String); //¨Ì¤Q¦r©w¦ìÂI°µÁY©ñ |
| | | Procedure ImageReSize_tmp(FormID,FileName:String); //¨Ì¤Q¦r©w¦ìÂI°µÁY©ñ(¼È¦sÀÉ) |
| | | Function TransCaseID(Path,CaseID:String;MainCase:Boolean):Boolean; //¶Ç°e®×¥ó |
| | | Procedure DeleteImageFile(Path,FileName,CaseID:String); // 刪除檔案 |
| | | Procedure DeleteFormCodeFile(CaseID,DocDir,FormID:String); //刪除指定FormID文件 |
| | | Function DeleteDocNoFile(Path,DocNo:String):Boolean; //刪除指定DocNo文件 |
| | | Procedure DeleteShowFile(Path:String); //刪除顯示中的影像 |
| | | Function GetDataDocNoPage(MainDocNo,MainVersion:String):Integer; //取記錄的文件_版本頁數 |
| | | Function CheckCaseDocNoPage(CaseID,DocNo,Version:String;Pages:Integer):Integer; //檢查案件裡的文件_版本頁數 |
| | | Function FindFormCodePages(CaseID,FormCode:String):Integer; //計算案件裡FormID的頁數 |
| | | Function GetDataFormCodePages(FormCode:String):Integer; //取記錄的FormcID的頁數 |
| | | Procedure CaseReSize(CaseID:String); //案件的影像縮放 |
| | | Procedure ImageReSize_FormID(CaseID,FileName:String); //依十字定位點做縮放 |
| | | Procedure ImageReSize_tmp(FormID,FileName:String); //依十字定位點做縮放(暫存檔) |
| | | Function TransCaseID(Path,CaseID:String;MainCase:Boolean):Boolean; //傳送案件 |
| | | Procedure NewTreeNodeRefresh; |
| | | Procedure MyTreeNode1Refresh; |
| | | Procedure MyTreeNode2ReFresh(CaseID:String); |
| | | Procedure MyTreeNode3ReFresh(CaseID:String); |
| | | Function Node2DocNo(Node2:TTreeNode):String; //MyTreeNode2¨úDocNo¥X¨Ó |
| | | Function Node3DocNo(Node3:TTreeNode):String; //MyTreeNode3¨úDocNo¥X¨Ó |
| | | Function Node3FormID(Node3:TTreeNode):String; //MyTreeNode3¨úFormCode¥X¨Ó |
| | | Function GetNode2Name(Node2:TTreeNode):String; //¨úMyTreeNode2ªºÃѧO¦r¥X¨Ó(°O¤§«eÂI¿ï¥Î) |
| | | Function Node2DocNo(Node2:TTreeNode):String; //MyTreeNode2取DocNo出來 |
| | | Function Node3DocNo(Node3:TTreeNode):String; //MyTreeNode3取DocNo出來 |
| | | Function Node3FormID(Node3:TTreeNode):String; //MyTreeNode3取FormCode出來 |
| | | Function GetNode2Name(Node2:TTreeNode):String; //取MyTreeNode2的識別字出來(記之前點選用) |
| | | //Function Down_Replace_Img(SPAth,DPath,CaseID:String):Boolean; |
| | | Function Down_Img(Path,CaseID:String):Boolean; |
| | | Function GetNoNameCase(Path:string):String; //¨ú¥¼°t¸¹XXXX |
| | | Procedure CaseResort(Path:String); //®×¥óªºÀɮ׫·s±Æ§Ç(¦¸¤å¥ó¨ÌDocno¬D) |
| | | Procedure CaseResort2Scanlist(Path:String); //®×¥óªºÀɮ׫·s±Æ§Çµ¹scanlist(¦¸¤å¥ó¨ÌFormID±Æ) |
| | | Procedure DistinctDocinCase(Path:String); //¦C¥X®×¥ó¸ÌªºDocno_ª©¥» |
| | | Procedure DistinctDocNoinCase(Path:String); //¦C¥X®×¥ó¸ÌªºDocno |
| | | Procedure ClearErrini(CaseID:String;CaseNode:TTreeNode); //²M±¼ÀË®ÖÀÉ®× |
| | | Procedure SetCaseList(Mode:Char;Index:Integer;text:String); //'A:¥[¤J,I:´¡¤J,D:§R°£,E:×§ï' |
| | | Procedure SetDocNoList(Mode:Char;Index:Integer;CaseNo,DocDir,Copies:String); //'A:¥[¤J,I:´¡¤J,D:§R°£,E:×§ï' |
| | | Procedure SetContextList(Mode:Char;Index:Integer;CaseNo,DocDir,FileName:String); //'A:¥[¤J,I:´¡¤J,D:§R°£,E:×§ï' |
| | | Function checkCaseOMRDone:Boolean; //Àˬd®×¥ó¬O§_§¹¦¨OMRÀ訅 |
| | | Function CheckCaseID_OK:Boolean; //Àˬd¬O§_¦³¥¼°t¸¹ªº®×¥ó |
| | | Procedure CreateEmptyCase(Path,CaseID:String); //²£¥ÍªÅ¥Õ®×¸¹(«±½¥ó¥Î) |
| | | Procedure InitScrollRec; //ªì©l¤Æ¼v¹³Scroll°O¿ý |
| | | Procedure GetScrollData(ISB:TImageScrollBox;Var HS,VS:Integer;Var iRate:Single); //¨ú¼v¹³Scroll°O¿ý |
| | | Procedure SetScrollData(ISB:TImageScrollBox;HS,VS:Integer;iRate:Single); //¼g¼v¹³Scroll°O¿ý |
| | | Procedure FormIDReplace(CaseID,DocDir,OldFormID,NewFormID:String); //«ü©wFormID§ó´«¦¨·sªºFormID |
| | | Procedure ShowFileReplace(Path,NewFormID:String);//Åã¥Üªº¼v¹³´«¦¨·sªºFormID |
| | | Procedure PageReplaceFormID(Path,NowFormID,NewFormID:String); //¿ï¨ú¶§ó´«FormID |
| | | Function ModeNeedCheck(OMRMode,ScanMode:String):Boolean; //±½ºË¼Ò¦¡¬O§_n°µÀ訅 |
| | | Function GetNoNameCase(Path:string):String; //取未配號XXXX |
| | | Procedure CaseResort(Path:String); //案件的檔案重新排序(次文件依Docno挑) |
| | | Procedure CaseResort2Scanlist(Path:String); //案件的檔案重新排序給scanlist(次文件依FormID排) |
| | | Procedure DistinctDocinCase(Path:String); //列出案件裡的Docno_版本 |
| | | Procedure DistinctDocNoinCase(Path:String); //列出案件裡的Docno |
| | | Procedure ClearErrini(CaseID:String;CaseNode:TTreeNode); //清掉檢核檔案 |
| | | Procedure SetCaseList(Mode:Char;Index:Integer;text:String); //'A:加入,I:插入,D:刪除,E:修改' |
| | | Procedure SetDocNoList(Mode:Char;Index:Integer;CaseNo,DocDir,Copies:String); //'A:加入,I:插入,D:刪除,E:修改' |
| | | Procedure SetContextList(Mode:Char;Index:Integer;CaseNo,DocDir,FileName:String); //'A:加入,I:插入,D:刪除,E:修改' |
| | | Function checkCaseOMRDone:Boolean; //檢查案件是否完成OMR檢核 |
| | | Function CheckCaseID_OK:Boolean; //檢查是否有未配號的案件 |
| | | Procedure CreateEmptyCase(Path,CaseID:String); //產生空白案號(重掃件用) |
| | | Procedure InitScrollRec; //初始化影像Scroll記錄 |
| | | Procedure GetScrollData(ISB:TImageScrollBox;Var HS,VS:Integer;Var iRate:Single); //取影像Scroll記錄 |
| | | Procedure SetScrollData(ISB:TImageScrollBox;HS,VS:Integer;iRate:Single); //寫影像Scroll記錄 |
| | | Procedure FormIDReplace(CaseID,DocDir,OldFormID,NewFormID:String); //指定FormID更換成新的FormID |
| | | Procedure ShowFileReplace(Path,NewFormID:String);//顯示的影像換成新的FormID |
| | | Procedure PageReplaceFormID(Path,NowFormID,NewFormID:String); //選取頁更換FormID |
| | | Function ModeNeedCheck(OMRMode,ScanMode:String):Boolean; //掃瞄模式是否要做檢核 |
| | | procedure WMMOUSEWHEEL(var message: TWMMouseWheel); message WM_MOUSEWHEEL; |
| | | Function GetInputMask:String; //¨ú±o¿é¤Jªº«O³æ¸¹½X |
| | | Function GetInputMask:String; //取得輸入的保單號碼 |
| | | Function GetCasePage(Path,CaseID:String):Integer; |
| | | Function GetFormIDPage(FileList:TStringlist;FormID:String):Integer; |
| | | Procedure SetFile2Case(CaseID,FileName:String); |
| | | Procedure WriteResize(ImgName,TxtName:String); //²£¥ÍResize.dat |
| | | Function GetCase_PageCount(var CaseCount,PageCount:Integer):Boolean; //¨ú¥X®×¥óªº¼Æ¶q¤Î¶¼Æ ID¬°ªÅȮɬ°¨ú©Ò¦³ªº |
| | | Function BarCode2FormID : String; //Barcode¨Ì³W«hÂনFormID |
| | | Function BarCode2CaseID : String; //Barcode¨Ì³W«hÂনCaseID |
| | | Procedure WriteResize(ImgName,TxtName:String); //產生Resize.dat |
| | | Function GetCase_PageCount(var CaseCount,PageCount:Integer):Boolean; //取出案件的數量及頁數 ID為空值時為取所有的 |
| | | Function BarCode2FormID : String; //Barcode依規則轉成FormID |
| | | Function BarCode2CaseID : String; //Barcode依規則轉成CaseID |
| | | Procedure WriteCaseIndex(Path:String); |
| | | Procedure ReadCaseIndex(Path:String); |
| | | Procedure ClearCaseIndex; |
| | | Procedure GetSelectImageFile; |
| | | Function GetDocNoDir(Path,DocNo:String):String; //¨ú¥X¥Ø«eDocNoªº¥÷¼Æ |
| | | Function CheckFormIDExists(DocNoNode:TTreeNode;FormID:String):Boolean; //ÀˬdFormID¬O§_¦s¦b¤å¥ó¸Ì |
| | | Function GetDocNoDir(Path,DocNo:String):String; //取出目前DocNo的份數 |
| | | Function CheckFormIDExists(DocNoNode:TTreeNode;FormID:String):Boolean; //檢查FormID是否存在文件裡 |
| | | |
| | | Procedure ZipMainFile(SoPath,DePath,ZipName:String); //À£ÁY¼v¹³ÀÉ |
| | | Procedure ZipMaskFile(SoPath,MarkPath,DePath,ZipName:String); //À£ÁY¾B¸n¼v¹³ÀÉ |
| | | Procedure ParserPoint(S:String); //¸ÑªR¤Q¦rÂIªº¦r¦ê |
| | | Procedure ZipMainFile(SoPath,DePath,ZipName:String); //壓縮影像檔 |
| | | Procedure ZipMaskFile(SoPath,MarkPath,DePath,ZipName:String); //壓縮遮罩影像檔 |
| | | Procedure ParserPoint(S:String); //解析十字點的字串 |
| | | Function CheckScanDenialTime:Boolean; |
| | | Function FormID2Anchor(FormID:String):String; //¥ÎFormID¨ú¥X¤Q¦r¼Ò¦¡ |
| | | Function Index2Anchor(Anchor:String):String; //¤Q¦r¼Ò¦¡ 0->NONE;1->ANCHOR;2->FRAME |
| | | Function MemoInfoTransfer(Mode,Str:String;ID_S,Name_S:TStringlist):String; //µù°O¥N½Xµù°OÃþ§OÂà´« Mode 'ID':¥N½XÂà¦WºÙ;'NAME':¦WºÙÂà¥N½X |
| | | Function GetFormatID(CaseID:String):String; //¨ú¥X®×¥óªºFormatID |
| | | Function FindNoSaveBarCode : Boolean; //§ä¬O§_¦³¤£nÀx¦s¼v¹³ªº±ø½X |
| | | Function CheckAvailable:Boolean; //Àˬd¬O§_¥i¨Ï¥Î¤¸¥ó |
| | | Function Case2Mask(SoPath,DePath:String):Boolean;//²£¥Í¾B¸n¼v¹³ |
| | | Function CheckNeedCrop(Graphic:TDibGraphic):Boolean; //¬O§_¬OA3n¤Á¼v¹³ |
| | | Function GetNewCustomDocNo(Path,DocName:String):String; //¨ú¥X¥¼¨Ï¥Îªº¦Ûq¤å¥ó¥N¸¹ |
| | | Function GetCustomDocName(Path,DocNo:String):String; //¨ú¥X¦Û©w¤å¥ó¦WºÙ |
| | | Function GetCustomFormID(Path,DocNo:String):String; //¨ú¥X¦Û©w¤å¥óFormID |
| | | Function GetCustomDocDir(Path,DocName:String):String; //¨ú¥X¦Û©w¤å¥óDocDir |
| | | Function FindCustomDocName(Path,DocName:String):Boolean; //´M§ä¦Û©w¤å¥ó¦WºÙ¬O§_¦s¦b |
| | | Procedure DeleteCustomDocDir(Path,DocNo:String); //§R°£¦Û©w¤å¥óDocNo |
| | | Function CheckFormID_Prt(FormID:String):Boolean; //¶Ç¤JªºFormID¬O§_¹w³]¦C¦L |
| | | Function FormID2Anchor(FormID:String):String; //用FormID取出十字模式 |
| | | Function Index2Anchor(Anchor:String):String; //十字模式 0->NONE;1->ANCHOR;2->FRAME |
| | | Function MemoInfoTransfer(Mode,Str:String;ID_S,Name_S:TStringlist):String; //註記代碼註記類別轉換 Mode 'ID':代碼轉名稱;'NAME':名稱轉代碼 |
| | | Function GetFormatID(CaseID:String):String; //取出案件的FormatID |
| | | Function FindNoSaveBarCode : Boolean; //找是否有不要儲存影像的條碼 |
| | | Function CheckAvailable:Boolean; //檢查是否可使用元件 |
| | | Function Case2Mask(SoPath,DePath:String):Boolean;//產生遮罩影像 |
| | | Function CheckNeedCrop(Graphic:TDibGraphic):Boolean; //是否是A3要切影像 |
| | | Function GetNewCustomDocNo(Path,DocName:String):String; //取出未使用的自訂文件代號 |
| | | Function GetCustomDocName(Path,DocNo:String):String; //取出自定文件名稱 |
| | | Function GetCustomFormID(Path,DocNo:String):String; //取出自定文件FormID |
| | | Function GetCustomDocDir(Path,DocName:String):String; //取出自定文件DocDir |
| | | Function FindCustomDocName(Path,DocName:String):Boolean; //尋找自定文件名稱是否存在 |
| | | Procedure DeleteCustomDocDir(Path,DocNo:String); //刪除自定文件DocNo |
| | | Function CheckFormID_Prt(FormID:String):Boolean; //傳入的FormID是否預設列印 |
| | | procedure PrintImg(FileName, LoginID, Datetime,Path: WideString); |
| | | Function FindLastestDocDir(CaseID,DocNo:String):String; //§ä¥X³Ì·sªºDocDir |
| | | Procedure Create_Cust_DocDir(CaseID:String); //²£¥Í¥~±¶Ç¤Jªº¤å¥ó¥N¸¹¤Î¦Û©w¤å¥ó |
| | | Procedure OldCasetoNewCase(CaseID:String); //±N®ץ÷¼ÆÂন·s³W«h |
| | | Procedure ErrFormtoCurrentForm(CaseID,EFormID,CFormID:String);//±N®תº¿ù»~FormID§ï¥¿½TªºFormID |
| | | Procedure SetRecordEditedDocDir(Mode:Char;CaseID,DocDir:String); //°O¿ý³Q²§°Êªº¤å¥ó¥Ø¿ý 'A:¥[¤JD:§R±¼' |
| | | Function GetDocDir_Page(CaseID,DocDir:String):Integer; //¨ú±oDocDirªº¶¼Æ |
| | | Function FindLastestDocDir(CaseID,DocNo:String):String; //找出最新的DocDir |
| | | Procedure Create_Cust_DocDir(CaseID:String); //產生外面傳入的文件代號及自定文件 |
| | | Procedure OldCasetoNewCase(CaseID:String); //將舊案份數轉成新規則 |
| | | Procedure ErrFormtoCurrentForm(CaseID,EFormID,CFormID:String);//將舊案的錯誤FormID改正確的FormID |
| | | Procedure SetRecordEditedDocDir(Mode:Char;CaseID,DocDir:String); //記錄被異動的文件目錄 'A:加入D:刪掉' |
| | | Function GetDocDir_Page(CaseID,DocDir:String):Integer; //取得DocDir的頁數 |
| | | Function Path2DocDir(Path,CaseID:String):String; |
| | | Function GetDocNo_IS_WH(DocNo:String):Boolean; //DocNo¬O§_¬°¤J®w¤å¥ó |
| | | Procedure SortDocDir_FormID(CaseID,DocDir:String); //±NDocDir¸Ìªº¤å¥ó½s¸¹±Æ§Ç |
| | | Function GetDocNo_IS_WH(DocNo:String):Boolean; //DocNo是否為入庫文件 |
| | | Procedure SortDocDir_FormID(CaseID,DocDir:String); //將DocDir裡的文件編號排序 |
| | | Procedure GotoAttach(OldLevel:Integer); |
| | | Function DocNoIs_In_WH(DocNo:String):Boolean; //DocNo¬O§_¬°¤J®w¤å¥ó |
| | | Procedure CreateCaseNeedData(Path:String); //¥ý°µ¼v¹³ºI¨ú·|¤Ö¤GÓ¤å¦rÀÉ,²£¥ÍCaseDocNo.dat¤ÎDocDir.dat |
| | | Function DocNoIs_In_WH(DocNo:String):Boolean; //DocNo是否為入庫文件 |
| | | Procedure CreateCaseNeedData(Path:String); //先做影像截取會少二個文字檔,產生CaseDocNo.dat及DocDir.dat |
| | | Procedure SetDocDirtoSelected(CaseNode:TTreeNode;DocDir:String); |
| | | Function CheckSelectImg_UseCase(Path,CaseID:String):Boolean; //Àˬd¿ï¾Üªº¼v¹³¬O§_¦³¥]§t³Q¤Þ¥Îªº¼v¹³ |
| | | Function TransOldCaseFile(Path:String):Boolean; //¤W¶Ç¤Þ¥ÎÂ¥󪺰O¿ýÀÉ |
| | | Function CheckSelectImg_UseCase(Path,CaseID:String):Boolean; //檢查選擇的影像是否有包含被引用的影像 |
| | | Function TransOldCaseFile(Path:String):Boolean; //上傳引用舊件的記錄檔 |
| | | Function Writelog(CaseID:String):Boolean; |
| | | Function FormIDAppear(FormID:String):Boolean; //FormID¬O§_¥i¥X²{ |
| | | Function DocNoAppear(DocNo:String):Boolean; //DocNo¬O§_¥i¥X²{ |
| | | Function GetDocNoCount(CaseID,DocNo:String):Integer; //¨úDocNo¼Æ¶q |
| | | Function GetDocDirCopies(CaseID,DocDir:String):Integer; //¨úDocDir¥÷¼Æ |
| | | Procedure SetDocDirCopies(CaseID,DocDir:String;NewCopies:Integer); //×§ïDocDir¥÷¼Æ |
| | | Function GetDocDirCopies_Rec(Path,CaseID,DocDir:String):Integer; //¨ú°O¿ý¸ÌªºDocDir¥÷¼Æ |
| | | Function GetCustomNameCount(CustomName:String):Integer; //¨ú¥~¶Çªº¦WºÙ¼Æ¶q |
| | | Function GetCustomDocNoCount(Docno:String):Integer; //¨ú¥~¶ÇªºDocNo¼Æ¶q |
| | | Function FormIDAppear(FormID:String):Boolean; //FormID是否可出現 |
| | | Function DocNoAppear(DocNo:String):Boolean; //DocNo是否可出現 |
| | | Function GetDocNoCount(CaseID,DocNo:String):Integer; //取DocNo數量 |
| | | Function GetDocDirCopies(CaseID,DocDir:String):Integer; //取DocDir份數 |
| | | Procedure SetDocDirCopies(CaseID,DocDir:String;NewCopies:Integer); //修改DocDir份數 |
| | | Function GetDocDirCopies_Rec(Path,CaseID,DocDir:String):Integer; //取記錄裡的DocDir份數 |
| | | Function GetCustomNameCount(CustomName:String):Integer; //取外傳的名稱數量 |
| | | Function GetCustomDocNoCount(Docno:String):Integer; //取外傳的DocNo數量 |
| | | Function ISGuideFormID(FormID:String):Boolean; |
| | | Function CaseDelete_Enable(CaseID:String):Boolean; //®×¥ó¥i§_³Q§R°£ |
| | | Function CaseDelete_Enable(CaseID:String):Boolean; //案件可否被刪除 |
| | | |
| | | Procedure MoveImage(Path:String;mp:Integer); //²¾°Ê¶¼Æ |
| | | Procedure MoveImage_Drag(Path:String;fp,tp:Integer); //©ì©Ô²¾°Ê¶¼Æ |
| | | Procedure MoveImage(Path:String;mp:Integer); //移動頁數 |
| | | Procedure MoveImage_Drag(Path:String;fp,tp:Integer); //拖拉移動頁數 |
| | | |
| | | |
| | | Procedure SetUseCase(Mode:Char;Path,DocDir,FormCaseID,ToCaseID:String); //°O¿ý¤Þ¥Î¨ä¥L®×¥ó A:¥[¤J D:§R±¼ |
| | | Function GetUseCase(Mode:Char;Path,DocDir:String):String; //F:¨ú³Q¤Þ¥Î To:¤Þ¥Î |
| | | Procedure SetUseCase(Mode:Char;Path,DocDir,FormCaseID,ToCaseID:String); //記錄引用其他案件 A:加入 D:刪掉 |
| | | Function GetUseCase(Mode:Char;Path,DocDir:String):String; //F:取被引用 To:引用 |
| | | |
| | | Procedure Case2upload(CaseID:String); |
| | | Procedure Download2Case(SoDir,DeDir:String); |
| | | |
| | | procedure view_image_FormCode(Path,FormCode:String;stpage,stview:integer); //¥ÎFormCode¨Ó§ä¼v¹³ |
| | | procedure view_image_DocNo(Path,DocNo,FormID:String;Pages:integer); //¥ÎDocNo¨Ó§ä¼v¹³ |
| | | procedure view_image_FormCode(Path,FormCode:String;stpage,stview:integer); //用FormCode來找影像 |
| | | procedure view_image_DocNo(Path,DocNo,FormID:String;Pages:integer); //用DocNo來找影像 |
| | | |
| | | Function ShapeName2PreViewISBName(SP:TShape):String; //Âà¥X«ü©wPreViewISBName |
| | | Function ShapeName2PreViewISBName(SP:TShape):String; //轉出指定PreViewISBName |
| | | Procedure CreatePreViewISB(Count:Integer); |
| | | Procedure FreePreViewISB; |
| | | Procedure FitPreViewISB; |
| | | Procedure PaintShape(FromImg,ToImg:TImageScrollBox); //µe¦³³Q¿ï¨úªº¼v¹³ |
| | | Procedure PaintShape(FromImg,ToImg:TImageScrollBox); //畫有被選取的影像 |
| | | Procedure FreeShapeobj(SelectISB : TImageScrollBox); |
| | | Procedure ISBClick(Sender : TObject); |
| | | Procedure ISBMouseMove(Sender: TObject; Shift: TShiftState; |
| | |
| | | |
| | | procedure BtnMouseEnter(Sender: TObject); |
| | | |
| | | procedure PageEnd; //±½´y±µ¦¬§¹¦¨ |
| | | Procedure PageDone; //±½´y§¹¦¨«áÅã¥Ü¼v¹³ |
| | | procedure PageEnd; //掃描接收完成 |
| | | Procedure PageDone; //掃描完成後顯示影像 |
| | | procedure StatrTwainScan; |
| | | procedure OnAcquire( const DibHandle : THandle; |
| | | const XDpi : Word; |
| | |
| | | procedure MouseLeaveEvent(Sender: TObject); |
| | | procedure PaintEvent(Sender: TObject); |
| | | function GetCurrentVersionNo: String; |
| | | procedure initParameter; |
| | | procedure LastInitFormidListCreate(path:string); |
| | | function checkFormCodeIsCustom(path,formcode:string):boolean; |
| | | function ISDivPageFormID(FormID: String): Boolean; |
| | | function GetSampleInf: Boolean; |
| | | protected |
| | | { Protected declarations } |
| | | procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage); override; |
| | |
| | | procedure Set_is_oldcase(const Value: WideString); safecall; |
| | | function Get_custdocyn: WideString; safecall; |
| | | procedure Set_custdocyn(const Value: WideString); safecall; |
| | | function Get_casenolength: WideString; safecall; |
| | | function Get_filesizelimit: WideString; safecall; |
| | | function Get_imgdpi: WideString; safecall; |
| | | function Get_scancolor: WideString; safecall; |
| | | procedure Set_casenolength(const Value: WideString); safecall; |
| | | procedure Set_filesizelimit(const Value: WideString); safecall; |
| | | procedure Set_imgdpi(const Value: WideString); safecall; |
| | | procedure Set_scancolor(const Value: WideString); safecall; |
| | | function Get_imgdelete: WideString; safecall; |
| | | procedure Set_imgdelete(const Value: WideString); safecall; |
| | | function Get_check_main_form: WideString; safecall; |
| | | function Get_isExternal: WideString; safecall; |
| | | procedure Set_check_main_form(const Value: WideString); safecall; |
| | | procedure Set_isExternal(const Value: WideString); safecall; |
| | | public |
| | | { Public declarations } |
| | | procedure Initialize; override; |
| | |
| | | |
| | | { TCB_IMGPSScanX } |
| | | |
| | | function TCB_IMGPSScanX.GetCurrentVersionNo: String; //Àò¨ú¦Û¨ª©¥»¸¹©Ò»Ýn |
| | | function TCB_IMGPSScanX.GetCurrentVersionNo: String; //獲取自身版本號所需要 |
| | | var |
| | | dLength,dSize:DWORD; |
| | | pcBuf,pcValue:PChar; |
| | |
| | | M_Content,M_ID,M_Name : String; |
| | | S : TStringlist; |
| | | begin |
| | | ShowText := _Msg('³Æµù¿é¤J¤¤,½ÐµyÔ'); |
| | | ShowText := _Msg('備註輸入中,請稍候'); |
| | | DataLoading(True,True); |
| | | SortMemoForm := TSortMemoForm.Create(Self); |
| | | S := TStringlist.Create; |
| | | try |
| | | InitialLanguage(SortMemoForm); //¸ü¤J¦h°ê»y¨¥ |
| | | InitialLanguage(SortMemoForm); //載入多國語言 |
| | | |
| | | SortMemoForm.ContentList := TStringlist.Create; //µù°O¤º®e |
| | | SortMemoForm.MemoIDList := TStringlist.Create; //µù°O¥N¸¹ |
| | | SortMemoForm.MemoNameList := TStringlist.Create; //µù°O¦WºÙ |
| | | SortMemoForm.ContentList := TStringlist.Create; //註記內容 |
| | | SortMemoForm.MemoIDList := TStringlist.Create; //註記代號 |
| | | SortMemoForm.MemoNameList := TStringlist.Create; //註記名稱 |
| | | |
| | | for i := 1 to MEMO_INF_List.Count - 1 do |
| | | begin |
| | |
| | | M_ID := GetSQLData(MEMO_INF_List,'T1.MEMO_TYPE',i); |
| | | M_Name := GetSQLData(MEMO_INF_List,'T2.MEMO_TYPE_NAME',i); |
| | | SortMemoForm.ComboBox1.Items.Add(M_Name+'-->'+M_Content); |
| | | SortMemoForm.ContentList.Add(M_Content); //µù°O¤º®e |
| | | SortMemoForm.MemoIDList.Add(M_ID); //µù°O¥N¸¹ |
| | | SortMemoForm.MemoNameList.Add(M_Name); //µù°O¦WºÙ |
| | | SortMemoForm.ContentList.Add(M_Content); //註記內容 |
| | | SortMemoForm.MemoIDList.Add(M_ID); //註記代號 |
| | | SortMemoForm.MemoNameList.Add(M_Name); //註記名稱 |
| | | end; |
| | | if FileExists(DisplayPath+'Scan_Memo.dat') then |
| | | begin |
| | |
| | | end; |
| | | S.SaveToFile(DisplayPath+'Scan_Memo.dat'); |
| | | end; |
| | | SortMemoForm.ContentList.Free; //µù°O¤º®e |
| | | SortMemoForm.MemoIDList.Free; //µù°O¥N¸¹ |
| | | SortMemoForm.MemoNameList.Free; //µù°O¦WºÙ |
| | | SortMemoForm.ContentList.Free; //註記內容 |
| | | SortMemoForm.MemoIDList.Free; //註記代號 |
| | | SortMemoForm.MemoNameList.Free; //註記名稱 |
| | | finally |
| | | SortMemoForm.Free; |
| | | S.Free; |
| | |
| | | OnMouseLeave := MouseLeaveEvent; |
| | | OnPaint := PaintEvent; |
| | | MpsKey := 'fbim'; |
| | | Seg := 3; //ÂsÄýµ¡ªºÃä¬É |
| | | Seg := 3; //瀏覽窗的邊界 |
| | | Ext := '.tif'; |
| | | SafePixel := 20; |
| | | CaseIDLength := 16; //®×¥ó½s¸¹ªø«× 16½X |
| | | FormIDLength := 15; //FormIDªø«× 15½X |
| | | DocNoLength := 8; //DocNoªø«× 8½X (1~8) |
| | | Bt :=4; //¥hª½½u®É¾î½u§PÂ_ªº®e§ÔÈ |
| | | CropBarcode := 'CC';//n¤Á¼v¹³ªº±ø½X |
| | | CaseIDLength := 16; //案件編號長度 16碼 20170222 在用網頁參數來取代 |
| | | FormIDLength := 15; //FormID長度 15碼 20170222 發現是用來辨識條碼用的 |
| | | ///DocNoLength := 8; //DocNo長度 8碼 (1~8) //20170222 發現沒用到就註解吧 |
| | | Bt :=4; //去直線時橫線判斷的容忍值 |
| | | CropBarcode := 'CC';//要切影像的條碼 |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.ISB1Click(Sender: TObject); |
| | |
| | | SelectISB.Redraw(True); |
| | | FitPreViewISB; |
| | | ISBClick(SelectISB); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | end; |
| | | end; |
| | | |
| | |
| | | |
| | | procedure TCB_IMGPSScanX.DestroyEvent(Sender: TObject); |
| | | begin |
| | | //********²M³æ°Ï******** |
| | | Doc_Inf_List.Free; //Doc_Inf ²M³æ Docno + ª©¥»¬°key |
| | | DM_FORM_INF_List.Free; //DM_FORM_INF ²M³æ Docno + ª©¥»¬°key |
| | | FORM_INF_List.Free; //FORM_INFªº²M³æ |
| | | CHECK_RULE_INF_List.Free; //CHECK_RULE_INF ²M³æ |
| | | MEMO_INF_List.Free; //MEMO_INF ²M³æ |
| | | WORK_INF_List.Free; //WORK_INF ²M³æ |
| | | LASTEST_FORM_INF_List.Free; // LASTEST_FORM_INF ²M³æ |
| | | FindResult.Free ; //§äSQLDataªºµ²ªG |
| | | OMRFileList.Free; //nOMRÀˮ֪º¤å¥ó(¥uÀˬd¨CºØFormªº²Ä¤@¶) |
| | | FormCode_PageSize.Free; //¤å¥óªº¹w³]¤j¤p FormCode_Height_Width |
| | | DocNo_NeedDoc.Free; //¦³Docno®Én¬Û¨Ìªº¤å¥ó DocNo_¬Û¨Ì¤å¥ó_¬Û¨Ì¤å¥ó |
| | | DocNo_NoDoc.Free; //¦³Docno®É¤¬¥¸ªº¤å¥ó DocNo_¤¬¥¸¤å¥ó_¤¬¥¸¤å¥ó |
| | | DocNo_VerinCase.Free; //®×¥ó¸ÌªºDocNo+ª©¥»ªº²M³æ |
| | | CaseDocNoList.Free; //®×¥ó¸ÌªºDocNo²M³æ |
| | | CaseDocNo_CopiesList.Free; //®×¥ó¸ÌªºDocNo¥÷¼Æ²M³æ |
| | | CaseList.Free; //°O¿ý±½ºË®×¥óªº¶¶§Ç |
| | | NoSaveBarCodeList.Free; //¤£Àx¦sªº±ø½X²M³æ |
| | | FormID_List.Free; //FormID²M³æ |
| | | DocNo_List.Free; //DocNo²M³æ |
| | | Context_DocnoList.Free; //®×¥ó¸ÌªºÀÉ®×Docno²M³æ |
| | | ContextList.Free; //®×¥ó¸ÌªºÀɮײM³æ |
| | | NowShowFileList.Free; //¥Ø«eÅã¥Üªº¼v¹³²M³æ |
| | | NowSelectFileList.Free; //¥Ø«e³QÂI¿ïªº¼v¹³²M³æ |
| | | Cust_DocNoList.Free; //¦Û¦æ©w¸q¤å¥ó¦WºÙ |
| | | IN_WH_DocNoList.Free; //¤J®wªº¤å¥ó²M³æ |
| | | GuideFormIDList.Free; //n·í¾É¤Þ¶ªí³æ²M³æ |
| | | //********²M³æ°Ï******** |
| | | //********清單區******** |
| | | Doc_Inf_List.Free; //Doc_Inf 清單 Docno + 版本為key |
| | | DM_FORM_INF_List.Free; //DM_FORM_INF 清單 Docno + 版本為key |
| | | FORM_INF_List.Free; //FORM_INF的清單 |
| | | CHECK_RULE_INF_List.Free; //CHECK_RULE_INF 清單 |
| | | MEMO_INF_List.Free; //MEMO_INF 清單 |
| | | WORK_INF_List.Free; //WORK_INF 清單 |
| | | LASTEST_FORM_INF_List.Free; // LASTEST_FORM_INF 清單 |
| | | FindResult.Free ; //找SQLData的結果 |
| | | OMRFileList.Free; //要OMR檢核的文件(只檢查每種Form的第一頁) |
| | | FormCode_PageSize.Free; //文件的預設大小 FormCode_Height_Width |
| | | DocNo_NeedDoc.Free; //有Docno時要相依的文件 DocNo_相依文件_相依文件 |
| | | DocNo_NoDoc.Free; //有Docno時互斥的文件 DocNo_互斥文件_互斥文件 |
| | | DocNo_VerinCase.Free; //案件裡的DocNo+版本的清單 |
| | | CaseDocNoList.Free; //案件裡的DocNo清單 |
| | | CaseDocNo_CopiesList.Free; //案件裡的DocNo份數清單 |
| | | CaseList.Free; //記錄掃瞄案件的順序 |
| | | NoSaveBarCodeList.Free; //不儲存的條碼清單 |
| | | FormID_List.Free; //FormID清單 |
| | | DocNo_List.Free; //DocNo清單 |
| | | Context_DocnoList.Free; //案件裡的檔案Docno清單 |
| | | ContextList.Free; //案件裡的檔案清單 |
| | | NowShowFileList.Free; //目前顯示的影像清單 |
| | | NowSelectFileList.Free; //目前被點選的影像清單 |
| | | Cust_DocNoList.Free; //自行定義文件名稱 |
| | | IN_WH_DocNoList.Free; //入庫的文件清單 |
| | | GuideFormIDList.Free; //要當導引頁表單清單 |
| | | DivPageFormIDList.Free; //要當分案頁表單清單 |
| | | LastInitFormidList.Free; |
| | | LastAddFormidList.Free; |
| | | SampleFormIDList.Free; |
| | | //********清單區******** |
| | | if FEvents <> nil then FEvents.OnDestroy; |
| | | end; |
| | | |
| | |
| | | FromIndex := PageLv.ItemIndex; |
| | | if FromIndex = 0 then |
| | | begin |
| | | Showmessage(_Msg('¤£¯à±q²Ä1¶¤À®×')); |
| | | Showmessage(_Msg('不能從第1頁分案')); |
| | | Exit; |
| | | end; |
| | | |
| | | If MessageDlg(Format(_Msg('¬O§_½T©w±q%d¶¤À¥X·s®×'),[PageLV.ItemIndex+1]),Mtconfirmation,[mbyes,mbcancel],0) = mrcancel Then Exit; |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | If MessageDlg(Format(_Msg('是否確定從%d頁分出新案'),[PageLV.ItemIndex+1]),Mtconfirmation,[mbyes,mbcancel],0) = mrcancel Then Exit; |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | CaseID := GetNoNameCase(ImageSavePath); |
| | | NewPath := ImageSavePath + CaseID+'\'; |
| | | Str2Dir(NewPath); |
| | |
| | | ContextList.SaveToFile(DisplayPath+'Context.dat'); |
| | | end; |
| | | SetCaseList('I',MyTreeNode1.IndexOf(MyTreeNode2)+1,CaseID); |
| | | if FileExists(DisplayPath+'CaseIndex.dat') then //§âì¸g¿ì¥N¸¹¨ú¥X¨Ó¦A¼g¤J·s¥ó¸Ì |
| | | if FileExists(DisplayPath+'CaseIndex.dat') then //把原經辦代號取出來再寫入新件裡 |
| | | begin |
| | | S.LoadFromFile(DisplayPath+'CaseIndex.dat'); |
| | | end; |
| | |
| | | S.Free; |
| | | end; |
| | | LoadImgFile; |
| | | Showmessage(_Msg('¤À®×§¹¦¨')); |
| | | Showmessage(_Msg('分案完成')); |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.PM402Click(Sender: TObject); |
| | |
| | | PreNode2Name := ''; |
| | | if TreeView1.Selected.Parent = MyTreeNode1 then |
| | | PreNode2Name:= GetNode2Name(MyTreeNode2); |
| | | ShowText := _Msg('¤å¥óÂkÃþ¤¤,½ÐµyÔ'); |
| | | ShowText := _Msg('文件歸類中,請稍候'); |
| | | DataLoading(True,True); |
| | | DocListForm := TDocListForm.Create(self); |
| | | try |
| | | InitialLanguage(PatchDlg); //¸ü¤J¦h°ê»y¨¥ |
| | | InitialLanguage(PatchDlg); //載入多國語言 |
| | | for i := 1 to FORM_INF_List.Count - 1 do |
| | | begin |
| | | FormID := GetSQLData(FORM_INF_List,'T1.FORM_ID',i); |
| | |
| | | PageReplaceFormID(DisplayPath,NowFormCode,FormID); |
| | | end; |
| | | //DrawDocItem(MytreeNode1,FORM_INF_List,NowCaseno); |
| | | //DrawDocItem1(MytreeNode1,Doc_Inf_List,NowCaseno); //201408280§ï |
| | | //DrawDocItem1(MytreeNode1,Doc_Inf_List,NowCaseno); //201408280改 |
| | | DrawDocItem2(MytreeNode1,NowCaseno); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | //Showmessage(_Msg('ÂkÃþ§¹¦¨')); //20101103 Usern¨D®³±¼ |
| | | if PreNode2Name <> '' then // ¦^¨ì쥻ÂI¿ïªº¤å¥ó¸`ÂI¤W |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | //Showmessage(_Msg('歸類完成')); //20101103 User要求拿掉 |
| | | if PreNode2Name <> '' then // 回到原本點選的文件節點上 |
| | | begin |
| | | for i := 0 to MyTreeNode1.Count - 1 do |
| | | begin |
| | |
| | | PreNode2Name := ''; |
| | | if TreeView1.Selected.Parent = MyTreeNode1 then |
| | | PreNode2Name:= GetNode2Name(MyTreeNode2); |
| | | ShowText := _Msg('¤å¥óÂkÃþ¤¤,½ÐµyÔ'); |
| | | ShowText := _Msg('文件歸類中,請稍候'); |
| | | DataLoading(True,True); |
| | | GoAtt := False; |
| | | if (MytreeNode2 <> nil) and (Pos('Attach',MyTreeNode2.Text)>0) then |
| | |
| | | end; |
| | | DocListForm := TDocListForm.Create(self); |
| | | try |
| | | InitialLanguage(DocListForm); //¸ü¤J¦h°ê»y¨¥ |
| | | //InitialLanguage(PatchDlg); //¸ü¤J¦h°ê»y¨¥ |
| | | InitialLanguage(DocListForm); //載入多國語言 |
| | | //InitialLanguage(PatchDlg); //載入多國語言 |
| | | for i := 1 to FORM_INF_List.Count - 1 do |
| | | begin |
| | | FormID := GetSQLData(FORM_INF_List,'T1.FORM_ID',i); |
| | |
| | | DocDir := FindLastestDocDir(NowCaseno,DocNo); |
| | | |
| | | |
| | | if DocNoNeedDiv(DocNo) then //n¤À¥÷¼Æ |
| | | if DocNoNeedDiv(DocNo) then //要分份數 |
| | | begin |
| | | if ((FormCode2Page(FormID) = '01') and (GetDocDir_Page(NowCaseno,DocDir)>0)) or (DocDir = '') then |
| | | DocDir := DocNo2DocNoDir(ImageSavePath + NowCaseno+'\',DocNo); |
| | | end |
| | | Else //¤£¤À¥÷¼Æ |
| | | Else //不分份數 |
| | | begin |
| | | if DocNo <> '' then |
| | | DocDir := DocNo |
| | | else //Attach ªþ¥ó |
| | | else //Attach 附件 |
| | | DocDir := DocNo2DocNoDir(ImageSavePath + NowCaseno+'\',DocNo); |
| | | end; |
| | | if (not DirectoryExists(ImageSavePath + NowCaseno+'\'+DocDir+'\')) and (DocDir <> AttName) then |
| | |
| | | end; |
| | | ReSortFileName(ExtractFilePath(iISB.FileName)); |
| | | DrawDocItem2(MytreeNode1,NowCaseno); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | |
| | | if GoAtt then |
| | | begin |
| | |
| | | GoAtt := True; |
| | | end; |
| | | |
| | | if InputQuery('¿é¤J¨ä¥L¤å¥ó¦WºÙ','¤å¥ó¦WºÙ',CustomDocName) then |
| | | if InputQuery('輸入其他文件名稱','文件名稱',CustomDocName) then |
| | | begin |
| | | if FindCustomDocName(DisplayPath,CustomDocName) then |
| | | begin |
| | | Showmessage(Format('¤å¥ó¦WºÙ:"%s"¤v¦s¦b',[CustomDocName])); |
| | | Showmessage(Format('文件名稱:"%s"己存在',[CustomDocName])); |
| | | Exit; |
| | | end; |
| | | CustomDocNo := GetNewCustomDocNo(DisplayPath,CustomDocName); |
| | |
| | | end; |
| | | ReSortFileName(ExtractFilePath(iISB.FileName)); |
| | | DrawDocItem2(MytreeNode1,NowCaseno); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | |
| | | if GoAtt then |
| | | begin |
| | |
| | | iISBName,OldName : String; |
| | | iISB : TImageScrollBox; |
| | | begin |
| | | if MessageDlg('¬O§_½T©w§R°£??',mtconfirmation,[mbyes,mbcancel],0) = mrcancel then Exit; |
| | | if MessageDlg('是否確定刪除??',mtconfirmation,[mbyes,mbcancel],0) = mrcancel then Exit; |
| | | |
| | | for i := 0 to ComponentCount -1 do |
| | | begin |
| | |
| | | end; |
| | | ReSortFileName(ExtractFilePath(iISB.FileName)); |
| | | DrawDocItem2(MytreeNode1,NowCaseno); |
| | | MyTreeNode1.Text := Format('%s-%d'+_Msg('¶'),[NowCaseno,GetCasePage(ImageSavePath,NowCaseNo)]); |
| | | MyTreeNode1.Text := Format('%s-%d'+_Msg('頁'),[NowCaseno,GetCasePage(ImageSavePath,NowCaseNo)]); |
| | | NewTreeNodeRefresh; |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | TreeView1click(self); |
| | | end; |
| | | |
| | |
| | | var |
| | | mp:string; |
| | | begin |
| | | mp := InputBox('²¾°Ê¶¼Æ','½Ð¿é¤J²¾¤J¶½X',''); |
| | | mp := InputBox('移動頁數','請輸入移入頁碼',''); |
| | | if (mp <> '') then |
| | | begin |
| | | MoveImage(DisplayPath+NowDocDir+'\',strtoint(mp)); |
| | |
| | | begin |
| | | IF not InitialOk Then |
| | | begin |
| | | Showmessage(_msg('¸ê°T©|¥¼¤U¸ü§¹¦¨,½ÐµyԩΫ·s¶i¤J')); |
| | | Showmessage(_msg('資訊尚未下載完成,請稍候或重新進入')); |
| | | Exit; |
| | | end; |
| | | if (FMode = 'RSCAN') or (FMode = 'ESCAN') then |
| | | if (FMode = 'RSCAN') or (FMode = 'ESCAN') or (FMode = 'DSCAN') then |
| | | begin |
| | | if NewTreeNode.Count > 0 then |
| | | begin |
| | |
| | | TreeView1click(nil); |
| | | FirstDocDir := ''; |
| | | NowGuideFormID := ''; |
| | | NowDivPageFormID :=''; |
| | | AddScanBtnclick(nil); |
| | | end; |
| | | end |
| | |
| | | ScanPath := ''; |
| | | ScanCaseno := ''; |
| | | NowGuideFormID := ''; |
| | | NowDivPageFormID :=''; |
| | | ClearView(1); |
| | | ContextList.Clear; |
| | | Try |
| | |
| | | begin |
| | | IF not InitialOk Then |
| | | begin |
| | | Showmessage(_msg('¸ê°T©|¥¼¤U¸ü§¹¦¨,½ÐµyԩΫ·s¶i¤J')); |
| | | Showmessage(_msg('資訊尚未下載完成,請稍候或重新進入')); |
| | | Exit; |
| | | end; |
| | | ShowText := _Msg('±½ºË°Ñ¼Æ³]©w¤¤,½ÐµyÔ'); |
| | | ShowText := _Msg('掃瞄參數設定中,請稍候'); |
| | | DataLoading(True,True); |
| | | |
| | | PatchDlg := TPatchDlg.Create(self); |
| | | try |
| | | InitialLanguage(PatchDlg); //¸ü¤J¦h°ê»y¨¥ |
| | | InitialLanguage(PatchDlg); //載入多國語言 |
| | | PatchDlg.BlankuseCB.Checked := DeviceDelete; |
| | | if PatchDlg.BlankuseCB.Checked then |
| | | PatchDlg.SpinEdit5.Enabled := True |
| | |
| | | P,v,v1,v2,ln,i : Integer; |
| | | iDocDir,iDocNo : String; |
| | | begin |
| | | if TreeView1.Selected = NewTreeNode then //¥þ§R //·s±½´y¥ó |
| | | if TreeView1.Selected = NewTreeNode then //全刪 //新掃描件 |
| | | begin |
| | | If Messagedlg(_Msg('¬O§_§R°£©Ò¦³®×¥ó?'),mtconfirmation,[mbyes,mbcancel],0) = mrcancel then Exit; |
| | | If Messagedlg(_Msg('是否刪除所有案件?'),mtconfirmation,[mbyes,mbcancel],0) = mrcancel then Exit; |
| | | clearView(1); |
| | | Application.ProcessMessages; |
| | | _DelTree(ImageSavePath); |
| | |
| | | CreateEmptyCase(ImageSavePath,FCaseID); |
| | | end; |
| | | LoadImgFile; |
| | | Showmessage(_Msg('§R°£§¹¦¨')); |
| | | Showmessage(_Msg('刪除完成')); |
| | | end |
| | | Else if TreeView1.Selected = MyTreeNode1 then //®×¥ó½s¸¹ |
| | | Else if TreeView1.Selected = MyTreeNode1 then //案件編號 |
| | | begin |
| | | If Messagedlg(Format(_Msg('½s¸¹(%s)¬O§_§R°£?'),[NowCaseno]),mtconfirmation,[mbyes,mbcancel],0) = mrcancel then Exit; |
| | | If Messagedlg(Format(_Msg('編號(%s)是否刪除?'),[NowCaseno]),mtconfirmation,[mbyes,mbcancel],0) = mrcancel then Exit; |
| | | clearView(1); |
| | | Application.ProcessMessages; |
| | | if (FMode = 'ESCAN') then |
| | |
| | | _DelTree(ImageSavePath+NowCaseno+'\'+iDocDir); |
| | | SetUseCase('D',ImageSavePath+NowCaseno+'\',iDocDir,'',''); |
| | | SetDocNoList('D',-1,NowCaseNo,iDocDir,''); |
| | | if (Copy(iDocNo,1,5)='ZZZZZ') then //20140703 §R°£¦Û©w¤å¥ó®Én§RiniÀÉ¸ê®Æ |
| | | if (Copy(iDocNo,1,5)='ZZZZZ') then //20140703 刪除自定文件時要刪ini檔資料 |
| | | DeleteCustomDocDir(ImageSavePath+NowCaseno+'\',iDocDir); |
| | | |
| | | end |
| | |
| | | _DelTree(DisplayPath); |
| | | SetCaseList('D',NewTreeNode.IndexOf(MyTreeNode1),''); |
| | | end; |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | |
| | | if (FMode = 'ESCAN') then |
| | | begin |
| | |
| | | end; |
| | | LoadImgFile; |
| | | end |
| | | Else if TreeView1.Selected = MyTreeNode2 then //¤å¥ó¼h |
| | | Else if TreeView1.Selected = MyTreeNode2 then //文件層 |
| | | begin |
| | | If Messagedlg(Format(_Msg('¤å¥ó(%s)¬O§_§R°£?'),[DocNo2DocName(NowCaseno,NowDocNo)]),mtconfirmation,[mbyes,mbcancel],0) = mrcancel then Exit; |
| | | If Messagedlg(Format(_Msg('文件(%s)是否刪除?'),[DocNo2DocName(NowCaseno,NowDocNo)]),mtconfirmation,[mbyes,mbcancel],0) = mrcancel then Exit; |
| | | ClearView(1); |
| | | Application.ProcessMessages; |
| | | _DelTree(ImageSavePath+NowCaseno+'\'+NowDocDir); |
| | | SetUseCase('D',ImageSavePath+NowCaseno+'\',NowDocDir,'',''); |
| | | SetDocNoList('D',-1,NowCaseNo,NowDocDir,''); |
| | | if (Copy(NowDocNo,1,5)='ZZZZZ') then //20140703 §R°£¦Û©w¤å¥ó®Én§RiniÀÉ¸ê®Æ |
| | | if (Copy(NowDocNo,1,5)='ZZZZZ') then //20140703 刪除自定文件時要刪ini檔資料 |
| | | DeleteCustomDocDir(ImageSavePath+NowCaseno+'\',NowDocDir); |
| | | |
| | | DrawDocItem2(MytreeNode1,NowCaseno); |
| | | MytreeNode1.Text := Format(_Msg('%s-%d¶'),[NowCaseno,GetCasePage(ImageSavePath,NowCaseNo)]); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | MytreeNode1.Text := Format(_Msg('%s-%d頁'),[NowCaseno,GetCasePage(ImageSavePath,NowCaseNo)]); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | NewTreeNodeRefresh; |
| | | |
| | | {if (FMode <>'ESCAN') and (ContextList.Count = NowShowFileList.Count) then |
| | | begin |
| | | if Messagedlg(_Msg('§R°£«á±NµL¼v¹³,®×¥ó±N§R°£,¬O§_½T©w?'),mtconfirmation,[mbyes,mbcancel],0) = mrcancel then Exit; |
| | | if Messagedlg(_Msg('刪除後將無影像,案件將刪除,是否確定?'),mtconfirmation,[mbyes,mbcancel],0) = mrcancel then Exit; |
| | | _DelTree(DisplayPath); |
| | | SetCaseList('D',NewTreeNode.IndexOf(MyTreeNode1),''); |
| | | if (FMode = 'ESCAN') then |
| | |
| | | DeleteShowFile(DisplayPath); |
| | | DrawDocItem1(MytreeNode1,Doc_Inf_List,NowCaseno); |
| | | P := ContextList.Count; |
| | | MytreeNode1.Text := Format(_Msg('%s-%d¶'),[NowCaseno,p]); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | MytreeNode1.Text := Format(_Msg('%s-%d頁'),[NowCaseno,p]); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | NewTreeNodeRefresh; |
| | | end; |
| | | Showmessage(_Msg('§R°£§¹¦¨')); } |
| | | Showmessage(_Msg('刪除完成')); } |
| | | |
| | | //Showmessage(_Msg('§R°£§¹¦¨')); //20101102 Usern¨D®³±¼ |
| | | //Showmessage(_Msg('刪除完成')); //20101102 User要求拿掉 |
| | | end |
| | | Else if TreeView1.Selected = MyTreeNode3 then //FormID¼h |
| | | Else if TreeView1.Selected = MyTreeNode3 then //FormID層 |
| | | begin |
| | | If Messagedlg(Format(_Msg('¤å¥ó(%s)¬O§_§R°£?'),[NowFormName]),mtconfirmation,[mbyes,mbcancel],0) = mrcancel then Exit; |
| | | If Messagedlg(Format(_Msg('文件(%s)是否刪除?'),[NowFormName]),mtconfirmation,[mbyes,mbcancel],0) = mrcancel then Exit; |
| | | DeleteFormCodeFile(NowCaseNo,NowDocDir,NowFormCode); |
| | | SetRecordEditedDocDir('A',NowCaseNo,NowDocDir); |
| | | DrawDocItem2(MytreeNode1,NowCaseno); |
| | | MytreeNode1.Text := Format(_Msg('%s-%d¶'),[NowCaseno,GetCasePage(ImageSavePath,NowCaseNo)]); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | MytreeNode1.Text := Format(_Msg('%s-%d頁'),[NowCaseno,GetCasePage(ImageSavePath,NowCaseNo)]); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | NewTreeNodeRefresh; |
| | | |
| | | {if (FMode <>'ESCAN') and (ContextList.Count = NowShowFileList.Count) then |
| | | begin |
| | | if Messagedlg(_Msg('§R°£«á±NµL¼v¹³,®×¥ó±N§R°£,¬O§_½T©w?'),mtconfirmation,[mbyes,mbcancel],0) = mrcancel then Exit; |
| | | if Messagedlg(_Msg('刪除後將無影像,案件將刪除,是否確定?'),mtconfirmation,[mbyes,mbcancel],0) = mrcancel then Exit; |
| | | _DelTree(DisplayPath); |
| | | SetCaseList('D',NewTreeNode.IndexOf(MyTreeNode1),''); |
| | | if (FMode = 'ESCAN') then |
| | |
| | | DeleteShowFile(DisplayPath); |
| | | DrawDocItem1(MytreeNode1,Doc_Inf_List,NowCaseno); |
| | | P := ContextList.Count; |
| | | MytreeNode1.Text := Format(_Msg('%s-%d¶'),[NowCaseno,p]); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | MytreeNode1.Text := Format(_Msg('%s-%d頁'),[NowCaseno,p]); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | NewTreeNodeRefresh; |
| | | end; |
| | | Showmessage(_Msg('§R°£§¹¦¨')); |
| | | //Showmessage(_Msg('§R°£§¹¦¨')); //20101102 Usern¨D®³±¼ } |
| | | Showmessage(_Msg('刪除完成')); |
| | | //Showmessage(_Msg('刪除完成')); //20101102 User要求拿掉 } |
| | | end; |
| | | end; |
| | | |
| | |
| | | GoViewMode; |
| | | ISB1.ZoomMode := zmFitWidth; |
| | | |
| | | NewCaseID := InputBox(_Msg('×§ï®×¥ó½s¸¹'),_Msg('·s®×¥ó½s¸¹'),''); |
| | | NewCaseID := InputBox(_Msg('修改案件編號'),_Msg('新案件編號'),''); |
| | | ShowNewCaseID := NewCaseID; |
| | | ShowNowCaseID := NowCaseno; |
| | | |
| | |
| | | |
| | | IF Length(NewCaseID)<>CaseIDLength Then |
| | | begin |
| | | Showmessage(_Msg('¿é¤J®æ¦¡¿ù»~')); |
| | | Showmessage(_Msg('輸入格式錯誤')); |
| | | Exit; |
| | | end; |
| | | |
| | | if DirectoryExists(ImageSavePath+NewCaseID) then |
| | | begin |
| | | Showmessage(NewCaseID+_Msg('¤v¦s¦b,µLªk×§ï')); |
| | | Showmessage(NewCaseID+_Msg('己存在,無法修改')); |
| | | Exit; |
| | | end; |
| | | |
| | | if Messagedlg(Format(_Msg('¬O§_±N%s§ï¬°%s'),[ShowNowCaseID,ShowNewCaseID]),Mtconfirmation,[mbyes,mbcancel],0) = mrcancel then |
| | | if Messagedlg(Format(_Msg('是否將%s改為%s'),[ShowNowCaseID,ShowNewCaseID]),Mtconfirmation,[mbyes,mbcancel],0) = mrcancel then |
| | | Exit; |
| | | ClearView(1); |
| | | RenameFile(ImageSavePath+NowCaseno,ImageSavePath+NewCaseID); |
| | | SetCaseList('E',NewTreeNode.IndexOf(MyTreeNode1),NewCaseID); |
| | | |
| | | //P := ContextList.Count; |
| | | MytreeNode1.Text := Format(_Msg('%s-%d¶'),[NewCaseID,GetCasePage(ImageSavePath,NewCaseID)]); |
| | | MytreeNode1.Text := Format(_Msg('%s-%d頁'),[NewCaseID,GetCasePage(ImageSavePath,NewCaseID)]); |
| | | //DrawDocItem(MyTreeNode1,FORM_INF_List,NewCaseID); |
| | | DrawDocItem2(MytreeNode1,NewCaseID); |
| | | Showmessage(_Msg('×§ï§¹¦¨')); |
| | | Showmessage(_Msg('修改完成')); |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.PM103Click(Sender: TObject); |
| | | begin |
| | | if TreeView1.Selected = nil then Exit; |
| | | |
| | | {if Treeview1.Selected = NewTreeNode then |
| | | begin |
| | | ShowMessage('AAAAA'); |
| | | end; |
| | | if Treeview1.Selected = MyTreeNode1 then |
| | | begin |
| | | ShowMessage('BBBBB'); |
| | | end; |
| | | |
| | | if Treeview1.Selected = MyTreeNode2 then |
| | | begin |
| | | ShowMessage('CCCCC'); |
| | | end; |
| | | |
| | | if Treeview1.Selected = MyTreeNode3 then |
| | | begin |
| | | ShowMessage('DDDDD'); |
| | | end; |
| | | } |
| | | if (Treeview1.Selected = NewTreeNode) {or (Treeview1.Selected = MyTreeNode1)} then |
| | | begin |
| | | //ShowMessage('NewScanBtnClick'); |
| | | NewScanBtnClick(self) |
| | | end |
| | | Else |
| | | begin |
| | | //ShowMessage('AddScanBtnclick'); |
| | | AddScanBtnclick(self); |
| | | end; |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.PM104Click(Sender: TObject); |
| | |
| | | DocDir :String; |
| | | SavePath,SaveFilename:String; |
| | | ISB : TImageScrollBox; |
| | | FileRec:TSearchrec; |
| | | begin |
| | | OpenDialog1.Filter := 'Image files|*.TIF;*.JPG'; |
| | | if OpenDialog1.Execute then |
| | | begin |
| | | ISB := TImageScrollBox.Create(self); |
| | | try |
| | | ShowText :=_Msg('ÀÉ®×¥[¤J¤¤,½ÐµyÔ'); |
| | | ShowText :=_Msg('檔案加入中,請稍候'); |
| | | DataLoading(True,True); |
| | | if TreeView1.Selected = nil then Exit; |
| | | FName := OpenDialog1.FileName; |
| | | |
| | | FindFirst(FName,faAnyfile,FileRec); |
| | | //ShowMessage(IntToStr(FILEREC.Size)+','+IntToStr(FFileSizeLimit)); |
| | | if FFileSizeLimit=0 then |
| | | begin |
| | | FFileSizeLimit:=5*1024; |
| | | end; |
| | | if FILEREC.Size > FFileSizeLimit*1024 then //檢查檔案大小 |
| | | begin |
| | | ShowMessage(Format('%.3f',[FILEREC.Size / 1024])+' KB, file size over limit.'); |
| | | FindClose(FILEREC); |
| | | DataLoading(false,false); |
| | | exit; |
| | | end; |
| | | |
| | | FindClose(FILEREC); |
| | | CaseID := NowCaseno ; |
| | | imageCount := 0; |
| | | P := ISB.ImageCountFromFile(OpenDialog1.FileName); |
| | | for I := 1 to P do |
| | | begin |
| | | ShowText :=_Msg('ÀÉ®×¥[¤J¤¤,½ÐµyÔ('+inttostr(i)+'/'+inttostr(P)+')'); |
| | | ShowText :=_Msg('檔案加入中,請稍候('+inttostr(i)+'/'+inttostr(P)+')'); |
| | | DataLoading(True,True); |
| | | ISB.LoadFromFile(FName,i); |
| | | //ISB.SaveToFile('C:\OCX\aaaaaa'+IntToStr(i)+'.tif'); |
| | | DeskewImg(ISB.Graphic); |
| | | //ISB.SaveToFile('C:\OCX\bbbbbb'+IntToStr(i)+'.tif'); |
| | | if (TreeView1.Selected = NewTreeNode) or (TreeView1.Selected = MyTreeNode1) then |
| | | begin |
| | | SaveFilename := ''; |
| | | MpsGetBarcode(ISB.Graphic,MpsBarcodeinf); |
| | | for n := 1 to MpsBarcodeinf.Count-1 do |
| | | for n := 1 to MpsBarcodeinf.Count do |
| | | begin |
| | | if MpsBarcodeinf.r180[n] <> 0 then //¨Ì±ø½X¨¤«×Âà¼v¹³ |
| | | if MpsBarcodeinf.r180[n] <> 0 then //依條碼角度轉影像 |
| | | begin |
| | | Rotate(ISB.Graphic,MpsBarcodeinf.r180[n]); |
| | | MpsGetBarcode(ISB.Graphic,MpsBarcodeinf); |
| | | Break; |
| | | end; |
| | | end; |
| | | FormID := BarCode2FormID; //¨ú¥XFormID |
| | | FormID := BarCode2FormID; //取出FormID |
| | | SaveFilename := FormID; |
| | | if (TreeView1.Selected = NewTreeNode) Then |
| | | begin |
| | | if FindDivFormCode(FormID) Then //¥u§ä¤À®×¶¤Wªº®×¥ó±ø½X |
| | | if FindDivFormCode(FormID) Then //只找分案頁上的案件條碼 |
| | | begin |
| | | imageCount := 0; |
| | | ClearView(1); |
| | |
| | | |
| | | DocNo := FormCode2DocNo(FormID); |
| | | DocDir := FindLastestDocDir(CaseID,DocNo); |
| | | if DocNoNeedDiv(DocNo) then //n¤À¥÷¼Æ |
| | | if DocNoNeedDiv(DocNo) then //要分份數 |
| | | begin |
| | | if ((FormCode2Page(FormID) = '01') and (GetDocDir_Page(CaseID,DocDir)>0)) or (DocDir = '') then |
| | | DocDir := DocNo2DocNoDir(ImageSavePath + CaseID+'\',DocNo); |
| | | end |
| | | Else //¤£¤À¥÷¼Æ |
| | | Else //不分份數 |
| | | begin |
| | | if DocNo <> '' then |
| | | DocDir := DocNo |
| | | else //Attach ªþ¥ó |
| | | else //Attach 附件 |
| | | DocDir := DocNo2DocNoDir(ImageSavePath + CaseID+'\',DocNo); |
| | | end; |
| | | {if ((FormCode2Page(FormID) = '01') and DocNoNeedDiv(DocNo)) or (FormID='') then //¬Oªí³æ²Ä¤@¶¥Bn¤À¥÷ |
| | | {if ((FormCode2Page(FormID) = '01') and DocNoNeedDiv(DocNo)) or (FormID='') then //是表單第一頁且要分份 |
| | | DocDir := DocNo2DocNoDir(ImageSavePath + CaseID+'\',DocNo) |
| | | Else if not DocNoNeedDiv(DocNo) then |
| | | DocDir := DocNo; } |
| | |
| | | if FileExists(SavePath+'Context.dat') then |
| | | ContextList.LoadFromFile(SavePath+'Context.dat'); |
| | | |
| | | WriteCaseIndex(ImageSavePath + CaseID+'\'); //¼g¤J®×¥ó¯Á¤Þ |
| | | if SaveFilename = '' then //ªþ¥ó |
| | | WriteCaseIndex(ImageSavePath + CaseID+'\'); //寫入案件索引 |
| | | if SaveFilename = '' then //附件 |
| | | SaveFilename:= Add_Zoo(ContextList.Count+1,3)+ext |
| | | Else |
| | | SaveFilename := Add_Zoo(ContextList.Count+1,3)+'_'+SaveFilename+ext; |
| | | |
| | | for n := 1 to MpsBarcodeinf.Count do |
| | | begin |
| | | if MpsBarcodeinf.r180[n] <> 0 then //依條碼角度轉影像 |
| | | begin |
| | | Rotate(ISB.Graphic,MpsBarcodeinf.r180[n]); |
| | | MpsGetBarcode(ISB.Graphic,MpsBarcodeinf); |
| | | Break; |
| | | end; |
| | | end; |
| | | //Rotate(ISB.Graphic,MpsBarcodeinf.r180[n]); //20170705 加入有條碼就轉正 |
| | | ISB.SaveToFile(SavePath+SaveFilename); |
| | | |
| | | SetContextList('A',-1,CaseID,DocDir,SaveFilename); |
| | |
| | | SaveFilename := Add_Zoo(ContextList.Count+1,3)+'_'+NowFormCode+ext |
| | | else |
| | | SaveFilename := Add_Zoo(ContextList.Count+1,3)+ext; |
| | | |
| | | for n := 1 to MpsBarcodeinf.Count do |
| | | begin |
| | | if MpsBarcodeinf.r180[n] <> 0 then //依條碼角度轉影像 |
| | | begin |
| | | Rotate(ISB.Graphic,MpsBarcodeinf.r180[n]); |
| | | MpsGetBarcode(ISB.Graphic,MpsBarcodeinf); |
| | | Break; |
| | | end; |
| | | end; |
| | | //Rotate(ISB.Graphic,MpsBarcodeinf.r180[n]); //20170705 加入有條碼就轉正 |
| | | ISB.SaveToFile(SavePath+SaveFilename); |
| | | ContextList.Add(SaveFilename); |
| | | ContextList.SaveToFile(SavePath+'Context.dat'); |
| | | end; |
| | | end; |
| | | ClearErrini(CaseID,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | ClearErrini(CaseID,MyTreeNode1); //清掉檢核記錄 |
| | | if (TreeView1.Selected = MyTreeNode1) or (TreeView1.Selected = NewTreeNode) then |
| | | begin |
| | | LoadImgFile; |
| | | end |
| | | Else |
| | | begin |
| | | DrawDocItem2(MytreeNode1,CaseID); //ªø¥X¤å¥ó¦WºÙªº¾ð¨Ã¶Ç¦^¬O§_¦³¥Ó½Ð®Ñªº¼v¹³ |
| | | DrawDocItem2(MytreeNode1,CaseID); //長出文件名稱的樹並傳回是否有申請書的影像 |
| | | page := GetCasePage(ImageSavePath,CaseID); |
| | | MytreeNode1.Text := Format(_Msg('%s-%d¶'),[CaseID,page]); |
| | | MytreeNode1.Text := Format(_Msg('%s-%d頁'),[CaseID,page]); |
| | | end; |
| | | NewTreeNodeRefresh; |
| | | Application.ProcessMessages; |
| | |
| | | CopyFormID,Copy2Caseno,CopyFileName : String; |
| | | S : TStringlist; |
| | | begin |
| | | ShowText := _Msg('½Æ»s¤å¥ó¤¤,½ÐµyÔ'); |
| | | ShowText := _Msg('複製文件中,請稍候'); |
| | | DataLoading(True,True); |
| | | DocCopyForm := TDocCopyForm.Create(Self); |
| | | S := TStringlist.Create; |
| | | try |
| | | InitialLanguage(DocCopyForm); //¸ü¤J¦h°ê»y¨¥ |
| | | InitialLanguage(DocCopyForm); //載入多國語言 |
| | | DocCopyForm.CopyFromGB.Caption := NowCaseno+DocCopyForm.CopyFromGB.Caption; |
| | | IF NewTreenode.Count = 1 Then |
| | | begin |
| | | Showmessage(_Msg('¨S¦³¨ä¥L¥i½Æ»sªº¤å¥ó')); |
| | | Showmessage(_Msg('沒有其他可複製的文件')); |
| | | Exit; |
| | | end; |
| | | For i := 0 to MyTreeNode1.Count -1 do |
| | |
| | | |
| | | if DocCopyForm.ShowModal = mrok then |
| | | begin |
| | | If MessageDlg(_Msg('¬O§_½T©wn±N¤Ä¿ïªº¤å¥ó½Æ»s¨ì¤Ä¿ïªº½s¸¹¸Ì?'),MtConfirmation,[Mbyes,mbcancel],0) = mrCancel Then |
| | | If MessageDlg(_Msg('是否確定要將勾選的文件複製到勾選的編號裡?'),MtConfirmation,[Mbyes,mbcancel],0) = mrCancel Then |
| | | Exit; |
| | | ShowText := _Msg('½Æ»s¤¤,½ÐµyÔ'); |
| | | ShowText := _Msg('複製中,請稍候'); |
| | | DataLoading(True,True); |
| | | For i := 0 to DocCopyForm.CheckListBox2.Count -1 do |
| | | begin |
| | |
| | | begin |
| | | S.Clear; |
| | | Copy2Caseno := DocCopyForm.CheckListBox2.Items.Strings[i]; |
| | | ClearErrini(Copy2Caseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | ClearErrini(Copy2Caseno,MyTreeNode1); //清掉檢核記錄 |
| | | S.LoadFromFile(ImageSavePath + Copy2Caseno +'\Context.dat'); |
| | | For n := 0 to DocCopyForm.CheckListBox1.Count -1 do //¤å¥ó |
| | | For n := 0 to DocCopyForm.CheckListBox1.Count -1 do //文件 |
| | | begin |
| | | If DocCopyForm.CheckListBox1.Checked[n] Then |
| | | begin |
| | |
| | | For x := 0 to ContextList.Count -1 do |
| | | begin |
| | | //Showmessage(CopyFormCode); |
| | | //IF CopyFormID <> '' then //¦³¤å¥ó¥N¸¹ |
| | | //IF CopyFormID <> '' then //有文件代號 |
| | | // begin |
| | | if FileName2FormCode(ContextList.Strings[x])=CopyFormID then |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | DataLoading(False,False); |
| | | Showmessage(_Msg('½Æ»s§¹¦¨!!')); |
| | | Showmessage(_Msg('複製完成!!')); |
| | | LoadImgFile; |
| | | end; |
| | | finally |
| | |
| | | begin |
| | | DocListForm := TDocListForm.Create(self); |
| | | try |
| | | InitialLanguage(PatchDlg); //¸ü¤J¦h°ê»y¨¥ |
| | | InitialLanguage(PatchDlg); //載入多國語言 |
| | | for i := 1 to FORM_INF_List.Count - 1 do |
| | | begin |
| | | NewFormID := GetSQLData(FORM_INF_List,'T1.FORM_ID',i); |
| | |
| | | NewFormID := DocListForm.DocLV.Selected.Caption; |
| | | if NowFormCode <> AttName then |
| | | begin |
| | | If Messagedlg(Format(_Msg('¬O§_±N"%s"ªº©Ò¦³¼v¹³ÂkÃþ¦¨"%s"'),[FormCode2FormName(NowCaseNo,NowFormCode),FormCode2FormName(NowCaseNo,NewFormID)]),MtConfirmation,[mbyes,mbcancel],0) = mrcancel Then |
| | | If Messagedlg(Format(_Msg('是否將"%s"的所有影像歸類成"%s"'),[FormCode2FormName(NowCaseNo,NowFormCode),FormCode2FormName(NowCaseNo,NewFormID)]),MtConfirmation,[mbyes,mbcancel],0) = mrcancel Then |
| | | Exit; |
| | | end |
| | | Else |
| | | begin |
| | | If Messagedlg(Format(_Msg('¬O§_±N"%s"ªº©Ò¦³¼v¹³ÂkÃþ¦¨"%s"'),[_Msg('ªþ¥ó')+MyTreeNode3.Text,FormCode2FormName(NowCaseNo,NewFormID)]),MtConfirmation,[mbyes,mbcancel],0) = mrcancel Then |
| | | If Messagedlg(Format(_Msg('是否將"%s"的所有影像歸類成"%s"'),[_Msg('附件')+MyTreeNode3.Text,FormCode2FormName(NowCaseNo,NewFormID)]),MtConfirmation,[mbyes,mbcancel],0) = mrcancel Then |
| | | Exit; |
| | | end; |
| | | ShowText := _Msg('ÂkÃþ¤¤,½Ðµy«J'); |
| | | ShowText := _Msg('歸類中,請稍侯'); |
| | | DataLoading(True,True); |
| | | //FormIDReplace(DisplayPath,NowFormCode,FormID); |
| | | //ShowFileReplace(DisplayPath,FormID); |
| | | FormIDReplace(NowCaseNo,NowDocDir,NowFormCode,NewFormID); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | DrawDocItem2(MytreeNode1,NowCaseno); |
| | | //DrawDocItem(MytreeNode1,FORM_INF_List,NowCaseno); |
| | | |
| | |
| | | S := TStringlist.Create; |
| | | try |
| | | ClearView(1); |
| | | ShowText := CaseID+_Msg('Àˮ֤¤,½ÐµyÔ'); |
| | | ShowText := CaseID+_Msg('檢核中,請稍候'); |
| | | DataLoading(True,True); |
| | | ShowText := CaseID+_Msg('Àˮ֤¤,½ÐµyÔ'); |
| | | ShowText := CaseID+_Msg('檢核中,請稍候'); |
| | | DataLoading(True,True); |
| | | If OMRCheckCase(CaseID) then //¦³¦¨¥\ |
| | | If OMRCheckCase(CaseID) then //有成功 |
| | | begin |
| | | S.Add('Y'); |
| | | S.SaveToFile(ImageSavePath+CaseID+'\OMRCheckOk.dat'); |
| | |
| | | finally |
| | | S.Free; |
| | | end; |
| | | Showmessage(_Msg('Àˮ֧¹¦¨')); |
| | | Showmessage(_Msg('檢核完成')); |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.PM110Click(Sender: TObject); |
| | |
| | | DocDir : String; |
| | | SavePath : String; |
| | | begin |
| | | if InputQuery('¿é¤J¨ä¥L¤å¥ó¦WºÙ','¤å¥ó¦WºÙ',CustomDocName) then |
| | | if InputQuery('輸入其他文件名稱','文件名稱',CustomDocName) then |
| | | begin |
| | | if CustomDocName <> '' then |
| | | begin |
| | | if FindCustomDocName(DisplayPath,CustomDocName) then |
| | | begin |
| | | Showmessage(Format('¤å¥ó¦WºÙ:"%s"¤v¦s¦b',[CustomDocName])); |
| | | Showmessage(Format('文件名稱:"%s"己存在',[CustomDocName])); |
| | | Exit; |
| | | end; |
| | | |
| | |
| | | begin |
| | | oldCopies := GetDocDirCopies(NowCaseno,NowDocDir); |
| | | try |
| | | NewCopies := Strtoint(inputBox('×§ï¥÷¼Æ','½Ð¿é¤J×§ï«áªº¥÷¼Æ',inttostr(oldCopies))); |
| | | NewCopies := Strtoint(inputBox('修改份數','請輸入修改後的份數',inttostr(oldCopies))); |
| | | except |
| | | Showmessage('¿é¤J¿ù»~'); |
| | | Showmessage('輸入錯誤'); |
| | | Exit; |
| | | end; |
| | | if (NewCopies <= 0) and (NewCopies >= 10000) then |
| | | begin |
| | | Showmessage('¿é¤J½d³ò¿ù»~'); |
| | | Showmessage('輸入範圍錯誤'); |
| | | Exit; |
| | | end; |
| | | |
| | | if (oldCopies <> NewCopies) and (NewCopies > 0) and (NewCopies < 10000) then |
| | | begin |
| | | if DocNoNeedDiv(NowDocNo) and (NewCopies = 1) and (MessageDlg('×§ï¦Ü1¥÷«á¦¹¤å¥ó±NµLªk¦A¶i¦æ¥÷¼Æ×§ï,¬O§_½T©w??',mtConfirmation,[mbyes,mbcancel],0)= mrcancel) then |
| | | if DocNoNeedDiv(NowDocNo) and (NewCopies = 1) and (MessageDlg('修改至1份後此文件將無法再進行份數修改,是否確定??',mtConfirmation,[mbyes,mbcancel],0)= mrcancel) then |
| | | Exit; |
| | | |
| | | SetDocDirCopies(NowCaseno,NowDocDir,NewCopies); |
| | | SetRecordEditedDocDir('A',NowCaseNo,NowDocDir); |
| | | DrawDocItem2(MytreeNode1,NowCaseno); |
| | | Showmessage('×§ï§¹¦¨'); |
| | | Showmessage('修改完成'); |
| | | end; |
| | | |
| | | end; |
| | |
| | | procedure TCB_IMGPSScanX.PM303Click(Sender: TObject); |
| | | begin |
| | | ScanColor := ifTrueColor; |
| | | Ext := '.jpg'; //20130326 yuu»¡²z½ß§ï¦sjpg |
| | | Ext := '.jpg'; //20130326 yuu說理賠改存jpg |
| | | ScanDpi := 200; |
| | | //Ext := '.tif'; |
| | | PM303.Checked := True; |
| | |
| | | end; |
| | | Panel1.Enabled := True; |
| | | Panel2.Enabled := True; |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.PM507Click(Sender: TObject); |
| | |
| | | PreNode2Name := ''; |
| | | if TreeView1.Selected.Parent = MyTreeNode1 then |
| | | PreNode2Name:= GetNode2Name(MyTreeNode2); |
| | | ShowText := _Msg('¤å¥óÂkÃþ¤¤,½ÐµyÔ'); |
| | | ShowText := _Msg('文件歸類中,請稍候'); |
| | | DataLoading(True,True); |
| | | DocListForm := TDocListForm.Create(self); |
| | | try |
| | | InitialLanguage(PatchDlg); //¸ü¤J¦h°ê»y¨¥ |
| | | InitialLanguage(PatchDlg); //載入多國語言 |
| | | for i := 1 to FORM_INF_List.Count - 1 do |
| | | begin |
| | | FormID := GetSQLData(FORM_INF_List,'T1.FORM_ID',i); |
| | |
| | | NewName := Add_Zoo(FileName2ScanPage(OldName),3)+'_'+DocListForm.DocLV.Selected.Caption+Ext; |
| | | RenameFile(DisplayPath+OldName,DisplayPath+NewName); |
| | | ReNameContext(DisplayPath,OldName,NewName); |
| | | //DrawDocItem1(MytreeNode1,Doc_Inf_List,NowCaseno); //201408280§ï |
| | | //DrawDocItem1(MytreeNode1,Doc_Inf_List,NowCaseno); //201408280改 |
| | | DrawDocItem2(MytreeNode1,NowCaseno); |
| | | //DrawDocItem(MytreeNode1,FORM_INF_List,NowCaseno); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | if PreNode2Name <> '' then // ¦^¨ì쥻ÂI¿ïªº¤å¥ó¸`ÂI¤W |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | if PreNode2Name <> '' then // 回到原本點選的文件節點上 |
| | | begin |
| | | for i := 0 to MyTreeNode1.Count - 1 do |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | TreeView1click(self); |
| | | //Showmessage(_Msg('ÂkÃþ§¹¦¨')); //20101103 Usern¨D®³±¼ |
| | | //Showmessage(_Msg('歸類完成')); //20101103 User要求拿掉 |
| | | end; |
| | | finally |
| | | DataLoading(False,False); |
| | |
| | | if DisplayISB.FileName = '' then Exit; |
| | | if (ContextList.Count = 1) and ((FMode = 'NSCAN') or (FMode = 'ASCAN') or (FMode = 'DSCAN') or (FMode = 'ISCAN') or (FMode = 'SSCAN') or (FMode = 'MSCAN') or (FMode = 'RI_SCAN')) then |
| | | begin |
| | | if Messagedlg(_Msg('§R°£«á(%s)®×¥óµL¼v¹³,±N§R°£¦¹®×¥ó,¬O§_½T©w§R°£?'),mtconfirmation,[mbyes,mbcancel],0) = mrCancel then Exit; |
| | | if Messagedlg(_Msg('刪除後(%s)案件無影像,將刪除此案件,是否確定刪除?'),mtconfirmation,[mbyes,mbcancel],0) = mrCancel then Exit; |
| | | _DelTree(DisplayPath); |
| | | SetCaseList('D',NewTreeNode.IndexOf(MyTreeNode1),''); |
| | | LoadImgFile; |
| | | end |
| | | Else |
| | | begin |
| | | if Messagedlg(_Msg('¬O§_½T©w§R°£?'),mtconfirmation,[mbyes,mbcancel],0) = mrCancel then Exit; |
| | | if Messagedlg(_Msg('是否確定刪除?'),mtconfirmation,[mbyes,mbcancel],0) = mrCancel then Exit; |
| | | inx := ContextList.IndexOf(ExtractFileName(DisplayISB.FileName)); |
| | | ContextList.Delete(inx); |
| | | ContextList.SaveToFile(ImageSavePath + NowCaseno+'\Context.dat'); |
| | |
| | | Context_DocnoList.LoadFromFile(ImageSavePath + NowCaseno+'\Context_DocNo.dat'); |
| | | if FileExists(ImageSavePath + NowCaseno+'\CustomDocNo.dat') then |
| | | Cust_DocNoList.LoadFromFile(ImageSavePath + NowCaseno+'\CustomDocNo.dat'); |
| | | //DrawDocItem1(MytreeNode1,Doc_Inf_List,NowCaseno); //201408280§ï |
| | | //DrawDocItem1(MytreeNode1,Doc_Inf_List,NowCaseno); //201408280改 |
| | | DrawDocItem2(MytreeNode1,NowCaseno); |
| | | |
| | | //DrawDocItem(MytreeNode1,FORM_INF_List,NowCaseno); |
| | | P := ContextList.Count; |
| | | MytreeNode1.Text := Format(_Msg('%s-%d¶'),[NowCaseno,p]); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | MytreeNode1.Text := Format(_Msg('%s-%d頁'),[NowCaseno,p]); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | NewTreeNodeRefresh; |
| | | TreeView1Click(self); |
| | | |
| | | end; |
| | | //Showmessage(_Msg('§R°£§¹¦¨')); //20101101 Usern¨D®³±¼ |
| | | //Showmessage(_Msg('刪除完成')); //20101101 User要求拿掉 |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.PM509Click(Sender: TObject); |
| | |
| | | begin |
| | | DeskewImg(DisplayISB.Graphic); |
| | | DisplayISB.SaveToFile(DisplayISB.FileName); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.PopupMenu1Popup(Sender: TObject); |
| | | begin |
| | | PM101.Visible := False; //§R°£ |
| | | PM102.Visible := False; //×§ï®×¥ó½s¸¹ |
| | | PM103.Visible := False; //±½ºË¾¹¥[¤J¼v¹³ |
| | | PM104.Visible := False; //ÀÉ®×¥[¤J¼v¹³ |
| | | PM106.Visible := False; //½Æ»s¤å¥ó¦Ü¨ä¥L½s¸¹ |
| | | PM107.Visible := False; //¼g³Æµù |
| | | PM108.Visible := False; //ÂkÃþ |
| | | PM109.Visible := False; //Àˮ֦¹µ§ |
| | | PM110.Visible := False; //·s¼W¦Ûq¤å¥ó |
| | | PM111.Visible := False; //×§ï¥÷¼Æ |
| | | PM101.Visible := False; //刪除 |
| | | PM102.Visible := False; //修改案件編號 |
| | | PM103.Visible := False; //掃瞄器加入影像 |
| | | PM104.Visible := False; //檔案加入影像 |
| | | PM106.Visible := False; //複製文件至其他編號 |
| | | PM107.Visible := False; //寫備註 |
| | | PM108.Visible := False; //歸類 |
| | | PM109.Visible := False; //檢核此筆 |
| | | PM110.Visible := False; //新增自訂文件 |
| | | PM111.Visible := False; //修改份數 |
| | | |
| | | if (FMode = 'SAMPLESCAN') then Exit; |
| | | |
| | | if TreeView1.Selected = nil then Exit; |
| | | if TreeView1.Selected = NewTreeNode then //·s±½ºË¥ó |
| | | if TreeView1.Selected = NewTreeNode then //新掃瞄件 |
| | | begin |
| | | if (FMode = 'NSCAN') then |
| | | begin |
| | | //ShowMessage('AAAA'); |
| | | PM101.Visible := True; //§R°£ |
| | | PM103.Visible := True; //±½ºË¾¹¥[¤J¼v¹³ |
| | | PM104.Visible := True; //ÀÉ®×¥[¤J¼v¹³ |
| | | PM101.Visible := True; //刪除 |
| | | PM103.Visible := True; //掃瞄器加入影像 |
| | | PM104.Visible := True; //檔案加入影像 |
| | | end; |
| | | |
| | | if FMode='ESCAN' then |
| | | begin |
| | | PM101.Visible := False; |
| | | end; |
| | | end |
| | | Else if TreeView1.Selected = MyTreeNode1 then //®×¥ó¼h |
| | | Else if TreeView1.Selected = MyTreeNode1 then //案件層 |
| | | begin |
| | | PM101.Visible := True; //§R°£ |
| | | PM101.Visible := True; //刪除 |
| | | if not CaseDelete_Enable(NowCaseno) then // |
| | | PM101.Enabled := False |
| | | else |
| | | PM101.Enabled := True; |
| | | PM103.Visible := True; //±½ºË¾¹¥[¤J¼v¹³ |
| | | //PM107.Visible := True; //¼g³Æµù |
| | | //PM109.Visible := True; //Àˮ֦¹µ§ |
| | | PM103.Visible := True; //掃瞄器加入影像 |
| | | //PM107.Visible := True; //寫備註 |
| | | //PM109.Visible := True; //檢核此筆 |
| | | if FCustDocYN <> 'N' Then |
| | | PM110.Visible := True; //·s¼W¦Ûq¤å¥ó |
| | | PM104.Visible := True; //ÀÉ®×¥[¤J¼v¹³ |
| | | PM110.Visible := True; //新增自訂文件 |
| | | PM104.Visible := True; //檔案加入影像 |
| | | if (FMode = 'NSCAN') then |
| | | begin |
| | | PM102.Visible := True; //×§ï®×¥ó½s¸¹ |
| | | PM102.Visible := True; //修改案件編號 |
| | | end; |
| | | if FMode='ESCAN' then |
| | | begin |
| | | PM101.Visible := False; |
| | | end; |
| | | end |
| | | Else if TreeView1.Selected = MyTreeNode2 then //¤å¥ó¼h |
| | | Else if TreeView1.Selected = MyTreeNode2 then //文件層 |
| | | begin |
| | | PM101.Visible := True; //§R°£ |
| | | //PM107.Visible := True; //¼g³Æµù |
| | | //PM109.Visible := True; //Àˮ֦¹µ§ |
| | | PM101.Visible := True; //刪除 |
| | | //PM107.Visible := True; //寫備註 |
| | | //PM109.Visible := True; //檢核此筆 |
| | | if FCustDocYN <> 'N' Then |
| | | PM110.Visible := True; //·s¼W¦Ûq¤å¥ó |
| | | if GetUseCase('T',DisplayPath,NowDocDir) <> '' then //¨S¦³³Q¤Þ¥Î¨«ªº |
| | | PM101.Enabled := False //§R°£ |
| | | PM110.Visible := True; //新增自訂文件 |
| | | if GetUseCase('T',DisplayPath,NowDocDir) <> '' then //沒有被引用走的 |
| | | PM101.Enabled := False //刪除 |
| | | Else |
| | | PM101.Enabled := True; //§R°£ |
| | | PM101.Enabled := True; //刪除 |
| | | if ((GetDocDirCopies(NowCaseno,NowDocDir) > 1) or (not DocNoNeedDiv(NowDocNo)) or (Copy(NowDocNo,1,5)='ZZZZZ')) and (NowDocNo<> 'Attach') and (NowDocNo<> 'S_Attach') then |
| | | PM111.Visible := True; //×§ï¥÷¼Æ |
| | | PM111.Visible := True; //修改份數 |
| | | if (FMode = 'NSCAN') then |
| | | PM102.Visible := True; //×§ï®×¥ó½s¸¹ |
| | | end |
| | | Else if TreeView1.Selected = MyTreeNode3 then //ªí³æ¼h |
| | | begin |
| | | PM101.Visible := True; //§R°£ |
| | | PM104.Visible := True; //ÀÉ®×¥[¤J¼v¹³ |
| | | PM108.Visible := True; //ÂkÃþ |
| | | PM103.Visible := True; //±½ºË¾¹¥[¤J¼v¹³ |
| | | if FCustDocYN <> 'N' Then |
| | | PM110.Visible := True; //·s¼W¦Ûq¤å¥ó |
| | | if GetFormIDPage(ContextList,NowFormCode) < 1 Then |
| | | PM108.Visible := False; //ÂkÃþ |
| | | if GetUseCase('T',DisplayPath,NowDocDir) <> '' then //³Q¤Þ¥Î¨«ªº |
| | | PM102.Visible := True; //修改案件編號 |
| | | if FMode='ESCAN' then |
| | | begin |
| | | PM101.Enabled := False; //§R°£ |
| | | PM104.Enabled := False; //ÀÉ®×¥[¤J¼v¹³ |
| | | PM108.Enabled := False; //ÂkÃþ |
| | | PM101.Visible := False; |
| | | end; |
| | | end |
| | | Else if TreeView1.Selected = MyTreeNode3 then //表單層 |
| | | begin |
| | | PM101.Visible := True; //刪除 |
| | | PM104.Visible := True; //檔案加入影像 |
| | | PM108.Visible := True; //歸類 |
| | | PM103.Visible := True; //掃瞄器加入影像 |
| | | if FCustDocYN <> 'N' Then |
| | | PM110.Visible := True; //新增自訂文件 |
| | | if GetFormIDPage(ContextList,NowFormCode) < 1 Then |
| | | PM108.Visible := False; //歸類 |
| | | if GetUseCase('T',DisplayPath,NowDocDir) <> '' then //被引用走的 |
| | | begin |
| | | PM101.Enabled := False; //刪除 |
| | | PM104.Enabled := False; //檔案加入影像 |
| | | PM108.Enabled := False; //歸類 |
| | | end |
| | | Else |
| | | begin |
| | | PM101.Enabled := True; //§R°£ |
| | | PM104.Enabled := True; //ÀÉ®×¥[¤J¼v¹³ |
| | | PM108.Enabled := True; //ÂkÃþ |
| | | PM101.Enabled := True; //刪除 |
| | | PM104.Enabled := True; //檔案加入影像 |
| | | PM108.Enabled := True; //歸類 |
| | | end; |
| | | |
| | | if (FMode = 'NSCAN') then |
| | | PM102.Visible := True; //×§ï®×¥ó½s¸¹ |
| | | //PM103.Visible := True; //±½ºË¾¹¥[¤J¼v¹³ |
| | | //PM104.Visible := True; //ÀÉ®×¥[¤J¼v¹³ |
| | | //PM107.Visible := True; //¼g³Æµù |
| | | //PM109.Visible := True; //Àˮ֦¹µ§ |
| | | PM102.Visible := True; //修改案件編號 |
| | | //PM103.Visible := True; //掃瞄器加入影像 |
| | | //PM104.Visible := True; //檔案加入影像 |
| | | //PM107.Visible := True; //寫備註 |
| | | //PM109.Visible := True; //檢核此筆 |
| | | |
| | | if FMode='ESCAN' then |
| | | begin |
| | | PM101.Visible := False; |
| | | end; |
| | | end; |
| | | |
| | | if FImgDelete='Y' then |
| | | begin |
| | | PM101.Visible:=True; |
| | | end; |
| | | |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.PopupMenu4Popup(Sender: TObject); |
| | |
| | | |
| | | procedure TCB_IMGPSScanX.PopupMenu6Popup(Sender: TObject); |
| | | begin |
| | | PM601.Visible := False; //ÂkÃþ |
| | | PM602.Visible := False; //¦Û¦æ©w¸q¤å¥ó¦WºÙ |
| | | PM603.Visible := False; //±½´y´À´«¦¹¶ |
| | | PM604.Visible := False; //¬n±×ÁB¥¿ |
| | | PM605.Visible := False; //§R°£ |
| | | PM601.Visible := False; //歸類 |
| | | PM602.Visible := False; //自行定義文件名稱 |
| | | PM603.Visible := False; //掃描替換此頁 |
| | | PM604.Visible := False; //歪斜矯正 |
| | | PM605.Visible := False; //刪除 |
| | | if ((NowDocNo = 'Attach') or (NowDocNo = 'S_Attach')) and (FCustDocYN <> 'N') then |
| | | PM602.Visible := True; //¦Û¦æ©w¸q¤å¥ó¦WºÙ |
| | | //PM603.Visible := True; //±½´y´À´«¦¹¶ |
| | | PM604.Visible := True; //¬n±×ÁB¥¿ |
| | | PM601.Visible := True; //ÂkÃþ |
| | | PM605.Visible := True; //§R°£ |
| | | PM602.Visible := True; //自行定義文件名稱 |
| | | //PM603.Visible := True; //掃描替換此頁 |
| | | PM604.Visible := True; //歪斜矯正 |
| | | PM601.Visible := True; //歸類 |
| | | PM605.Visible := True; //刪除 |
| | | |
| | | if CheckSelectImg_UseCase(DisplayPath,NowCaseNo) then //¿ï¾Üªº¼v¹³¤£¥i¦³¤Þ¥Îªº |
| | | if CheckSelectImg_UseCase(DisplayPath,NowCaseNo) then //選擇的影像不可有引用的 |
| | | begin |
| | | PM601.Enabled := False; //ÂkÃþ |
| | | PM605.Enabled := False; //§R°£ |
| | | PM601.Enabled := False; //歸類 |
| | | PM605.Enabled := False; //刪除 |
| | | end |
| | | Else |
| | | begin |
| | | PM601.Enabled := True; //ÂkÃþ |
| | | PM605.Enabled := True; //§R°£ |
| | | PM601.Enabled := True; //歸類 |
| | | PM605.Enabled := True; //刪除 |
| | | end; |
| | | end; |
| | | |
| | |
| | | var |
| | | SampleFormID : String; |
| | | SendData : String; |
| | | buttonSelected : Integer; |
| | | begin |
| | | ScanMode := smSample; |
| | | ClearView(1); |
| | | Vmode := 0; //¤Á¦¨³æ¶ |
| | | Vmode := 0; //切成單頁 |
| | | GoViewMode; |
| | | ScanInfo.ImageCount := 0; |
| | | ScanPath := SamplePath; |
| | | ScanCaseno := ''; |
| | | ContextList.Clear; |
| | | ShowText := _Msg('½d¥»±½´y¤¤,½ÐµyÔ'); |
| | | ShowText := _Msg('範本掃描中,請稍候'); |
| | | DataLoading(True,True); |
| | | SampleFormID := UpperCase(InputBox(_Msg('½d¥»Àɱ½ºË¿é¤Jµe±'),_Msg('½Ð¿é¤J¤å¥ó½s¸¹'),'')); |
| | | SampleFormID := UpperCase(InputBox(_Msg('範本檔掃瞄輸入畫面'),_Msg('請輸入文件編號'),'')); |
| | | |
| | | if SampleFormIDList.IndexOf(SampleFormID)<>-1 then |
| | | begin |
| | | // Show a custom dialog |
| | | buttonSelected := messagedlg(SampleFormID+'已有範本,是否取代?',mtCustom, |
| | | [mbYes,mbCancel], 0); |
| | | if buttonSelected = mrCancel then |
| | | begin |
| | | DataLoading(false,false); |
| | | Exit; |
| | | end; |
| | | end; |
| | | |
| | | if SampleFormID <> '' then |
| | | begin |
| | | if FormIDExists(SampleFormID,False,0) then |
| | |
| | | end |
| | | Else |
| | | begin |
| | | Showmessage(Format(_Msg('FormID:%s©|¥¼µù¥U'),[SampleFormID])); |
| | | Showmessage(Format(_Msg('FormID:%s尚未註冊'),[SampleFormID])); |
| | | Panel1.Enabled := True; |
| | | Panel2.Enabled := True; |
| | | DataLoading(false,false); |
| | | Exit; |
| | | end; |
| | | SampleAnchorMode := FormID2Anchor(SampleFormID); |
| | | |
| | | Panel1.Enabled := False; |
| | | Panel2.Enabled := False; |
| | | |
| | | //ShowMessage('AAAAA'); |
| | | Try |
| | | StatrTwainScan; |
| | | Except |
| | |
| | | |
| | | if (ISB1.FileName <> '') and FileExists(SamplePath+SampleFormID+'.tif') then |
| | | begin |
| | | ShowText := _Msg('½d¥»¶Ç°e¤¤,½ÐµyÔ'); |
| | | ShowText := _Msg('範本傳送中,請稍候'); |
| | | DataLoading(True,True); |
| | | //¦h¦s¤@¥÷jpg |
| | | //多存一份jpg |
| | | ImageScrollBox1.LoadFromFile(SamplePath+SampleFormID+'.tif',1); |
| | | BWTif2Jpg(ImageScrollBox1.Graphic); |
| | | ImageScrollBox1.SaveToFile(SamplePath+SampleFormID+'.jpg'); |
| | | //¦h¦s¤@¥÷jpg |
| | | //多存一份jpg |
| | | |
| | | NowWork_No := FormCode2WorkNo(SampleFormID); |
| | | SendData := 'data='+FData+'&verify='+FVerify+'&work_no='+FWork_no+'&file_name='+SampleFormID+'.tif'; |
| | | if not upFile(HTTPSClient,FUrl,'service/imgpsc/IMGPSC02/sample',SendData,'file',SamplePath+SampleFormID+'.tif',FReWrite,Memo1,False) then |
| | | begin |
| | | Showmessage(_Msg('¶Ç°e½d¥»ÀÉ®×®É,ºô¸ôµo¥Í¿ù»~!!')+_MSg('¿ù»~¥N½X:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason+')'); |
| | | Showmessage(_Msg('傳送範本檔案時,網路發生錯誤!!')+_MSg('錯誤代碼:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason+')'); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | if memo1.Lines.Strings[0] = '1' then |
| | | begin |
| | | Showmessage(_Msg('¶Ç°e½d¥»ÀÉ®×®É,ºô¸ôµo¥Í¿ù»~!!')+_Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]); |
| | | Showmessage(_Msg('傳送範本檔案時,網路發生錯誤!!')+_Msg('錯誤原因:')+memo1.Lines.Strings[1]); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | Showmessage(_Msg('¶Ç°e½d¥»ÀÉ®×®É,ºô¸ôµo¥Í¿ù»~!!')+_Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J')); |
| | | Showmessage(_Msg('傳送範本檔案時,網路發生錯誤!!')+_Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入')); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | |
| | | if FileExists(SamplePath+SampleFormID+'.jpg') then //¶Ç°eJPG¼v¹³ |
| | | if FileExists(SamplePath+SampleFormID+'.jpg') then //傳送JPG影像 |
| | | begin |
| | | SendData := 'data='+FData+'&verify='+FVerify+'&work_no='+FWork_no+'&file_name='+SampleFormID+'.jpg'; |
| | | if not upFile(HTTPSClient,FUrl,'service/imgpsc/IMGPSC02/sample',SendData,'file',SamplePath+SampleFormID+'.jpg',FReWrite,Memo1,False) then |
| | | begin |
| | | Showmessage(_Msg('¶Ç°e½d¥»ÀÉ®×(JPG)®É,ºô¸ôµo¥Í¿ù»~!!')+_MSg('¿ù»~¥N½X:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason+')'); |
| | | Showmessage(_Msg('傳送範本檔案(JPG)時,網路發生錯誤!!')+_MSg('錯誤代碼:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason+')'); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | if memo1.Lines.Strings[0] = '1' then |
| | | begin |
| | | Showmessage(_Msg('¶Ç°e½d¥»ÀÉ®×(JPG)®É,ºô¸ôµo¥Í¿ù»~!!')+_Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]); |
| | | Showmessage(_Msg('傳送範本檔案(JPG)時,網路發生錯誤!!')+_Msg('錯誤原因:')+memo1.Lines.Strings[1]); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | Showmessage(_Msg('¶Ç°e½d¥»ÀÉ®×(JPG)®É,ºô¸ôµo¥Í¿ù»~!!')+_Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J')); |
| | | Showmessage(_Msg('傳送範本檔案(JPG)時,網路發生錯誤!!')+_Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入')); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | end; |
| | | Showmessage(_Msg('¶Ç°e§¹¦¨')); |
| | | Showmessage(_Msg('傳送完成')); |
| | | end; |
| | | end; |
| | | DataLoading(False,False); |
| | |
| | | begin |
| | | IF not InitialOk Then |
| | | begin |
| | | Showmessage(_msg('¸ê°T©|¥¼¤U¸ü§¹¦¨,½ÐµyԩΫ·s¶i¤J')); |
| | | Showmessage(_msg('資訊尚未下載完成,請稍候或重新進入')); |
| | | Exit; |
| | | end; |
| | | if MyTreeNode1 = nil then |
| | | begin |
| | | Showmessage(_Msg('½Ð¥ý¿ï¾Ü®×¥ó')); |
| | | Showmessage(_Msg('請先選擇案件')); |
| | | Exit; |
| | | end; |
| | | Panel1.Enabled := False; |
| | |
| | | //P := ContextList.Count; |
| | | GetCase_PageCount(CaseCount,PageCount); |
| | | v := Pos('-',NewTreeNode.Text); |
| | | NewTreeNode.Text := Format(_Msg('%s-¦@%dµ§¦@%d¶'),[Copy(NewTreeNode.Text,1,v-1),CaseCount,PageCount]); |
| | | MytreeNode1.Text := Format(_Msg('%s-%d¶'),[NowCaseno,GetCasePage(ImageSavePath,NowCaseno)]); |
| | | NewTreeNode.Text := Format(_Msg('%s-共%d筆共%d頁'),[Copy(NewTreeNode.Text,1,v-1),CaseCount,PageCount]); |
| | | MytreeNode1.Text := Format(_Msg('%s-%d頁'),[NowCaseno,GetCasePage(ImageSavePath,NowCaseno)]); |
| | | |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | SetDocDirtoSelected(MyTreeNode1,FirstDocDir); |
| | | TreeView1Click(self); |
| | | end; |
| | |
| | | //Case2upload(NowCaseNo); |
| | | //mkdir(DisplayPath+'Test\'); |
| | | //Download2Case(DisplayPath+'Upload\',DisplayPath+'Test\'); |
| | | //CreateFormID_FormName(DisplayPath); //²£¥ÍFormID_FormName.dat |
| | | //CreateDocNo_DocName(DisplayPath); //²£¥ÍDocNo_Name.dat |
| | | //Showmessage(CreateDocNo_Info(DisplayPath)); //²£¥Í Docno,¥÷¼Æ,¶¼Æ;Docno,¥÷¼Æ,¶¼Æ ªº¦^¶Ç¦r¦ê |
| | | //CreateFormID_FormName(DisplayPath); //產生FormID_FormName.dat |
| | | //CreateDocNo_DocName(DisplayPath); //產生DocNo_Name.dat |
| | | //Showmessage(CreateDocNo_Info(DisplayPath)); //產生 Docno,份數,頁數;Docno,份數,頁數 的回傳字串 |
| | | |
| | | //Showmessage(CreateDocnoFrom_Info(NowCaseno)); |
| | | //Showmessage(self.CreateCustDocNoFrom_Info(NowCaseno)); |
| | | |
| | | initkscan; |
| | | showmessage('FUrl='+FUrl+#10#13+ |
| | | 'FCaseID='+FCaseID+#10#13+ |
| | | 'FMode='+FMode+#10#13+ |
| | | 'FModeName='+FModeName+#10#13+ |
| | | 'FWork_no='+FWork_no+#10#13+ |
| | | 'FUserID='+FUserID+#10#13+ |
| | | 'FUserName='+FUserName+#10#13+ |
| | | 'FUserUnit='+FUserUnit+#10#13+ |
| | | 'FData='+FData+#10#13+ |
| | | 'FVerify='+FVerify+#10#13+ |
| | | 'FReWrite='+FReWrite+#10#13+ |
| | | 'FLanguage='+FLanguage+#10#13+ |
| | | 'FLoanDoc_Value='+FLoanDoc_Value+#10#13+ |
| | | 'FLoanDoc_Enable='+FLoanDoc_Enable+#10#13+ |
| | | 'FUseProxy='+FUseProxy+#10#13+ |
| | | 'FC_DocNoList='+FC_DocNoList+#10#13+ |
| | | 'FC_DocNameList='+FC_DocNameList+#10#13+ |
| | | 'FFixFileList='+FFixFileList+#10#13+ |
| | | 'FIs_In_Wh='+FIs_In_Wh+#10#13+ |
| | | 'FOldCaseInfo='+FOldCaseInfo+#10#13+ |
| | | 'FPrintyn='+FPrintyn+#10#13+ |
| | | 'FIs_OldCase='+FIs_OldCase+#10#13+ |
| | | 'FCustDocYN='+FCustDocYN); |
| | | ShowMessage('FImgDPI='+IntToStr(FImgDPI)+#10#13+ |
| | | 'FScanColor='+ IntToStr(FScanColor)+#10#13+ |
| | | 'FFileSizeLimit='+ IntToStr(FFileSizeLimit) +#10#13+ |
| | | 'FCaseNoLength='+ IntToStr(FCaseNoLength) +#10#13+ |
| | | 'FImgDelete='+ FImgDelete+#10#13+ |
| | | 'FIsExternal='+ FIsExternal+#10#13+ |
| | | 'FCheck_main_form='+ FCheck_main_form); |
| | | |
| | | showmessage('FUrl='+FUrl); |
| | | showmessage('FCaseID='+FCaseID); |
| | | showmessage('FMode='+FMode); |
| | | showmessage('FModeName='+FModeName); |
| | | showmessage('FWork_no='+FWork_no); |
| | | showmessage('FUserID='+FUserID); |
| | | showmessage('FUserName='+FUserName); |
| | | showmessage('FUserUnit='+FUserUnit); |
| | | showmessage('FData='+FData); |
| | | showmessage('FVerify='+FVerify); |
| | | showmessage('FReWrite='+FReWrite); |
| | | showmessage('FLanguage='+FLanguage); |
| | | showmessage('FLoanDoc_Value='+FLoanDoc_Value); |
| | | showmessage('FLoanDoc_Enable='+FLoanDoc_Enable); |
| | | showmessage('FUseProxy='+FUseProxy); |
| | | showmessage('FC_DocNoList='+FC_DocNoList); |
| | | showmessage('FC_DocNameList='+FC_DocNameList); |
| | | showmessage('FFixFileList='+FFixFileList); |
| | | showmessage('FIs_In_Wh='+FIs_In_Wh); |
| | | showmessage('FOldCaseInfo='+FOldCaseInfo); |
| | | showmessage('FPrintyn='+FPrintyn); |
| | | showmessage('FIs_OldCase='+FIs_OldCase); |
| | | showmessage('FCustDocYN='+FCustDocYN); |
| | | { ShowMessage('UpLPoint='+IntToStr(UpLPoint.X)+','+IntToStr(UpLPoint.Y)+#10#13+ |
| | | 'UpRPoint='+IntToStr(UpRPoint.X)+','+IntToStr(UpRPoint.Y)+#10#13+ |
| | | 'DownLPoint='+IntToStr(DownLPoint.X)+','+IntToStr(DownLPoint.Y)+#10#13+ |
| | | 'DownRPoint='+IntToStr(DownRPoint.X)+','+IntToStr(DownRPoint.Y)); |
| | | } |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.Button4Click(Sender: TObject); |
| | |
| | | //LoadImgFile; |
| | | //LoadImgFile1; |
| | | str:=''; |
| | | for I := 1 to 11 do // ¬Ý OMRErrInfo ªº¤º®e |
| | | for I := 1 to 11 do // 看 OMRErrInfo 的內容 |
| | | begin |
| | | str:=str+BoolToStr(OMRErrInfo[i].Display)+',' |
| | | +BoolToStr(OMRErrInfo[i].Ignore)+','+OMRErrInfo[i].Info+',' |
| | | str:=str+BoolToStr(OMRErrInfo[i].Display,true)+',' |
| | | +BoolToStr(OMRErrInfo[i].Ignore,true)+','+OMRErrInfo[i].Info+',' |
| | | +OMRErrInfo[i].Mode+#10#13; |
| | | end; |
| | | ShowMessage('OMRErrInfo='+str); |
| | |
| | | ShowMessage('MEMO_INF_List='+MEMO_INF_List.Text) ; |
| | | ShowMessage('WORK_INF_List='+WORK_INF_List.Text) ; |
| | | ShowMessage('LASTEST_FORM_INF_List='+LASTEST_FORM_INF_List.Text) ; |
| | | ShowMessage('SampleFormIDList='+SampleFormIDList.Text); |
| | | // SampleFormIDList.Add('31A00101011706A'); |
| | | // SampleFormIDList.Add('31A00101021706A'); |
| | | // SampleFormIDList.Add('31A00101031706A'); |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.StatrTwainScan; |
| | |
| | | begin |
| | | if not Scanner.IsConfigured then |
| | | begin |
| | | ShowMessage(_Msg('TWAIN ±½ºËÅX°Ê©|¥¼¦w¸Ë')); |
| | | ShowMessage(_Msg('TWAIN 掃瞄驅動尚未安裝')); |
| | | Exit; |
| | | end; |
| | | FillChar(ScanInfo, SizeOf(ScanInfo), 0); |
| | |
| | | ScanInfo.ImageCount := 0; |
| | | ScanInfo.Graphic := TTiffGraphic.Create; |
| | | try |
| | | ISB := nil; //³W¹s |
| | | ISB := nil; //規零 |
| | | //ShowMessage(IntToStr(ScanDpi)); |
| | | Scanner.RequestedXDpi := ScanDpi; |
| | | Scanner.RequestedYDpi := ScanDpi; |
| | | Scanner.RequestedImageFormat := ScanColor; |
| | |
| | | |
| | | Try |
| | | Scanner.OpenSource; |
| | | Scanner.Duplex := ScanDuplex; //Âù± |
| | | //Scanner.FEEDERENABLED := not ScanFlatCB.Checked; // ¥ý®³±¼¥¥x |
| | | Scanner.Duplex := ScanDuplex; //雙面 |
| | | //Scanner.FEEDERENABLED := not ScanFlatCB.Checked; // 先拿掉平台 |
| | | If ScanImgSetUse Then |
| | | begin |
| | | Scanner.ScanBrightness := ScanBright; |
| | | Scanner.ScanContrast := ScanContrast; |
| | | end; |
| | | except |
| | | Showmessage(_Msg('±½ºË¾¹µo¥Í¿ù»~!!')); |
| | | Showmessage(_Msg('掃瞄器發生錯誤!!')); |
| | | Scanner.CloseSource; |
| | | Exit; |
| | | end; |
| | |
| | | If (MpsBarcodeinf.r180[i] <> 0) and (Length(MpsBarcodeinf.Text[i])=FormIDLength) Then |
| | | begin |
| | | Rotate(pScanInfo^.Graphic,MpsBarcodeinf.r180[i]); |
| | | MpsGetBarcode(pScanInfo^.Graphic,MpsBarcodeinf); //±ÛÂà«á¦A«¨ú¤@¦¸±ø½X¸ê°T |
| | | MpsGetBarcode(pScanInfo^.Graphic,MpsBarcodeinf); //旋轉後再重取一次條碼資訊 |
| | | Break; |
| | | end; |
| | | end; |
| | | |
| | | //¼v¹³¤Ï¦V |
| | | //影像反向 |
| | | IF ScannerReverse then |
| | | NegativeImg(pScanInfo^.Graphic); |
| | | //¶É±×ÁB¥¿ |
| | | //傾斜矯正 |
| | | IF ScanDeskew Then |
| | | DeskewImg(pScanInfo^.Graphic); |
| | | //²M¶ÂÃä |
| | | //清黑邊 |
| | | IF BoardClear then |
| | | CleanupBorder(pScanInfo^.Graphic); |
| | | end |
| | |
| | | If (MpsBarcodeinf.r180[i] <> 0) and (Length(MpsBarcodeinf.Text[i])=FormIDLength) Then |
| | | begin |
| | | Rotate(ISB_BW.Graphic,MpsBarcodeinf.r180[i]); |
| | | MpsGetBarcode(ISB_BW.Graphic,MpsBarcodeinf); //±ÛÂà«á¦A«¨ú¤@¦¸±ø½X¸ê°T |
| | | MpsGetBarcode(ISB_BW.Graphic,MpsBarcodeinf); //旋轉後再重取一次條碼資訊 |
| | | Break; |
| | | end; |
| | | end; |
| | |
| | | If (MpsBarcodeinf.r180[i] <> 0) and (Length(MpsBarcodeinf.Text[i])=FormIDLength) Then |
| | | begin |
| | | Rotate(ISB_BW.Graphic,MpsBarcodeinf.r180[i]); |
| | | MpsGetBarcode(ISB_BW.Graphic,MpsBarcodeinf); //±ÛÂà«á¦A«¨ú¤@¦¸±ø½X¸ê°T |
| | | MpsGetBarcode(ISB_BW.Graphic,MpsBarcodeinf); //旋轉後再重取一次條碼資訊 |
| | | Break; |
| | | end; |
| | | end; |
| | |
| | | //Application.ProcessMessages; |
| | | if CheckNeedCrop(iGraphic_First) Then |
| | | begin |
| | | iRect.Left := pScanInfo^.Graphic.Width div 2; //¥ý¨ú¥ªÃ䪺¼v¹³ |
| | | iRect.Left := pScanInfo^.Graphic.Width div 2; //先取左邊的影像 |
| | | iRect.Top := 0; |
| | | iRect.Right := pScanInfo^.Graphic.Width; |
| | | iRect.Bottom := pScanInfo^.Graphic.Height; |
| | | CropImg(iGraphic_First,iRect); |
| | | |
| | | iGraphic_Sec.Assign(pScanInfo^.Graphic); //¦A¨ú¥kÃ䪺¼v¹³ |
| | | iGraphic_Sec.Assign(pScanInfo^.Graphic); //再取右邊的影像 |
| | | iRect.Left := 0; |
| | | iRect.Top := 0; |
| | | iRect.Right := pScanInfo^.Graphic.Width div 2; |
| | |
| | | case ScanMode of |
| | | smNew: |
| | | begin |
| | | if ScanImgShowMode = 0 then //²M·¡Åã¥Ü |
| | | if ScanImgShowMode = 0 then //清楚顯示 |
| | | begin |
| | | ISB := FindISB2View(VMode); |
| | | ISB.AntiAliased := True; |
| | | ISB.ZoomMode := zmFittopage; |
| | | ISB.LoadFromFile(PEFileName,1); |
| | | end |
| | | Else if ScanImgShowMode = 1 then //¼Ò½kÅã¥Ü |
| | | Else if ScanImgShowMode = 1 then //模糊顯示 |
| | | begin |
| | | ISB := FindISB2View(VMode); |
| | | ISB.AntiAliased := False; |
| | | ISB.ZoomMode := zmFittopage; |
| | | ISB.LoadFromFile(PEFileName,1); |
| | | end |
| | | Else if ScanImgShowMode = 1 then //¤£Åã¥Ü |
| | | Else if ScanImgShowMode = 1 then //不顯示 |
| | | begin |
| | | |
| | | end |
| | |
| | | FormID:=''; |
| | | FormVersion:=''; |
| | | PEFileName := ''; |
| | | //if not FindNoSaveBarCode then //¨S¦³¤£Àx¦s¼v¹³ªº±ø½X |
| | | //if not FindNoSaveBarCode then //沒有不儲存影像的條碼 |
| | | //begin |
| | | if FormID = '' then |
| | | begin |
| | | FormID := BarCode2FormID; //¨ú¥XFormID |
| | | |
| | | FormID := BarCode2FormID; //取出FormID |
| | | end; |
| | | if (FormID <> '') and ISGuideFormID(FormID) then |
| | | NowGuideFormID := FormID; |
| | | |
| | | if (FormID <> '') and ISDivPageFormID(FormID) then |
| | | begin |
| | | NowDivPageFormID := FormID; |
| | | end; |
| | | |
| | | if (FormID <> '') and ISGuideFormID(FormID) then |
| | | begin |
| | | NowGuideFormID := FormID; |
| | | end; |
| | | //ShowMessage('NowGuideFormID='+NowGuideFormID); |
| | | if (not (FindDivFormCode(FormID))) and (NowGuideFormID <> '') {and (FormID = '')} then |
| | | FormID := NowGuideFormID; |
| | | DocNo := FormCode2DocNo(FormID); |
| | | |
| | | if (FormID <>'') and FindDivFormCode(FormID) Then //¥u§ä¤À®×¶¤Wªº®×¥ó±ø½X |
| | | //ShowMessage('FormID='+FormID); |
| | | if (FormID <>'') and FindDivFormCode(FormID) and (NowDivPageFormID <> '') Then //只找分案頁上的案件條碼 |
| | | begin |
| | | |
| | | ScanInfo.ImageCount := 0; |
| | | ClearView(1); |
| | | ContextList.Clear; |
| | | Context_DocnoList.Clear; |
| | | ClearCaseIndex; //²M±¼®×¥ó¯Á¤Þ |
| | | ScanCaseno := BarCode2CaseID; //¨ú¥X®×¥ó½s¸¹ |
| | | ClearCaseIndex; //清掉案件索引 |
| | | ScanCaseno := BarCode2CaseID; //取出案件編號 |
| | | NowGuideFormID := ''; |
| | | NowDivPageFormID :=''; |
| | | //ShowMessage('NowGuideFormID='+NowGuideFormID+#10#13+'FormID='+FormID+#10#13+'ScanCaseno='+ScanCaseno); |
| | | end; |
| | | if ScanCaseno = '' then //¤@¶}©l³£¨S§ä¨ì |
| | | if ScanCaseno = '' then //一開始都沒找到 |
| | | begin |
| | | ScanCaseno := GetNoNameCase(ImageSavePath); |
| | | end; |
| | |
| | | Str2Dir(ScanPath); |
| | | |
| | | ScanDocDir := FindLastestDocDir(ScanCaseno,DocNo); |
| | | if DocNoNeedDiv(DocNo) then //n¤À¥÷¼Æ |
| | | |
| | | if DocNoNeedDiv(DocNo)then //要分份數 |
| | | begin |
| | | //Showmessage(DocNo+#13+FormCode2Page(FormID)+#13+inttostr(GetDocDir_Page(ScanCaseno,ScanDocDir))+#13+ScanDocDir); |
| | | if ((FormCode2Page(FormID) = '01') and (GetDocDir_Page(ScanCaseno,ScanDocDir)>0)) or (ScanDocDir = '') then |
| | |
| | | ScanDocDir := DocNo2DocNoDir(ImageSavePath + ScanCaseno+'\',DocNo); |
| | | end; |
| | | end |
| | | Else //¤£¤À¥÷¼Æ |
| | | Else //不分份數 |
| | | begin |
| | | if DocNo <> '' then |
| | | ScanDocDir := DocNo |
| | | else //Attach ªþ¥ó |
| | | else //Attach 附件 |
| | | ScanDocDir := DocNo2DocNoDir(ImageSavePath + ScanCaseno+'\',DocNo); |
| | | end; |
| | | //ScanDocDir := GetDocNoDir(ImageSavePath+ScanCaseno+'\',DocNo); |
| | |
| | | ScanSaveFilename := FormID; |
| | | |
| | | Str2Dir(ScanPath); |
| | | if ScanSaveFilename = '' then //ªþ¥ó |
| | | if ScanSaveFilename = '' then //附件 |
| | | ScanSaveFilename:= Add_Zoo(GetDocDir_Page(ScanCaseNo,ScanDocDir)+1,3)+ext |
| | | //ScanSaveFilename:= Add_Zoo(ScanInfo.ImageCount+1,3)+ext |
| | | Else |
| | | ScanSaveFilename := Add_Zoo(GetDocDir_Page(ScanCaseNo,ScanDocDir)+1,3)+'_'+ScanSaveFilename+ext; |
| | | if not FindNoSaveBarCode then //¨S¦³¤£Àx¦s¼v¹³ªº±ø½X |
| | | if not FindNoSaveBarCode then //沒有不儲存影像的條碼 |
| | | begin |
| | | if ScanInfo.ImageCount = 0 then |
| | | begin |
| | | SetCaseList('A',-1,ScanCaseno); |
| | | WriteCaseIndex(ImageSavePath + ScanCaseno+'\'); //¼g¤J®×¥ó¯Á¤Þ |
| | | WriteCaseIndex(ImageSavePath + ScanCaseno+'\'); //寫入案件索引 |
| | | MyTreeNode1 := TreeView1.Items.AddChild(NewTreenode,ScanCaseno); |
| | | MyTreenode1.ImageIndex := 2; |
| | | MyTreenode1.SelectedIndex := 2; |
| | |
| | | smInsert: |
| | | begin |
| | | ScanSaveFilename := ''; |
| | | FormID := BarCode2FormID; //¨ú¥XFormID |
| | | if (FormID <> '') and ISGuideFormID(FormID) then |
| | | FormID := BarCode2FormID; //取出FormID |
| | | if (FormID <> '') and ISGuideFormID(FormID) then //20170510 註解 因為DSCAN 會全擠在導引頁下 |
| | | NowGuideFormID := FormID; |
| | | //Showmessage('A:'+FormID+#13+'B:'+NowGuideFormID); |
| | | if (NowGuideFormID <> '') {and (FormID = '')} then |
| | | if (NowGuideFormID <> '') {and (FormID = '')} then //20170510 註解 因為DSCAN 會全擠在導引頁下 |
| | | FormID := NowGuideFormID; |
| | | DocNo := FormCode2DocNo(FormID); |
| | | ScanDocDir := FindLastestDocDir(ScanCaseno,DocNo); |
| | | if DocNoNeedDiv(DocNo) then //n¤À¥÷¼Æ |
| | | //ShowMessage('ScanDocDir='+ScanDocDir); |
| | | if (DocNoNeedDiv(DocNo)) then //要分份數 |
| | | begin |
| | | if ((FormCode2Page(FormID) = '01') and (GetDocDir_Page(ScanCaseno,ScanDocDir)>0)) or (ScanDocDir = '') then |
| | | if TreeView1.Selected = MyTreeNode1 then //20170421 掃瞄插頁時選則在案號上才要分份數 選在FormID上就不分份數 |
| | | begin |
| | | ScanInfo.ImageCount := 0; |
| | | ScanDocDir := DocNo2DocNoDir(ImageSavePath + ScanCaseno+'\',DocNo); |
| | | if ((FormCode2Page(FormID) = '01') and (GetDocDir_Page(ScanCaseno,ScanDocDir)>0)) or (ScanDocDir = '') then |
| | | begin |
| | | ScanInfo.ImageCount := 0; |
| | | ScanDocDir := DocNo2DocNoDir(ImageSavePath + ScanCaseno+'\',DocNo); |
| | | end; |
| | | end; |
| | | end |
| | | Else //¤£¤À¥÷¼Æ |
| | | Else //不分份數 |
| | | begin |
| | | if DocNo <> '' then |
| | | ScanDocDir := DocNo |
| | | else //Attach ªþ¥ó |
| | | else //Attach 附件 |
| | | ScanDocDir := DocNo2DocNoDir(ImageSavePath + ScanCaseno+'\',DocNo); |
| | | end; |
| | | if FirstDocDir = '' Then |
| | |
| | | |
| | | ScanSaveFilename := FormID; |
| | | Str2Dir(ScanPath); |
| | | if ScanSaveFilename = '' then //ªþ¥ó |
| | | if ScanSaveFilename = '' then //附件 |
| | | ScanSaveFilename:= Add_Zoo(GetDocDir_Page(ScanCaseno,ScanDocdir)+1,3)+ext |
| | | Else |
| | | ScanSaveFilename := Add_Zoo(GetDocDir_Page(ScanCaseno,ScanDocdir)+1,3)+'_'+ScanSaveFilename+ext; |
| | |
| | | begin |
| | | BarStr := BarStr + MpsBarCodeinf.Text[i]; |
| | | end; |
| | | Showmessage(_Msg('¿ëÃѨ쪺BarCode:')+#13+BarStr); |
| | | Showmessage(_Msg('辨識到的BarCode:')+#13+BarStr); |
| | | end; |
| | | end; |
| | | smRTS: |
| | |
| | | IIS_File2Web.S_LicEnName := SFileName; |
| | | IIS_File2Web.V_LicEnName := VFileName; |
| | | |
| | | /////¤U¸üMPSLIC_SCAN.lic ////// |
| | | /////下載MPSLIC_SCAN.lic ////// |
| | | EnCodeDateTime := En_DecryptionStr_Base64('E',ServerDate+GetBalance2Time(Balance),Mpskey); |
| | | |
| | | |
| | |
| | | SendData:='data='+HTTPEncode(UTF8Encode(FData))+'&verify='+FVerify+'&work_no=PLN&file=MPSLIC_SCAN.lic'; |
| | | if not dnFile_Get(HTTPSClient,Furl,'service/imgpsc/IMGPSC04/sample',SendData,LngPath+SFileName,FReWrite,Memo1,False,DownImgStatus) then |
| | | begin |
| | | Showmessage(_Msg('Àˬdµù¥UÀÉ®×®É,ºô¸ôµo¥Í¿ù»~!!')+_Msg('¿ù»~¥N½X:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason); |
| | | Showmessage(_Msg('檢查註冊檔案時,網路發生錯誤!!')+_Msg('錯誤代碼:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason); |
| | | Exit; |
| | | end; |
| | | /////¤U¸üMPSLIC_SCAN.lic ///// |
| | | /////下載MPSLIC_SCAN.lic ///// |
| | | |
| | | /////¤U¸üMPSLIC_VIEW.lic ////// |
| | | /////下載MPSLIC_VIEW.lic ////// |
| | | EnCodeDateTime := En_DecryptionStr_Base64('E',ServerDate+GetBalance2Time(Balance),Mpskey); |
| | | //SendData := 'checktime='+EnCodeDateTime+'&workno=CW&formid=MPSLIC_VIEW.lic'+'&mode=sample'; //³o¸Ì§ï¦¨¥²¶ÇCW 20121212 |
| | | //SendData := 'checktime='+EnCodeDateTime+'&workno=CW&formid=MPSLIC_VIEW.lic'+'&mode=sample'; //這裡改成必傳CW 20121212 |
| | | //if not dnFile(HTTPSClient,Furl,'service/slic/SLIC04/sample',SendData,LngPath+VFileName,FReWrite,Memo1,False,DownImgStatus) then |
| | | SendData:='data='+HTTPEncode(UTF8Encode(FData))+'&verify='+FVerify+'&work_no=PLN&file=MPSLIC_VIEW.lic'; |
| | | if not dnFile_Get(HTTPSClient,Furl,'service/imgpsc/IMGPSC04/sample',SendData,LngPath+VFileName,FReWrite,Memo1,False,DownImgStatus) then |
| | | begin |
| | | Showmessage(_Msg('Àˬdµù¥UÀÉ®×®É,ºô¸ôµo¥Í¿ù»~!!')+_Msg('¿ù»~¥N½X:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason); |
| | | Showmessage(_Msg('檢查註冊檔案時,網路發生錯誤!!')+_Msg('錯誤代碼:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason); |
| | | Exit; |
| | | end; |
| | | /////¤U¸üMPSLIC_VIEW.lic ///// |
| | | /////下載MPSLIC_VIEW.lic ///// |
| | | |
| | | ////À£zip///// |
| | | ////壓zip///// |
| | | S := TStringlist.Create; |
| | | try |
| | | S.Add(En_DecryptionStr_Base64('E',GetDate,'9338430')); |
| | |
| | | DeleteFile(LngPath+VFileName); |
| | | DeleteFile(LngPath+'mps.dat'); |
| | | end; |
| | | ////À£zip////// |
| | | Showmessage('¶×¥X§¹¦¨,¶×¥XÀÉ®×:'+LngPath+'mps.zip'); |
| | | ////壓zip////// |
| | | Showmessage('匯出完成,匯出檔案:'+LngPath+'mps.zip'); |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.ImportBtClick(Sender: TObject); |
| | |
| | | |
| | | str2dir(ZipPath); |
| | | if not ExecuteUnZip_Pwd(OpenDialog1.FileName,ZipPath,False,'9338430') then |
| | | Showmessage('µLªk¸ÑÀ£ÁY'); |
| | | Showmessage('無法解壓縮'); |
| | | if not FileExists(ZipPath+'mps.dat') then |
| | | begin |
| | | Showmessage('®æ¦¡¤£²Å,µLªk¶×¤J'); |
| | | Showmessage('格式不符,無法匯入'); |
| | | Exit; |
| | | end; |
| | | S.LoadFromFile(ZipPath+'mps.dat'); |
| | | if (En_DecryptionStr_Base64('D',S.Strings[0],'9338430')<> ServerDate) then |
| | | begin |
| | | Showmessage('ÀÉ®×¹L´Á,µLªk¶×¤J'); |
| | | Showmessage('檔案過期,無法匯入'); |
| | | Exit; |
| | | end; |
| | | |
| | |
| | | RenameFile(ZipPath+S.Strings[i],ZipPath+LicName); |
| | | if (LicName = 'MPSLIC_SCAN.lic') or (LicName = 'MPSLIC_VIEW.lic') then |
| | | |
| | | /////¤W¶ÇMPSLICXXXX.lic //// |
| | | /////上傳MPSLICXXXX.lic //// |
| | | //if not upFile(HTTPSClient,FUrl,'servlet/CWC04','formid='+LicName+'@workno=CW@mode=sample','file',ZipPath+LicName,FReWrite,Memo1,False) then |
| | | //begin |
| | | SendData := 'data='+HTTPEncode(UTF8Encode(FData))+'&verify='+FVerify+'&work_no=PLN&file_name='+LicName; |
| | | if not upFile(HTTPSClient,FUrl,'service/imgpsc/IMGPSC02/sample',SendData,'file',ZipPath+LicName,FReWrite,Memo1,False) then |
| | | begin |
| | | Showmessage(_Msg('Àˬdµù¥U®É,ºô¸ôµo¥Í¿ù»~!!')+_MSg('¿ù»~¥N½X:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason+')'); |
| | | Showmessage(_Msg('檢查註冊時,網路發生錯誤!!')+_MSg('錯誤代碼:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason+')'); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | if memo1.Lines.Strings[0] = '1' then |
| | | begin |
| | | Showmessage(_Msg('Àˬdµù¥U®É,ºô¸ôµo¥Í¿ù»~!!')+_Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]); |
| | | Showmessage(_Msg('檢查註冊時,網路發生錯誤!!')+_Msg('錯誤原因:')+memo1.Lines.Strings[1]); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | Showmessage(_Msg('Àˬdµù¥U®É,ºô¸ôµo¥Í¿ù»~!!')+_Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J')); |
| | | Showmessage(_Msg('檢查註冊時,網路發生錯誤!!')+_Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入')); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | /////¤W¶ÇMPSLICXXXX.lic ///// |
| | | /////上傳MPSLICXXXX.lic ///// |
| | | end; |
| | | end; |
| | | Finally |
| | |
| | | S.Free; |
| | | _DelTree(ZipPath); |
| | | end; |
| | | Showmessage('¶×¤J§¹¦¨'); |
| | | Showmessage('匯入完成'); |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.HotKeyDown (var Msg : TMessage); |
| | |
| | | NowForm := TForm(Sender); |
| | | |
| | | FormName := NowForm.Name; |
| | | IISUnit.IIS_LngfileName := LngPath+'Language.Lng'; //µ¹IISUnit Âà¦h°ê»y¨¥¦r¦ê¥Î |
| | | IISUnit.IIS_LngfileName := LngPath+'Language.Lng'; //給IISUnit 轉多國語言字串用 |
| | | if FLanguage = '' then |
| | | FLanguage := 'zh_tw'; |
| | | IISUnit.IIS_NowLng := FLanguage; |
| | |
| | | TForm(NowForm).Caption := ini.ReadString(FLanguage,FormName+'.FormTitle',''); |
| | | for i := 0 to NowForm.ComponentCount - 1 do |
| | | begin |
| | | //ShowMessage(NowForm.Components[i].Name); |
| | | if NowForm.Components[i] is TButton then |
| | | begin |
| | | TButton(NowForm.Components[i]).Caption := ini.ReadString(FLanguage,FormName+'.'+TButton(NowForm.Components[i]).Name,''); |
| | |
| | | W,H : Integer; |
| | | begin |
| | | Result := 0; |
| | | //ShowMessage('GetSiteOMR'); |
| | | |
| | | IF (ImageScrollBox1.FileName <> FileName) and (FileName <> '') then |
| | | begin |
| | | //ShowMessage('11111'+ImageScrollBox1.FileName+#10#13+FileName); |
| | | ImageScrollBox1.LoadFromFile(FileName,1); |
| | | FindPoint(ImageScrollBox1.Graphic,UpLPoint,UpRPoint,DownLPoint,'NONE'); |
| | | { |
| | | ShowMessage('UpLPoint='+IntToStr(UpLPoint.X)+','+IntToStr(UpLPoint.Y)+#10#13+ |
| | | 'UpRPoint='+IntToStr(UpRPoint.X)+','+IntToStr(UpRPoint.Y)+#10#13+ |
| | | 'DownLPoint='+IntToStr(DownLPoint.X)+','+IntToStr(DownLPoint.Y)+#10#13+ |
| | | 'DownRPoint='+IntToStr(DownRPoint.X)+','+IntToStr(DownRPoint.Y)); |
| | | FindPoint(ImageScrollBox1.Graphic,UpLPoint,UpRPoint,DownLPoint,''); |
| | | ShowMessage('UpLPoint='+IntToStr(UpLPoint.X)+','+IntToStr(UpLPoint.Y)+#10#13+ |
| | | 'UpRPoint='+IntToStr(UpRPoint.X)+','+IntToStr(UpRPoint.Y)+#10#13+ |
| | | 'DownLPoint='+IntToStr(DownLPoint.X)+','+IntToStr(DownLPoint.Y)+#10#13+ |
| | | 'DownRPoint='+IntToStr(DownRPoint.X)+','+IntToStr(DownRPoint.Y)); |
| | | } |
| | | ClearLine(ISB_BW.Graphic,bt); |
| | | ISB_BW.Redraw(True); |
| | | Application.ProcessMessages; |
| | | end; |
| | | If ImageScrollBox1.FileName <> '' Then |
| | | begin |
| | | |
| | | //ShowMessage('22222'+ImageScrollBox1.FileName); |
| | | Xdpi := ImagescrollBox1.Graphic.XDotsPerInch; |
| | | Ydpi := ImagescrollBox1.Graphic.YDotsPerInch; |
| | | H := ImageScrollBox1.Graphic.Height; |
| | | W := ImageScrollBox1.Graphic.Width; |
| | | //ShowMessage('Xdpi='+IntToStr(Xdpi)+#10#13+'Ydpi='+IntToStr(Ydpi)+#10#13+'H='+IntToStr(H)+#10#13+'W='+IntToStr(W)+#10#13); |
| | | //ShowMessage('Site='+Site); |
| | | OMRRect := CM_Str2Rect(Site,Xdpi,UpLPoint); |
| | | //ShowMessage(IntToStr(OMRRect.Left)+#10#13+IntToStr(OMRRect.top)+#10#13+IntToStr(OMRRect.Right)+#10#13+IntToStr(OMRRect.Bottom)); |
| | | if OMRRect.Left < 0 then |
| | | OMRRect.Left := 0; |
| | | if OMRRect.Top < 0 then |
| | |
| | | OMRRect.Bottom := ImageScrollBox1.Graphic.Height; |
| | | |
| | | result := Get_OMR(ISB_BW.Graphic,OMRRect); |
| | | //ShowMessage('result='+IntToStr(result)); |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FindISB2View(Vmode:Integer):TImageScrollBox; //§äªÅªºISB¨ÓÅã¥Ü |
| | | Function TCB_IMGPSScanX.FindISB2View(Vmode:Integer):TImageScrollBox; //找空的ISB來顯示 |
| | | var |
| | | i,n : Integer; |
| | | ISB : TImageScrollBox; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.R_W_Scanini(Mode:Char); //'R'Ū¨ú;'W'¼g¤J |
| | | Procedure TCB_IMGPSScanX.R_W_Scanini(Mode:Char); //'R'讀取;'W'寫入 |
| | | var |
| | | ini : Tinifile; |
| | | begin |
| | |
| | | DeviceDeleteSize := ini.ReadInteger('DeviceDelete','Size_New',Def_DeviceDeleteSize); |
| | | ScannerReverse := ini.ReadBool('Scanner','Reverse',Def_ScannerReverse); |
| | | BoardClear := ini.ReadBool('Scanner','BoardClear',Def_BoardClear); |
| | | ScanDpi := ini.ReadInteger('Scanner','Dpi',Def_ScanDpi); |
| | | //ScanDpi := ini.ReadInteger('Scanner','Dpi',Def_ScanDpi); |
| | | //ScanDuplex := ini.ReadBool('Scanner','Duplex',Def_ScanDuplex); |
| | | ScanRotate := ini.ReadInteger('Scanner','ScanRotate',Def_ScanRotate); |
| | | ScanDeskew := ini.ReadBool('Scanner','ScanDeskew',Def_ScanDeskew); |
| | | ScanBright := ini.ReadInteger('Scanner','ScanBright',Def_ScanBright); |
| | | ScanContrast := ini.ReadInteger('Scanner','ScanContrast',Def_ScanContrast); |
| | | ScanImgShowMode := ini.ReadInteger('Scanner','ScanImgShowMode',Def_ScanImgShowMode); |
| | | ScanImgSetUse := ini.ReadBool('Scanner','ScanImgSetUse',Def_ScanImgSetUse); //20101110 BA»¡±½ºË¾¹¼t°Ó¦³½Õ³]©wn·s¼W¦¹¿ï¶µ¬O§_±Ò°Ê |
| | | ScanImgSetUse := ini.ReadBool('Scanner','ScanImgSetUse',Def_ScanImgSetUse); //20101110 BA說掃瞄器廠商有調設定要新增此選項是否啟動 |
| | | end; |
| | | 'W':begin |
| | | ini.WriteBool('DeviceDelete','Mode',DeviceDelete); |
| | | ini.WriteInteger('DeviceDelete','Size_New',DeviceDeleteSize); |
| | | ini.WriteBool('Scanner','Reverse',ScannerReverse); |
| | | ini.WriteBool('Scanner','BoardClear',BoardClear); |
| | | ini.ReadInteger('Scanner','Dpi',ScanDpi); |
| | | //ini.ReadInteger('Scanner','Dpi',ScanDpi); |
| | | //ini.WriteBool('Scanner','Duplex',ScanDuplex); |
| | | ini.WriteInteger('Scanner','ScanRotate',ScanRotate); |
| | | ini.WriteBool('Scanner','ScanDeskew',ScanDeskew); |
| | | ini.WriteInteger('Scanner','ScanBright',ScanBright); |
| | | ini.WriteInteger('Scanner','ScanContrast',ScanContrast); |
| | | ini.WriteInteger('Scanner','ScanImgShowMode',ScanImgShowMode); |
| | | ini.WriteBool('Scanner','ScanImgSetUse',ScanImgSetUse); //20101110 BA»¡±½ºË¾¹¼t°Ó¦³½Õ³]©wn·s¼W¦¹¿ï¶µ¬O§_±Ò°Ê |
| | | ini.WriteBool('Scanner','ScanImgSetUse',ScanImgSetUse); //20101110 BA說掃瞄器廠商有調設定要新增此選項是否啟動 |
| | | end; |
| | | end; |
| | | |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.GetDefScanIni; //¨ú±o±½ºËªº¹w³]È |
| | | Procedure TCB_IMGPSScanX.GetDefScanIni; //取得掃瞄的預設值 |
| | | var |
| | | i : Integer; |
| | | PARA_NO,PARA_CONTENT: String; |
| | | begin |
| | | Def_DeviceDelete := True; |
| | | Def_DeviceDeleteSize := 3072; //20120821 §ï¦¨3000(¥X²{) |
| | | Def_DeviceDeleteSize := 3072; //20120821 改成3000(出現) |
| | | Def_ScannerReverse := False; |
| | | Def_BoardClear := False; |
| | | Def_ScanDpi := 300; |
| | |
| | | |
| | | for i := 0 to WORK_INF_List.Count - 1 do |
| | | begin |
| | | IF GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_BLANKDEL_USE' Then //ªÅ¥Õ¶±Ò°Ê |
| | | IF GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_BLANKDEL_USE' Then //空白頁啟動 |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | if UpperCase(PARA_CONTENT) ='Y' then |
| | |
| | | Else |
| | | Def_DeviceDelete := False; |
| | | end |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_BLANKDEL_SIZE' Then //ªÅ¥Õ¶Size |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_BLANKDEL_SIZE' Then //空白頁Size |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | if PARA_CONTENT = '' then |
| | |
| | | Def_DeviceDeleteSize := Strtoint(PARA_CONTENT); |
| | | |
| | | end |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_REVERSE' Then //¬O§_»Ý¤Ï¬Û |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_REVERSE' Then //是否需反相 |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | if UpperCase(PARA_CONTENT) ='Y' then |
| | |
| | | Else |
| | | Def_ScannerReverse := False; |
| | | end |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_BOARDCLEAR' Then //¬O§_²M¶ÂÃä |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_BOARDCLEAR' Then //是否清黑邊 |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | if UpperCase(PARA_CONTENT) ='Y' then |
| | |
| | | Else |
| | | Def_BoardClear := False; |
| | | end |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_DPI' Then //±½ºËDPI |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_DPI' Then //掃瞄DPI |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | if PARA_CONTENT = '' then |
| | |
| | | else |
| | | Def_ScanDpi := Strtoint(PARA_CONTENT); |
| | | end |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_DUPLEX' Then //¬O§_Âù±±½ºË |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_DUPLEX' Then //是否雙面掃瞄 |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | if UpperCase(PARA_CONTENT) ='Y' then |
| | |
| | | Def_ScanDuplex := False; |
| | | |
| | | end |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_ROTATE_MODE' Then //±½ºË®É±ÛÂਤ«× |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_ROTATE_MODE' Then //掃瞄時旋轉角度 |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | if PARA_CONTENT = '0' then |
| | |
| | | Else |
| | | Def_ScanRotate := 0; |
| | | end |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_DESKEW' Then //¬O§_¶É±×ÁB¥¿ |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_DESKEW' Then //是否傾斜矯正 |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | if UpperCase(PARA_CONTENT) ='Y' then |
| | |
| | | Else |
| | | Def_ScanDeskew := False; |
| | | end |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_IMGSET_USE' Then //¬O§_¨Ï¥Î«G«×¹ï¤ñ³]©w |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_IMGSET_USE' Then //是否使用亮度對比設定 |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | if UpperCase(PARA_CONTENT) ='Y' then |
| | |
| | | else |
| | | Def_ScanImgSetUse := False; |
| | | end |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_BRIGHT' Then //«G«× |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_BRIGHT' Then //亮度 |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | if PARA_CONTENT ='' then |
| | |
| | | Def_ScanBright := 0; |
| | | |
| | | end |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_CONTRAST' Then //¹ï¤ñ |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_CONTRAST' Then //對比 |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | if PARA_CONTENT ='' then |
| | |
| | | Else |
| | | Def_ScanImgShowMode := 0; |
| | | end |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'CASE_IN_TIME' Then //¨ú¶i¥óºI¤î®É¶¡ |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'CASE_IN_TIME' Then //取進件截止時間 |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | ScanDenialTime := PARA_CONTENT; |
| | | end |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_HINT' Then //±½´y´£¥Ü¦r¦ê |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'SCAN_HINT' Then //掃描提示字串 |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | ScanDenialHint := PARA_CONTENT; |
| | | end |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'NO_SAVE_FORM_ID' Then //±½´y¤£¦sÀɤ§ªí³æ¥N¸¹ |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'NO_SAVE_FORM_ID' Then //掃描不存檔之表單代號 |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | NoSaveBarCodeList.CommaText := PARA_CONTENT; |
| | | end |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'LOCAL_PATH' Then //¥»¾÷ºÝ¸ô®| |
| | | Else if GetSQLData(WORK_INF_List,'PARA_NO',i) = 'LOCAL_PATH' Then //本機端路徑 |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | ImagePath:= PARA_CONTENT; |
| | | end |
| | | Else if UpperCase(GetSQLData(WORK_INF_List,'PARA_NO',i)) = 'GUIDEFORMID' Then //·í¾É¤Þ¶ªºªí³æ |
| | | Else if UpperCase(GetSQLData(WORK_INF_List,'PARA_NO',i)) = 'GUIDEFORMID' Then //當導引頁的表單 |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | GuideFormIDList.CommaText := PARA_CONTENT; |
| | | end |
| | | Else if UpperCase(GetSQLData(WORK_INF_List,'PARA_NO',i)) = 'DIVPAGEFORMID' Then //當分案頁的表單 |
| | | begin |
| | | PARA_CONTENT := GetSQLData(WORK_INF_List,'PARA_CONTENT',i); |
| | | DivPageFormIDList.CommaText := PARA_CONTENT; |
| | | end; |
| | | end; |
| | | ScanDuplex := Def_ScanDuplex; |
| | |
| | | Result := False; // http://192.168.0.101:8080/fbnp/servlet/CWC01?act=getservertime |
| | | If not ProcessServlet_Get(HTTPSClient,FURL+'service/imgpsc/IMGPSC01/servertimeforocx','',FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | IF memo1.Lines.Strings[0] = '1' Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]; |
| | | HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | | Result := False; |
| | | Exit; |
| | | end |
| | |
| | | ServerDate := memo1.Lines.Strings[1]; |
| | | ServerTime := Copy(ServerDate,9,6); |
| | | ServerDate := Copy(ServerDate,1,8); |
| | | Balance := GetBalance(ServerTime); //Server ¸òLocalªº®É¶¡®t |
| | | Balance := GetBalance(ServerTime); //Server 跟Local的時間差 |
| | | Result := True; |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J'); |
| | | HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetSetInf1 : Boolean; //¨ú¨t²Î³]©w¸ê°TMode1 DOC_INF |
| | | Function TCB_IMGPSScanX.GetSampleInf : Boolean; |
| | | var |
| | | str:String; |
| | | begin |
| | | Result := False; |
| | | If not ProcessServlet_Get(HTTPSClient,FURL+'service/imgpsc/IMGPSC01/serversampleforocx','work_no='+FWork_no,FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | IF memo1.Lines.Strings[0] = '1' Then |
| | | begin |
| | | HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | | Result := False; |
| | | Exit; |
| | | end |
| | | Else IF memo1.Lines.Strings[0] = '0' Then |
| | | begin |
| | | str := memo1.Lines.Strings[1]; |
| | | SampleFormIDList.CommaText:=str; |
| | | |
| | | Result := True; |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetSetInf1 : Boolean; //取系統設定資訊Mode1 DOC_INF |
| | | Var |
| | | ColumeStr : String; |
| | | S : TStringlist; |
| | |
| | | |
| | | If not ProcessServlet_Get(HTTPSClient,FURL+'service/imgpsc/IMGPSC01/tables','checktime='+EnCodeDateTime+'&mode=1&col='+En_DecryptionStr_Base64('E',ColumeStr,Mpskey)+'&work_no='+FWork_No,FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | |
| | | IF memo1.Lines.Strings[0] = '1' Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]; |
| | | HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | | Result := False; |
| | | Exit; |
| | | end |
| | |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J'); |
| | | HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetSetInf2 : Boolean; //¨ú¨t²Î³]©w¸ê°TMode2 DM_FORM_INF |
| | | Function TCB_IMGPSScanX.GetSetInf2 : Boolean; //取系統設定資訊Mode2 DM_FORM_INF |
| | | var |
| | | ColumeStr : String; |
| | | S : TStringlist; |
| | |
| | | //If not ProcessServlet(HTTPSClient,FURL+'servlet/CWC02 ','checktime='+EnCodeDateTime+'&mode=2&col='+ColumeStr+'&workno='+FWork_No,FReWrite.Text,Memo1) Then |
| | | If not ProcessServlet_Get(HTTPSClient,FURL+'service/imgpsc/IMGPSC01/tables','checktime='+EnCodeDateTime+'&mode=2&col='+En_DecryptionStr_Base64('E',ColumeStr,Mpskey)+'&work_no='+FWork_No,FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | IF memo1.Lines.Strings[0] = '1' Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]; |
| | | HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | | Result := False; |
| | | Exit; |
| | | end |
| | |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J'); |
| | | HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetSetInf3 : Boolean; //¨ú¨t²Î³]©w¸ê°Tmode3 FORM_INF |
| | | Function TCB_IMGPSScanX.GetSetInf3 : Boolean; //取系統設定資訊mode3 FORM_INF |
| | | var |
| | | ColumeStr : String; |
| | | S : TStringlist; |
| | |
| | | //If not ProcessServlet(HTTPSClient,FURL+'servlet/CWC02 ','checktime='+EnCodeDateTime+'&mode=3&col='+ColumeStr+'&workno='+FWork_No,FReWrite.Text,Memo1) Then |
| | | If not ProcessServlet_Get(HTTPSClient,FURL+'service/imgpsc/IMGPSC01/tables','checktime='+EnCodeDateTime+'&mode=3&col='+En_DecryptionStr_Base64('E',ColumeStr,Mpskey)+'&work_no='+FWork_No,FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | IF memo1.Lines.Strings[0] = '1' Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]; |
| | | HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | | Result := False; |
| | | Exit; |
| | | end |
| | |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J'); |
| | | HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetSetInf4 : Boolean; //¨ú¨t²Î³]©w¸ê°Tmode4 CHECK_RULE_INF |
| | | Function TCB_IMGPSScanX.GetSetInf4 : Boolean; //取系統設定資訊mode4 CHECK_RULE_INF |
| | | var |
| | | ColumeStr : String; |
| | | S : TStringlist; |
| | |
| | | //If not ProcessServlet(HTTPSClient,FURL+'servlet/CWC02 ','checktime='+EnCodeDateTime+'&mode=4&col='+ColumeStr+'&workno='+FWork_No,FReWrite.Text,Memo1) Then |
| | | If not ProcessServlet_Get(HTTPSClient,FURL+'service/imgpsc/IMGPSC01/tables','checktime='+EnCodeDateTime+'&mode=4&col='+En_DecryptionStr_Base64('E',ColumeStr,Mpskey)+'&work_no='+FWork_No,FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | IF memo1.Lines.Strings[0] = '1' Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]; |
| | | HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | | Result := False; |
| | | Exit; |
| | | end |
| | |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J'); |
| | | HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | CheckRule2OMRErrInfo; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetSetInf5 : Boolean; //¨ú¨t²Î³]©w¸ê°Tmode5 MEMO_INF |
| | | Function TCB_IMGPSScanX.GetSetInf5 : Boolean; //取系統設定資訊mode5 MEMO_INF |
| | | var |
| | | ColumeStr : String; |
| | | S : TStringlist; |
| | |
| | | //If not ProcessServlet(HTTPSClient,FURL+'servlet/CWC02 ','checktime='+EnCodeDateTime+'&mode=5&col='+ColumeStr+'&workno='+FWork_No,FReWrite.Text,Memo1) Then |
| | | If not ProcessServlet_Get(HTTPSClient,FURL+'service/imgpsc/IMGPSC01/tables','checktime='+EnCodeDateTime+'&mode=5&col='+En_DecryptionStr_Base64('E',ColumeStr,Mpskey)+'&work_no='+FWork_No,FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | IF memo1.Lines.Strings[0] = '1' Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]; |
| | | HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | | Result := False; |
| | | Exit; |
| | | end |
| | |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J'); |
| | | HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetSetInf6 : Boolean; //¨ú¨t²Î³]©w¸ê°Tmode5 WORK_INF |
| | | Function TCB_IMGPSScanX.GetSetInf6 : Boolean; //取系統設定資訊mode5 WORK_INF |
| | | var |
| | | ColumeStr : String; |
| | | S : TStringlist; |
| | |
| | | //If not ProcessServlet(HTTPSClient,FURL+'servlet/CWC02 ','checktime='+EnCodeDateTime+'&mode=5&col='+ColumeStr+'&workno='+FWork_No,FReWrite.Text,Memo1) Then |
| | | If not ProcessServlet_Get(HTTPSClient,FURL+'service/imgpsc/IMGPSC01/tables','checktime='+EnCodeDateTime+'&mode=6&col='+En_DecryptionStr_Base64('E',ColumeStr,Mpskey)+'&work_no='+FWork_No,FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | IF memo1.Lines.Strings[0] = '1' Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]; |
| | | HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | | Result := False; |
| | | Exit; |
| | | end |
| | |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J'); |
| | | HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetSetInf7 : Boolean; //¨ú¨t²Î³]©w¸ê°Tmode5 LASTEST_FORM_INF |
| | | Function TCB_IMGPSScanX.GetSetInf7 : Boolean; //取系統設定資訊mode5 LASTEST_FORM_INF |
| | | var |
| | | ColumeStr : String; |
| | | S : TStringlist; |
| | |
| | | //If not ProcessServlet(HTTPSClient,FURL+'servlet/CWC02 ','checktime='+EnCodeDateTime+'&mode=5&col='+ColumeStr+'&workno='+FWork_No,FReWrite.Text,Memo1) Then |
| | | If not ProcessServlet_Get(HTTPSClient,FURL+'service/imgpsc/IMGPSC01/tables','checktime='+EnCodeDateTime+'&mode=7&col='+En_DecryptionStr_Base64('E',ColumeStr,Mpskey)+'&work_no='+FWork_No,FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | IF memo1.Lines.Strings[0] = '1' Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]; |
| | | HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | | Result := False; |
| | | Exit; |
| | | end |
| | |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J'); |
| | | HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.SetFormID_DocNo; //±NFormID¤ÎDocno©â¥X¨Ó¥t¦s¤Jlist¸Ì 20130403¼W¥[ |
| | | Procedure TCB_IMGPSScanX.SetFormID_DocNo; //將FormID及Docno抽出來另存入list裡 20130403增加 |
| | | var |
| | | i : Integer; |
| | | begin |
| | |
| | | |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.SetIn_WH_DocNo; //±Nn¤J®wªºDocNo©â¥X¨Ó¥t¦s¤Jlist¸Ì |
| | | Procedure TCB_IMGPSScanX.SetIn_WH_DocNo; //將要入庫的DocNo抽出來另存入list裡 |
| | | var |
| | | i : Integer; |
| | | begin |
| | |
| | | StringtoFile(IN_WH_DocNoList.Text,'D:\121.txt');} |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.CheckRule2OMRErrInfo; //ÀˮֳW«h¶ñ¤JOMRErrINFo Record |
| | | Procedure TCB_IMGPSScanX.CheckRule2OMRErrInfo; //檢核規則填入OMRErrINFo Record |
| | | var i : Integer; |
| | | CheckNo : String; |
| | | begin |
| | |
| | | if FindSQLData(CHECK_RULE_INF_List,'MESG_SHOW_TYPE,MESG_DISP_TYPE,CHECK_MESG,SCAN_MODE','CHECK_NO',CheckNo,0,FindResult) then |
| | | begin |
| | | if GetFindResult('MESG_SHOW_TYPE') = '1' then |
| | | OMRErrInfo[i].Display := True //Åã¥Ü |
| | | OMRErrInfo[i].Display := True //顯示 |
| | | Else if GetFindResult('MESG_SHOW_TYPE') = '2' then |
| | | OMRErrInfo[i].Display := False; //¤£Åã¥Ü |
| | | OMRErrInfo[i].Display := False; //不顯示 |
| | | |
| | | if GetFindResult('MESG_DISP_TYPE') = '1' then |
| | | OMRErrInfo[i].Ignore := True //¥i©¿²¤ |
| | | OMRErrInfo[i].Ignore := True //可忽略 |
| | | Else if GetFindResult('MESG_DISP_TYPE') = '2' then |
| | | OMRErrInfo[i].Ignore := False; //¤£¥i©¿²¤ |
| | | OMRErrInfo[i].Ignore := False; //不可忽略 |
| | | |
| | | OMRErrInfo[i].Info := GetFindResult('CHECK_MESG'); |
| | | OMRErrInfo[i].Mode := GetFindResult('SCAN_MODE'); |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.DeleteImageFile(Path,FileName,CaseID:String); // §R°£ÀÉ®× (µLªk±o¨ìDocDir¥Î) |
| | | Procedure TCB_IMGPSScanX.DeleteImageFile(Path,FileName,CaseID:String); // 刪除檔案 (無法得到DocDir用) |
| | | var |
| | | i : Integer; |
| | | FileList:TStringlist; |
| | |
| | | end;} |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.DeleteFormCodeFile(CaseID,DocDir,FormID:String); //§R°£«ü©wFormID¤å¥ó |
| | | Procedure TCB_IMGPSScanX.DeleteFormCodeFile(CaseID,DocDir,FormID:String); //刪除指定FormID文件 |
| | | var |
| | | i: Integer; |
| | | FileList : TStringlist; |
| | |
| | | {for i := ContextList.Count - 1 downto 0 do |
| | | begin |
| | | FName := ContextList.Strings[i]; |
| | | if FormID = 'Err' then //§R¥¼µù¥U¤å¥ó |
| | | if FormID = 'Err' then //刪未註冊文件 |
| | | begin |
| | | If not FormIDExists(FileName2FormCode(FName),False,0) Then |
| | | begin |
| | |
| | | ReSortFileName(Path); } |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.DeleteDocNoFile(Path,DocNo:String):Boolean; //§R°£«ü©wDocNo¤å¥ó |
| | | Function TCB_IMGPSScanX.DeleteDocNoFile(Path,DocNo:String):Boolean; //刪除指定DocNo文件 |
| | | var |
| | | i: Integer; |
| | | FName : String; |
| | |
| | | DeleteFile(Path+FName); |
| | | ContextList.Delete(i); |
| | | Context_DocnoList.Delete(i); |
| | | Result := True; //¦³§R¨ì«ü©w¤å¥ó |
| | | Result := True; //有刪到指定文件 |
| | | end; |
| | | end; |
| | | ContextList.SaveToFile(Path+'Context.dat'); |
| | |
| | | Cust_DocNoList.LoadFromFile(Path+'CustomDocNo.dat'); |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.DeleteShowFile(Path:String); //§R°£Åã¥Ü¤¤ªº¼v¹³ |
| | | Procedure TCB_IMGPSScanX.DeleteShowFile(Path:String); //刪除顯示中的影像 |
| | | var |
| | | i : Integer; |
| | | DelFile : String; |
| | |
| | | |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetDataDocNoPage(MainDocNo,MainVersion:String):Integer; //¨ú°O¿ýªº¤å¥ó_ª©¥»¶¼Æ |
| | | Function TCB_IMGPSScanX.GetDataDocNoPage(MainDocNo,MainVersion:String):Integer; //取記錄的文件_版本頁數 |
| | | var |
| | | P : String; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CheckCaseDocNoPage(CaseID,DocNo,Version:String;Pages:Integer):Integer; //¨ú®×¥ó¸Ìªº¤å¥ó_ª©¥»¶¼Æ |
| | | Function TCB_IMGPSScanX.CheckCaseDocNoPage(CaseID,DocNo,Version:String;Pages:Integer):Integer; //取案件裡的文件_版本頁數 |
| | | var |
| | | i,n,Count : integer; |
| | | S : TStringlist; |
| | | FormCode,iPage : String; |
| | | begin |
| | | Count := 1; |
| | | Count := 0; |
| | | S := TStringlist.Create; |
| | | try |
| | | S.LoadFromFile(ImageSavePath+CaseID+'\upload\Context.dat'); |
| | | for I := 0 to pages-1 do |
| | | for I := 1 to pages do //從0到pages-1 改成 1到pages 20170316 這樣可以修改檢核的頁數問題 |
| | | begin |
| | | iPage := Add_Zoo(i,2); |
| | | for n := 0 to S.Count - 1 do |
| | | begin |
| | | FormCode := FileName2FormCode(S.Strings[n]); |
| | | //Showmessage('1:'+version+','+FormCode2Version(FormCode)+','+DocNo+','+FormCode2DocNo(FormCode)+','+iPage+','+FormCode2Page(FormCode)); |
| | | //Showmessage('1:'+version+','+FormCode2Version(FormCode)+','+DocNo+','+FormCode2DocNo(FormCode)+','+iPage+','+FormCode2Page(FormCode)); |
| | | if (version = FormCode2Version(FormCode)) and (DocNo = FormCode2DocNo(FormCode)) and (ipage = FormCode2Page(FormCode)) then |
| | | begin |
| | | //Showmessage(inttostr(Count+1)); |
| | | //Showmessage(version+','+DocNo+',iPage='+iPage); |
| | | //Showmessage(inttostr(Count+1)); |
| | | Inc(Count); |
| | | Break; //§ä¨ì¤F...Â÷¶} |
| | | Break; //找到了...離開 |
| | | end; |
| | | end; |
| | | end; |
| | |
| | | Result := Count; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FindFormCodePages(CaseID,FormCode:String):Integer; //pºâ®×¥ó¸ÌFormIDªº¶¼Æ |
| | | Function TCB_IMGPSScanX.FindFormCodePages(CaseID,FormCode:String):Integer; //計算案件裡FormID的頁數 |
| | | var |
| | | i,Count : integer; |
| | | S : TStringlist; |
| | |
| | | Result := Count; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetDataFormCodePages(FormCode:String):Integer; //¨ú°O¿ýªºFormcIDªº¶¼Æ |
| | | Function TCB_IMGPSScanX.GetDataFormCodePages(FormCode:String):Integer; //取記錄的FormcID的頁數 |
| | | begin |
| | | If FindSQLData(FORM_INF_List,'T1.MAX_PAGE','T1.FORM_ID',FormCode,0,FindResult) Then |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.CaseReSize(CaseID:String); //®×¥óªº¼v¹³ÁY©ñ |
| | | Procedure TCB_IMGPSScanX.CaseReSize(CaseID:String); //案件的影像縮放 |
| | | var |
| | | S : TStringlist; |
| | | FileName : String; |
| | |
| | | For i := 0 to S.Count -1 do |
| | | begin |
| | | FileName := S.Strings[i]; |
| | | ImageReSize(CaseID,FileName); //¨Ì¤Q¦r©w¦ìÂI°µÁY©ñ |
| | | ImageReSize_FormID(CaseID,FileName); //依十字定位點做縮放 |
| | | end; |
| | | finally |
| | | S.Free; |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.ImageReSize(CaseID,FileName:String); //¨Ì¤Q¦r©w¦ìÂI°µÁY©ñ |
| | | Procedure TCB_IMGPSScanX.ImageReSize_FormID(CaseID,FileName:String); //依十字定位點做縮放 |
| | | var |
| | | FormID : String; |
| | | DH,DW : String; |
| | | NowW,NowH : Integer; |
| | | ANCHOR : String; //¬O§_¦³¤Q¦r½u |
| | | ANCHOR : String; //是否有十字線 |
| | | SizeStr : String; |
| | | S : TStringlist; |
| | | v,v1:Integer; |
| | |
| | | DW := GetFindResult('T1.FORM_WIDTH'); |
| | | ANCHOR := UpperCase(GetFindResult('T1.ANCHOR')); |
| | | ANCHOR := Index2Anchor(ANCHOR); |
| | | if ((ANCHOR = 'ANCHOR') or (ANCHOR = 'FRAME')) and (DH <> '') and (DW <> '') then //¦³¤Q¦r©w¦ìÂI |
| | | //showmessage(FormID+#13+DH+#13+DW+#13); |
| | | //ShowMessage('AAAAAAAAA'); |
| | | if ((ANCHOR = 'ANCHOR') or (ANCHOR = 'FRAME')) and (DH <> '') and (DW <> '') then //有十字定位點 |
| | | begin |
| | | //ShowMessage('BBBBBBB'); |
| | | ImageScrollBox1.LoadFromFile(ImageSavePath+CaseID+'\Upload\'+FileName,1); |
| | | //FindPoint(ImageScrollBox1.Graphic,UpLPoint,UpRPoint,DownLPoint,NowW,NowH); |
| | | FindPoint(ISB_BW.Graphic,UpLPoint,UpRPoint,DownLPoint,NowW,NowH,ANCHOR); |
| | | |
| | | SizeStr := CheckSize(ISB_BW,UpLPoint,UpRPoint,DownLPoint,DW,DH); |
| | | ImageResize(ImageScrollBox1.Graphic,ISB_BW.Graphic.Width,ISB_BW.Graphic.Height); |
| | | |
| | | FindPoint(ISB_BW.Graphic,UpLPoint,UpRPoint,DownLPoint,NowW,NowH,ANCHOR); |
| | | v := 5; |
| | | v1 := length(SizeStr); |
| | | IF (SizeStr <> '') and (Copy(SizeStr,1,v) <> 'ERROR') then |
| | | begin |
| | | //ShowMessage('CCCCC'); |
| | | |
| | | ImageScrollBox1.SaveToFile(ImageSavePath+CaseID+'\Upload\'+FileName); |
| | | S := TStringlist.Create; ///20110422®³±¼ ´«¦¨¤W¶Ç¤~°µ |
| | | //showmessage(ImageSavePath+CaseID+'\Upload\'+FileName); |
| | | S := TStringlist.Create; ///20110422拿掉 換成上傳才做 |
| | | if FileExists(ImageSavePath+CaseID+'\Upload\ReSize.dat') then |
| | | S.LoadFromFile(ImageSavePath+CaseID+'\Upload\ReSize.dat'); |
| | | //S.Add(FormCode2FormName(FormID)+' '+SizeStr); |
| | |
| | | S.SaveToFile(ImageSavePath+CaseID+'\Upload\ReSize.dat'); |
| | | S.Free; |
| | | end; |
| | | if (Copy(SizeStr,1,v) = 'ERROR') then //¥¼§ä¨ì¤TÓ©w¦ìÂI |
| | | if (Copy(SizeStr,1,v) = 'ERROR') then //未找到三個定位點 |
| | | begin |
| | | S := TStringlist.Create; |
| | | if FileExists(ImageSavePath+CaseID+'\Upload\AnchorError.dat') then |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.ImageReSize_tmp(FormID,FileName:String); //¨Ì¤Q¦r©w¦ìÂI°µÁY©ñ(¼È¦sÀÉ) |
| | | Procedure TCB_IMGPSScanX.ImageReSize_tmp(FormID,FileName:String); //依十字定位點做縮放(暫存檔) |
| | | var |
| | | DH,DW : String; |
| | | ANCHOR : String; //¬O§_¦³¤Q¦r½u |
| | | ANCHOR : String; //是否有十字線 |
| | | SizeStr : String; |
| | | S : TStringlist; |
| | | begin |
| | |
| | | DW := GetFindResult('T1.FORM_WIDTH'); |
| | | ANCHOR := UpperCase(GetFindResult('T1.ANCHOR')); |
| | | ANCHOR := Index2Anchor(ANCHOR); |
| | | if ((ANCHOR = 'ANCHOR') or (ANCHOR = 'FRAME')) and (DH <> '') and (DW <> '') then //¦³¤Q¦r©w¦ìÂI |
| | | if ((ANCHOR = 'ANCHOR') or (ANCHOR = 'FRAME')) and (DH <> '') and (DW <> '') then //有十字定位點 |
| | | begin |
| | | ImageScrollBox1.LoadFromFile(FileName,1); |
| | | SizeStr := CheckSize(ImageScrollBox1,UpLPoint,UpRPoint,DownLPoint,DW,DH); |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.TransCaseID(Path,CaseID:String;MainCase:Boolean):Boolean; //¶Ç°e®×¥ó |
| | | Function TCB_IMGPSScanX.TransCaseID(Path,CaseID:String;MainCase:Boolean):Boolean; //傳送案件 |
| | | Var |
| | | i,n,v: Integer; |
| | | ZipFileList : TStringlist; |
| | |
| | | SendData:String; |
| | | Doc_Data,Doc_Data1 : String; |
| | | In_Doc1,In_Doc2 : String; |
| | | AttachYN : String; //¬O§_¦³ªþ¥ó Y:¦³ N:¨S¦³ |
| | | AttachYN : String; //是否有附件 Y:有 N:沒有 |
| | | |
| | | ST1,ST2:TStringList; |
| | | str1,str2:String; |
| | | must_formidStr :string; |
| | | last_add_formidstr :string; |
| | | casepath:String; |
| | | filesizeInt:integer; |
| | | case_page:string; |
| | | begin |
| | | Result := True; |
| | | TransName := CaseID; |
| | |
| | | end; |
| | | if FileExists(Path+'CustomDocNo.dat') then |
| | | Cust_DocNoList.LoadFromFile(Path+'CustomDocNo.dat'); |
| | | Pages := ContextList.Count; |
| | | |
| | | if (FMode = 'NSCAN') or (FMode = 'ASCAN') or (FMode = 'DSCAN') or (FMode = 'SSCAN') or (FMode = 'MSCAN') or (FMode = 'RI_SCAN') or (FMode = 'RSCAN') or (FMode = 'ESCAN') then |
| | | Pages := ContextList.Count; |
| | | case_page:=IntToStr(pages); |
| | | if (FMode = 'NSCAN') or (FMode = 'ESCAN') or (FMode = 'ASCAN') or (FMode = 'DSCAN') or (FMode = 'SSCAN') or (FMode = 'MSCAN') or (FMode = 'RI_SCAN') or (FMode = 'RSCAN') then |
| | | begin |
| | | //Showmessage('1'); |
| | | UpformID := GetCaseFormID(Path); |
| | | {if UpformID = '' then //20131213 yuu»¡¤£ºÞ¥Dform |
| | | {if UpformID = '' then //20131213 yuu說不管主form |
| | | begin |
| | | Showmessage(_msg('¨ú¤£¨ì¥DFormID!!')); |
| | | Showmessage(_msg('取不到主FormID!!')); |
| | | Result := False; |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end;} |
| | | end; |
| | | CaseResort2Scanlist(Path); //ÀɦW·Ó³]©w±Æ§Ç²£¥Íscanlist.dat |
| | | //CaseResort(Path); //ÀɦW·Ó³]©w±Æ§Ç |
| | | CreateFormID_FormName(Path,CaseID); //²£¥ÍFormID_FormName.dat |
| | | CreateDocNo_DocName(Path,CaseID); //²£¥ÍDocNo_Name.dat |
| | | Doc_Data := CreateDocNo_Info(CaseID); //²£¥Í«OºÞ³U¤å¥ó Docno,¥÷¼Æ,¶¼Æ;Docno,¥÷¼Æ,¶¼Æ ªº¦^¶Ç¦r¦ê |
| | | Doc_Data1 := CreateCustDocNo_Info(CaseID); //²£¥Í¦Û©w¤å¥ó Docname,¥÷¼Æ,¶¼Æ;Docno,¥÷¼Æ,¶¼Æ ªº¦^¶Ç¦r¦ê |
| | | In_Doc1 := CreateDocnoFrom_Info(CaseID); //²£¥Í³Q¤Þ¶iªº«OºÞ³U¤å¥ó¸ê°T Docno[tab]¥÷¼Æ[tab]®×¥ó½s¸¹#13#10Docno[tab]¥÷¼Æ[tab]®×¥ó½s¸¹ |
| | | In_Doc2 := CreateCustDocNoFrom_Info(CaseID); //²£¥Í³Q¤Þ¶iªº¦Û©w¤å¥ó¸ê°T Docno[tab]¥÷¼Æ[tab]®×¥ó½s¸¹#13#10Docno[tab]¥÷¼Æ[tab]®×¥ó½s¸¹ |
| | | AttachYN := CreateAttach_Info(CaseID); //¬O§_ÁÙ¦³ªþ¥ó Y:¦³ N:¨S¦³ |
| | | |
| | | CaseResort2Scanlist(Path); //檔名照設定排序產生scanlist.dat |
| | | //CaseResort(Path); //檔名照設定排序 |
| | | CreateFormID_FormName(Path,CaseID); //產生FormID_FormName.dat |
| | | CreateDocNo_DocName(Path,CaseID); //產生DocNo_Name.dat |
| | | //ShowMessage('EEEEEEEEEE'); |
| | | Doc_Data := CreateDocNo_Info(CaseID); //產生保管袋文件 Docno,份數,頁數;Docno,份數,頁數 的回傳字串 |
| | | //ShowMessage('1111111111'); |
| | | Doc_Data1 := CreateCustDocNo_Info(CaseID); //產生自定文件 Docname,份數,頁數;Docno,份數,頁數 的回傳字串 |
| | | //ShowMessage('2222222222'); |
| | | In_Doc1 := CreateDocnoFrom_Info(CaseID); //產生被引進的保管袋文件資訊 Docno[tab]份數[tab]案件編號#13#10Docno[tab]份數[tab]案件編號 |
| | | //ShowMessage('333333333333333333'); |
| | | In_Doc2 := CreateCustDocNoFrom_Info(CaseID); //產生被引進的自定文件資訊 Docno[tab]份數[tab]案件編號#13#10Docno[tab]份數[tab]案件編號 |
| | | //ShowMessage('4444444444444'); |
| | | AttachYN := CreateAttach_Info(CaseID); //是否還有附件 Y:有 N:沒有 |
| | | //self.ReadCaseIndex() |
| | | //ShowMessage('555555555555'); |
| | | ReadCaseIndex(Path); |
| | | //ShowMessage('DDDDDDDDDD'); |
| | | //LoanDoc := 'Y'; |
| | | //²£¥Í¾B¸n¼v¹³ |
| | | if FWork_No = 'CW' then |
| | | HaveMask := Case2Mask(Path,MaskPath); |
| | | //²£¥Í¾B¸n¼v¹³ |
| | | //產生遮罩影像 |
| | | // if FWork_No = 'CW' then |
| | | // HaveMask := Case2Mask(Path,MaskPath); |
| | | //產生遮罩影像 |
| | | // S := S +#13+'5-->'+ Timetostr(now); |
| | | |
| | | ///////必要formid 20170315 start ////////////////////////////// |
| | | must_formidStr:=''; |
| | | last_add_formidstr:=''; |
| | | ST1:=TStringList.Create; |
| | | ST1.LoadFromFile(path+'FormCode_Name.dat'); |
| | | //ShowMessage(ST1.Text); |
| | | ST2:=TStringList.Create; |
| | | |
| | | for I := 0 to ST1.Count - 1 do |
| | | begin |
| | | if (Pos('_',St1.Strings[i])<>1) and (Pos('_',St1.Strings[i])<>-11) then |
| | | begin |
| | | str1:=Copy(ST1.Strings[i],1,Pos('_',St1.Strings[i])-1); |
| | | if ST2.IndexOf(str1) = -1 then |
| | | begin |
| | | ST2.Add(str1); |
| | | must_formidStr:= must_formidStr+str1+'@#,'; |
| | | end; |
| | | end; |
| | | end; |
| | | must_formidStr:=Copy(must_formidStr,1,Length(must_formidStr)-3) ; |
| | | for I := 0 to LastInitFormidList.Count - 1 do |
| | | begin |
| | | if ST2.IndexOf(LastInitFormidList.Strings[i]) <> -1 then |
| | | begin |
| | | ST2.Delete(ST2.IndexOf(LastInitFormidList.Strings[i])); |
| | | end; |
| | | end; |
| | | for I := 0 to ST2.Count - 1 do |
| | | begin |
| | | if i <> ST2.Count then |
| | | begin |
| | | last_add_formidstr:=last_add_formidstr+ST2.Strings[i]+'@#,'; |
| | | end |
| | | else |
| | | begin |
| | | last_add_formidstr:=last_add_formidstr+ST2.Strings[i] |
| | | end; |
| | | end; |
| | | ST1.Free; |
| | | ST2.Free; |
| | | ///////必要formid 20170315 end ////////////////////////// |
| | | |
| | | ///保留外部影像 start/////////////////////////////// |
| | | casepath:= Copy(Path,1,pos('Upload',path)-1); |
| | | //ShowMessage('casepath='+casepath); |
| | | //FIsExternal:='Y'; |
| | | if (FMode='ESCAN') and (FIsExternal='Y') then |
| | | begin |
| | | if FileExists(casepath+'Download\FirstImg.zip') then |
| | | begin |
| | | CopyFile(PWChar(casepath+'Download\FirstImg.zip'),PWChar(path+'FirstImg.zip'),false); |
| | | end |
| | | else |
| | | begin |
| | | CopyFile(PWChar(casepath+'Download\'+CaseID+'.zip'),PWChar(path+'FirstImg.zip'),false); |
| | | end; |
| | | end; |
| | | ///保留外部影像 end/////////////////////////////// |
| | | |
| | | //file_size 計算 就先不做 20170316 |
| | | filesizeInt:=0; |
| | | |
| | | |
| | | //////ˣ˃///// |
| | | //////壓檔///// |
| | | ZipMainFile(Path,Path,'Img.zip'); |
| | | if HaveMask then |
| | | ZipMaskFile(Path,MaskPath,Path,'MaskImg.zip'); //¦³¾B¸n³]©wªº¤~²£¥Í |
| | | /////ˣ˃//// |
| | | ////¤W¶Ç///// |
| | | SendData:='data='+HTTPEncode(UTF8Encode(FData))+'&verify='+FVerify+'&form_id='+UpformID+'&loan_doc='+Case_loandoc+'&case_no='+TransName+'&doc_data='+HTTPEncode(UTF8Encode(Doc_Data))+'&doc_data1='+HTTPEncode(UTF8Encode(Doc_Data1))+'&attach='+AttachYN+'&in_doc1='+HTTPEncode(UTF8Encode(In_Doc1))+'&in_doc2='+HTTPEncode(UTF8Encode(In_Doc2)); |
| | | ZipMaskFile(Path,MaskPath,Path,'MaskImg.zip'); //有遮罩設定的才產生 |
| | | /////壓檔//// |
| | | ////上傳///// |
| | | SendData:='data='+HTTPEncode(UTF8Encode(FData)) |
| | | +'&verify='+FVerify |
| | | +'&form_id='+UpformID |
| | | +'&loan_doc='+Case_loandoc |
| | | +'&case_no='+TransName |
| | | +'&doc_data='+HTTPEncode(UTF8Encode(Doc_Data)) |
| | | +'&doc_data1='+HTTPEncode(UTF8Encode(Doc_Data1)) |
| | | +'&attach='+AttachYN |
| | | +'&case_page='+case_page |
| | | +'&file_size='+IntToStr(filesizeInt) |
| | | +'&must_formid='+must_formidStr //擁有的 formid |
| | | +'&last_add_formid='+last_add_formidstr //當次新加的 formid |
| | | +'&in_doc1='+HTTPEncode(UTF8Encode(In_Doc1)) |
| | | +'&in_doc2='+HTTPEncode(UTF8Encode(In_Doc2)); |
| | | //ShowMessage('SendData='+SendData); |
| | | //ShowMessage(FData+#10#13+Doc_Data); |
| | | |
| | | //exit; |
| | | if not upFile(HTTPSClient,FUrl,'service/imgpsc/IMGPSC02/caseupload',SendData,'file',Path+'Img.zip',FReWrite,Memo1,False) then |
| | | begin |
| | | Showmessage(Format(_Msg('¶Ç°e®×¥ó½s¸¹(%s)ÀÉ®×®É,ºô¸ôµo¥Í¿ù»~!!'+_Msg('¿ù»~¥N½X:')),[CaseID])+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason); |
| | | Showmessage(Format(_Msg('傳送案件編號(%s)檔案時,網路發生錯誤!!'+_Msg('錯誤代碼:')),[CaseID])+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | if memo1.Lines.Strings[0] = '1' then |
| | | begin |
| | | Showmessage(Format(_Msg('¶Ç°e®×¥ó½s¸¹(%s)ÀÉ®×®É,ºô¸ôµo¥Í¿ù»~!!')+_Msg('¿ù»~ì¦]:'),[CaseID])+memo1.Lines.Strings[1]); |
| | | Showmessage(Format(_Msg('傳送案件編號(%s)檔案時,網路發生錯誤!!')+_Msg('錯誤原因:'),[CaseID])+memo1.Lines.Strings[1]); |
| | | Result := False; |
| | | Exit; |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | Showmessage(Format(_Msg('¶Ç°e®×¥ó½s¸¹(%s)ÀÉ®×®É,ºô¸ôµo¥Í¿ù»~!!')+_Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J'),[CaseID])); |
| | | Showmessage(Format(_Msg('傳送案件編號(%s)檔案時,網路發生錯誤!!')+_Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'),[CaseID])); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | ////¤W¶Ç//// |
| | | ////上傳//// |
| | | |
| | | if FMode = 'ESCAN' then //¤W¶ÇÂÂ¥ó¤Þ¤JÀÉ®× //20140616 쥻¥ý·hÂÂ¥ó¦A·h·s¥ó,§ï¬°¥ý·h·s¥ó¦A·hÂÂ¥ó |
| | | if FMode = 'ESCAN' then //上傳舊件引入檔案 //20140616 原本先搬舊件再搬新件,改為先搬新件再搬舊件 |
| | | begin |
| | | if not TransOldCaseFile(ImageSavePath+CaseID+'\') then |
| | | begin |
| | |
| | | |
| | | |
| | | |
| | | // ©I¥sServer§¹¦¨ ///// |
| | | // 呼叫Server完成 ///// |
| | | {If not CaseComplete(Path,CaseID,MainCase) Then |
| | | begin |
| | | Showmessage(_Msg('³qª¾®×¥ó¶Ç°e§¹¦¨®É,ºô¸ôµo¥Í¿ù»~!!')+HttpErrStr); |
| | | Showmessage(_Msg('通知案件傳送完成時,網路發生錯誤!!')+HttpErrStr); |
| | | DataLoading(False,False); |
| | | Result := False; |
| | | Exit; |
| | | end; } |
| | | /// ©I¥sServer§¹¦¨//// |
| | | /// 呼叫Server完成//// |
| | | |
| | | ////§RÀÉ//// |
| | | //_DelTree(Path); //·|¥u§RTransPath |
| | | ////刪檔//// |
| | | //_DelTree(Path); //會只刪TransPath |
| | | //ShowMessage('STOP'); |
| | | _DelTree(ImageSavePath+CaseID); |
| | | SetCaseList('D',-1,CaseID); |
| | | ////§RÀÉ//// |
| | | ////刪檔//// |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.NewTreeNodeRefresh; |
| | |
| | | v : Integer; |
| | | begin |
| | | //v := Pos('-',NewTreeNode.Text); |
| | | //NewTreeNode.Text := Copy(NewTreeNode.Text,1,v-1)+'-¦@'+inttostr(NewTreeNode.Count)+'µ§'; |
| | | //NewTreeNode.Text := Copy(NewTreeNode.Text,1,v-1)+'-共'+inttostr(NewTreeNode.Count)+'筆'; |
| | | GetCase_PageCount(CaseCount,PageCount); |
| | | v := Pos('-',NewTreeNode.Text); |
| | | NewTreeNode.Text := Format(_Msg('%s-¦@%dµ§¦@%d¶'),[Copy(NewTreeNode.Text,1,v-1),CaseCount,PageCount]); |
| | | NewTreeNode.Text := Format(_Msg('%s-共%d筆共%d頁'),[Copy(NewTreeNode.Text,1,v-1),CaseCount,PageCount]); |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.MyTreeNode1Refresh; |
| | |
| | | v : Integer; |
| | | begin |
| | | v := Pos('-',MyTreeNode1.Text); |
| | | MyTreeNode1.Text := Format(_Msg('%s-%dµ§'),[Copy(MyTreeNode1.Text,1,v-1),MyTreeNode1.Count]); |
| | | MyTreeNode1.Text := Format(_Msg('%s-%d筆'),[Copy(MyTreeNode1.Text,1,v-1),MyTreeNode1.Count]); |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.MyTreeNode2ReFresh(CaseID:String); |
| | |
| | | P : Integer; |
| | | begin |
| | | //p:= ContextList.Count; |
| | | //MytreeNode1.Text := Format(_Msg('%s-%d¶'),[CaseID,p]); |
| | | //MytreeNode1.Text := Format(_Msg('%s-%d頁'),[CaseID,p]); |
| | | DrawDocItem2(MytreeNode1,CaseID); |
| | | //DrawDocItem(MytreeNode1,FORM_INF_List,CaseID); |
| | | end; |
| | |
| | | Procedure TCB_IMGPSScanX.MyTreeNode3ReFresh(CaseID:String); |
| | | begin |
| | | |
| | | //DrawDocItem1(MytreeNode1,Doc_Inf_List,CaseID); //201408280§ï |
| | | //DrawDocItem1(MytreeNode1,Doc_Inf_List,CaseID); //201408280改 |
| | | DrawDocItem2(MytreeNode1,CaseID); |
| | | //DrawDocItem(MytreeNode1,FORM_INF_List,CaseID); |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.Node2DocNo(Node2:TTreeNode):String; //MyTreeNode2¨úDocNo¥X¨Ó |
| | | Function TCB_IMGPSScanX.Node2DocNo(Node2:TTreeNode):String; //MyTreeNode2取DocNo出來 |
| | | var |
| | | v,v1,v2 : Integer; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.Node3DocNo(Node3:TTreeNode):String; //MyTreeNode3¨úDocNo¥X¨Ó |
| | | Function TCB_IMGPSScanX.Node3DocNo(Node3:TTreeNode):String; //MyTreeNode3取DocNo出來 |
| | | var |
| | | v,v1,v2 : Integer; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.Node3FormID(Node3:TTreeNode):String; //MyTreeNode3¨úFormCode¥X¨Ó |
| | | Function TCB_IMGPSScanX.Node3FormID(Node3:TTreeNode):String; //MyTreeNode3取FormCode出來 |
| | | var |
| | | v,v1,v2 : Integer; |
| | | begin |
| | |
| | | end; |
| | | |
| | | |
| | | Function TCB_IMGPSScanX.GetNode2Name(Node2:TTreeNode):String; //¨úMyTreeNode2ªºÃѧO¦r¥X¨Ó(°O¤§«eÂI¿ï¥Î) |
| | | Function TCB_IMGPSScanX.GetNode2Name(Node2:TTreeNode):String; //取MyTreeNode2的識別字出來(記之前點選用) |
| | | var |
| | | v : Integer; |
| | | begin |
| | |
| | | DownUrl := FUrl+CaseID+'&checktime='+EnCodeDateTime; |
| | | if not dnFile(HTTPSClient,DownUrl,'','',DPath+CaseID+'.zip',FReWrite,Memo1,False,DownImgStatus) then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | if Memo1.Lines.Strings[0] = '1' then |
| | | begin |
| | | HttpErrStr :=_Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]; |
| | | HttpErrStr :=_Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | | Result := False; |
| | | Exit; |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J'); |
| | | HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | |
| | | end |
| | | Else |
| | | begin |
| | | if ((FMode = 'FSCAN') or (FMode = 'ISCAN')) and (Memo1.Lines.Strings[0] ='NO_FILE') then //FGIS«e¥x¶×¤J¥ó¨S¦³¼v¹³¬O¹ïªº |
| | | if ((FMode = 'FSCAN') or (FMode = 'ISCAN')) and (Memo1.Lines.Strings[0] ='NO_FILE') then //FGIS前台匯入件沒有影像是對的 |
| | | begin |
| | | SC.Clear; |
| | | SC.SaveToFile(DPath+'Context.dat'); |
| | | end |
| | | Else |
| | | begin |
| | | HttpErrStr := _Msg('§ä¤£¨ì¼v¹³'); |
| | | HttpErrStr := _Msg('找不到影像'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | |
| | | Version := FormCode2Version(FormID); |
| | | If FindSQLData(Doc_Inf_List,'ADD_SCAN_RULE','DOC_NO,DOC_VERSION',DocNo+','+Version,0,FindResult) Then |
| | | begin |
| | | if GetFindResult('ADD_SCAN_RULE') = 'R' then //´À´«ªº¥ý§R¦A¥[ 20101026 User¥Ñ§RFormCode§ï§RDocNo |
| | | if GetFindResult('ADD_SCAN_RULE') = 'R' then //替換的先刪再加 20101026 User由刪FormCode改刪DocNo |
| | | begin |
| | | //DeleteFormCodeFile(DPath,FormID); |
| | | ContextList.LoadFromFile(DPath+'Context.dat'); |
| | |
| | | end; |
| | | end; |
| | | end; |
| | | for I := 0 to SC.Count - 1 do //½Æ»s¸É¥R¶i¨Óªº¼v¹³ |
| | | for I := 0 to SC.Count - 1 do //複製補充進來的影像 |
| | | begin |
| | | OldFName := SC.Strings[i]; |
| | | Main_C.LoadFromFile(DPath+'Context.dat'); |
| | |
| | | begin |
| | | CopyFile(PWideChar(SPath+OldFName),PWideChar(DPath+NewMainFName),False); |
| | | end; |
| | | if FormID = '' then //ªþ¥ó |
| | | if FormID = '' then //附件 |
| | | begin |
| | | CopyFile(PWideChar(SPath+OldFName),PWideChar(DPath+NewMainFName),False); |
| | | end; |
| | |
| | | SC.Free; |
| | | Main_C.Free; |
| | | end; |
| | | ///¥[¤Jªº¹q¤lÀɶפJ®×¥ó¸Ì |
| | | ///加入的電子檔匯入案件裡 |
| | | if DirectoryExists(SPath+'AttFile\') then |
| | | AttFile_Arrange(SPath+'AttFile\',DPath+'AttFile\'); |
| | | end;} |
| | |
| | | //ShowMessage(SendData); |
| | | if not dnFile_Get(HTTPSClient,Furl,'service/imgpsc/IMGPSC04/case',SendData,Path+CaseID+'.zip',FReWrite,Memo1,False,DownImgStatus) then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | if Memo1.Lines.Strings[0] = '1' then |
| | | begin |
| | | HttpErrStr :=_Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]; |
| | | HttpErrStr :=_Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | | Result := False; |
| | | Exit; |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J'); |
| | | HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | //ShowMessage('sssss'); |
| | | AttPath := Path + 'AttFile\'; |
| | | if FileExists(Path+CaseID+'.zip') then |
| | | begin |
| | |
| | | end |
| | | Else |
| | | begin |
| | | HttpErrStr := _Msg('§ä¤£¨ì¼v¹³'); |
| | | HttpErrStr := _Msg('找不到影像'); |
| | | Result := True; |
| | | Exit; |
| | | end; |
| | | |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetNoNameCase(Path:String):String; //¨ú¥¼°t¸¹XXXX |
| | | Function TCB_IMGPSScanX.GetNoNameCase(Path:String):String; //取未配號XXXX |
| | | var |
| | | i : Integer; |
| | | begin |
| | | for i := 1 to 9999 do |
| | | begin |
| | | if Not DirectoryExists(Path+_Msg('¥¼°t¸¹')+Add_Zoo(i,4)) then |
| | | if Not DirectoryExists(Path+_Msg('未配號')+Add_Zoo(i,4)) then |
| | | begin |
| | | Result := _Msg('¥¼°t¸¹')+Add_Zoo(i,4); |
| | | Result := _Msg('未配號')+Add_Zoo(i,4); |
| | | Break; |
| | | end; |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.CaseResort(Path:String); //®×¥óªºÀɮ׫·s±Æ§Ç(¦¸¤å¥ó¨ÌDocno±Æ) |
| | | Procedure TCB_IMGPSScanX.CaseResort(Path:String); //案件的檔案重新排序(次文件依Docno排) |
| | | var |
| | | i,n,v,v1 : Integer; |
| | | S,S1 : TStringlist; |
| | |
| | | try |
| | | S.LoadFromFile(Path+'Context.dat'); |
| | | X := 0; |
| | | {for I := 1 to FORM_INF_List.Count - 1 do //¦bFormID¦³³]©wªº //¥D¤å¥ó ·ÓSQL±Æ 20101028§ï |
| | | {for I := 1 to FORM_INF_List.Count - 1 do //在FormID有設定的 //主文件 照SQL排 20101028改 |
| | | begin |
| | | FormID := GetSQLData(FORM_INF_List,'T1.FORM_ID',i); |
| | | if FormCode2FileName(FormID,S) = '' then |
| | |
| | | begin |
| | | Inc(X); |
| | | OldName := S.Strings[n]; |
| | | //NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //±q즳¼Æ¶q¥[1¶}©l½s |
| | | NewName := Add_Zoo(S.Count+x,3)+FileName2NoQuene_Filename(OldName); //±q즳¼Æ¶q¥[1¶}©l½s |
| | | //NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //從原有數量加1開始編 |
| | | NewName := Add_Zoo(S.Count+x,3)+FileName2NoQuene_Filename(OldName); //從原有數量加1開始編 |
| | | S.Strings[n] := '*'+S.Strings[n]; |
| | | S1.Add(OldName+','+NewName); |
| | | end; |
| | | end; |
| | | end;} |
| | | |
| | | {for I := 0 to FORM_INF_List.Count - 1 do //¦¸¤å¥ó ·ÓFormID 1~8½X+±½ºË¶¶§Ç±Æ 20110512¬°¤F¬YÓ¤å¥ón¥ý¥´ªºì¦]n¨D§ï |
| | | {for I := 0 to FORM_INF_List.Count - 1 do //次文件 照FormID 1~8碼+掃瞄順序排 20110512為了某個文件要先打的原因要求改 |
| | | begin |
| | | for n := 0 to S.Count - 1 do |
| | | begin |
| | |
| | | begin |
| | | Inc(X); |
| | | OldName := S.Strings[n]; |
| | | NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //±q즳¼Æ¶q¥[1¶}©l½s |
| | | NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //從原有數量加1開始編 |
| | | S.Strings[n] := '*'+S.Strings[n]; |
| | | S1.Add(OldName+','+NewName); |
| | | end; |
| | | end; |
| | | end;} |
| | | for I := 0 to Doc_Inf_List.Count - 1 do //¥D¤å¥ó ·Ó¤å¥ó¥N½X+±½ºË¶¶§Ç±Æ 20101101§ï 20110512±ß¤W¤S»¡§ï¦^¨Ó |
| | | for I := 0 to Doc_Inf_List.Count - 1 do //主文件 照文件代碼+掃瞄順序排 20101101改 20110512晚上又說改回來 |
| | | begin |
| | | DocNo := GetSQLData(Doc_Inf_List,'DOC_NO',i); |
| | | if DocNo2FileName(DocNo,S) = '' then |
| | |
| | | begin |
| | | Inc(X); |
| | | OldName := S.Strings[n]; |
| | | //NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //±q즳¼Æ¶q¥[1¶}©l½s |
| | | NewName := Add_Zoo(S.Count+x,3)+FileName2NoQuene_Filename(OldName); //±q즳¼Æ¶q¥[1¶}©l½s |
| | | //NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //從原有數量加1開始編 |
| | | NewName := Add_Zoo(S.Count+x,3)+FileName2NoQuene_Filename(OldName); //從原有數量加1開始編 |
| | | S.Strings[n] := '*'+S.Strings[n]; |
| | | S1.Add(OldName+','+NewName); |
| | | end; |
| | |
| | | end; |
| | | |
| | | |
| | | for I := 0 to Doc_Inf_List.Count - 1 do //¦¸¤å¥ó ·Ó¤å¥ó¥N½X+±½ºË¶¶§Ç±Æ 20101101§ï 20110512±ß¤W¤S»¡§ï¦^¨Ó |
| | | for I := 0 to Doc_Inf_List.Count - 1 do //次文件 照文件代碼+掃瞄順序排 20101101改 20110512晚上又說改回來 |
| | | begin |
| | | DocNo := GetSQLData(Doc_Inf_List,'DOC_NO',i); |
| | | if DocNo2FileName(DocNo,S) = '' then |
| | |
| | | begin |
| | | Inc(X); |
| | | OldName := S.Strings[n]; |
| | | //NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //±q즳¼Æ¶q¥[1¶}©l½s |
| | | NewName := Add_Zoo(S.Count+x,3)+FileName2NoQuene_Filename(OldName); //±q즳¼Æ¶q¥[1¶}©l½s |
| | | //NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //從原有數量加1開始編 |
| | | NewName := Add_Zoo(S.Count+x,3)+FileName2NoQuene_Filename(OldName); //從原有數量加1開始編 |
| | | S.Strings[n] := '*'+S.Strings[n]; |
| | | S1.Add(OldName+','+NewName); |
| | | end; |
| | | end; |
| | | end; |
| | | |
| | | {for n := 0 to S.Count - 1 do //¦¸¤å¥ó ·Ó±½ºË¶¶§Ç±Æ 20101028§ï |
| | | {for n := 0 to S.Count - 1 do //次文件 照掃瞄順序排 20101028改 |
| | | begin |
| | | FormID := GetSQLData(FORM_INF_List,'T1.FORM_ID',i); |
| | | Doc_Type := GetSQLData(FORM_INF_List,'T2.DOC_TYPE',i); |
| | |
| | | begin |
| | | Inc(X); |
| | | OldName := S.Strings[n]; |
| | | NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //±q즳¼Æ¶q¥[1¶}©l½s |
| | | NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //從原有數量加1開始編 |
| | | S.Strings[n] := '*'+S.Strings[n]; |
| | | S1.Add(OldName+','+NewName); |
| | | end; |
| | | end; |
| | | end;} |
| | | for i := 0 to S.Count - 1 do //FormID¨S³]©wªº©Îªþ¥ó |
| | | for i := 0 to S.Count - 1 do //FormID沒設定的或附件 |
| | | begin |
| | | if S.Strings[i][1] <> '*' then |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | S.Clear; |
| | | for i := 0 to S1.Count - 1 do //¶}©lÂà´«ÀɦW |
| | | for i := 0 to S1.Count - 1 do //開始轉換檔名 |
| | | begin |
| | | v := Pos(',',S1.Strings[i]); |
| | | v1 := length(S1.Strings[i]); |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.CaseResort2Scanlist(Path:String); //®×¥óªºÀɮ׫·s±Æ§Çµ¹scanlist(¦¸¤å¥ó¨ÌFormID±Æ) |
| | | Procedure TCB_IMGPSScanX.CaseResort2Scanlist(Path:String); //案件的檔案重新排序給scanlist(次文件依FormID排) |
| | | var |
| | | i,n,v,v1 : Integer; |
| | | S,S1 : TStringlist; |
| | |
| | | if FileExists(Path+'Context.dat') then |
| | | S.LoadFromFile(Path+'Context.dat'); |
| | | X := 0; |
| | | for I := 1 to FORM_INF_List.Count - 1 do //¦bFormID¦³³]©wªº //¥D¤å¥ó ·ÓSQL±Æ 20101028§ï |
| | | for I := 1 to FORM_INF_List.Count - 1 do //在FormID有設定的 //主文件 照SQL排 20101028改 |
| | | begin |
| | | FormID := GetSQLData(FORM_INF_List,'T1.FORM_ID',i); |
| | | if FormCode2FileName(FormID,S) = '' then |
| | |
| | | begin |
| | | Inc(X); |
| | | OldName := S.Strings[n]; |
| | | //NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //±q즳¼Æ¶q¥[1¶}©l½s |
| | | NewName := Add_Zoo(S.Count+x,3)+FileName2NoQuene_Filename(OldName); //±q즳¼Æ¶q¥[1¶}©l½s |
| | | //NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //從原有數量加1開始編 |
| | | NewName := Add_Zoo(S.Count+x,3)+FileName2NoQuene_Filename(OldName); //從原有數量加1開始編 |
| | | S.Strings[n] := '*'+S.Strings[n]; |
| | | S1.Add(OldName+','+NewName); |
| | | end; |
| | | end; |
| | | end; |
| | | |
| | | for I := 0 to FORM_INF_List.Count - 1 do //¦¸¤å¥ó ·ÓSQL±Æ 20110512¬°¤F¬YÓ¤å¥ón¥ý¥´ªºì¦]n¨D§ï |
| | | for I := 0 to FORM_INF_List.Count - 1 do //次文件 照SQL排 20110512為了某個文件要先打的原因要求改 |
| | | begin |
| | | |
| | | FormID := GetSQLData(FORM_INF_List,'T1.FORM_ID',i); |
| | |
| | | begin |
| | | Inc(X); |
| | | OldName := S.Strings[n]; |
| | | //NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //±q즳¼Æ¶q¥[1¶}©l½s |
| | | NewName := Add_Zoo(S.Count+x,3)+FileName2NoQuene_Filename(OldName); //±q즳¼Æ¶q¥[1¶}©l½s |
| | | //NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //從原有數量加1開始編 |
| | | NewName := Add_Zoo(S.Count+x,3)+FileName2NoQuene_Filename(OldName); //從原有數量加1開始編 |
| | | S.Strings[n] := '*'+S.Strings[n]; |
| | | S1.Add(OldName+','+NewName); |
| | | end; |
| | | end; |
| | | end; |
| | | |
| | | {for I := 0 to Doc_Inf_List.Count - 1 do //¦¸¤å¥ó ·Ó¤å¥ó¥N½X+±½ºË¶¶§Ç±Æ 20101101§ï 20110512±ß¤W¤S»¡§ï¦^¨Ó |
| | | {for I := 0 to Doc_Inf_List.Count - 1 do //次文件 照文件代碼+掃瞄順序排 20101101改 20110512晚上又說改回來 |
| | | begin |
| | | DocNo := GetSQLData(Doc_Inf_List,'DOC_NO',i); |
| | | Doc_Type := GetSQLData(Doc_Inf_List,'DOC_TYPE',i); |
| | |
| | | begin |
| | | Inc(X); |
| | | OldName := S.Strings[n]; |
| | | NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //±q즳¼Æ¶q¥[1¶}©l½s |
| | | NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //從原有數量加1開始編 |
| | | S.Strings[n] := '*'+S.Strings[n]; |
| | | S1.Add(OldName+','+NewName); |
| | | end; |
| | | end; |
| | | end;} |
| | | |
| | | {for n := 0 to S.Count - 1 do //¦¸¤å¥ó ·Ó±½ºË¶¶§Ç±Æ 20101028§ï |
| | | {for n := 0 to S.Count - 1 do //次文件 照掃瞄順序排 20101028改 |
| | | begin |
| | | for i := 0 to FORM_INF_List.Count - 1 do |
| | | begin |
| | |
| | | begin |
| | | Inc(X); |
| | | OldName := S.Strings[n]; |
| | | NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //±q즳¼Æ¶q¥[1¶}©l½s |
| | | NewName := Add_Zoo(S.Count+x,3)+Copy(OldName,4,length(OldName)-3); //從原有數量加1開始編 |
| | | S.Strings[n] := '*'+S.Strings[n]; |
| | | S1.Add(OldName+','+NewName); |
| | | end; |
| | | end; |
| | | end;} |
| | | for i := 0 to S.Count - 1 do //FormID¨S³]©wªº©Îªþ¥ó |
| | | for i := 0 to S.Count - 1 do //FormID沒設定的或附件 |
| | | begin |
| | | if S.Strings[i][1] <> '*' then |
| | | begin |
| | |
| | | end; |
| | | |
| | | S.Clear; |
| | | for i := 0 to S1.Count - 1 do //¶}©lÂà´«ÀɦW |
| | | for i := 0 to S1.Count - 1 do //開始轉換檔名 |
| | | begin |
| | | v := Pos(',',S1.Strings[i]); |
| | | v1 := length(S1.Strings[i]); |
| | |
| | | end; |
| | | |
| | | |
| | | Procedure TCB_IMGPSScanX.DistinctDocinCase(Path:String); //¦C¥X®×¥ó¸ÌªºDocno_ª©¥» |
| | | Procedure TCB_IMGPSScanX.DistinctDocinCase(Path:String); //列出案件裡的Docno_版本 |
| | | var |
| | | i,n,v : Integer; |
| | | S : TStringlist; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.DistinctDocNoinCase(Path:String); //¦C¥X®×¥ó¸ÌªºDocno |
| | | Procedure TCB_IMGPSScanX.DistinctDocNoinCase(Path:String); //列出案件裡的Docno |
| | | var |
| | | i,n,v : Integer; |
| | | S : TStringlist; |
| | |
| | | |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.ClearErrini(CaseID:String;CaseNode:TTreeNode); //²M±¼ÀË®ÖÀÉ®× |
| | | Procedure TCB_IMGPSScanX.ClearErrini(CaseID:String;CaseNode:TTreeNode); //清掉檢核檔案 |
| | | var |
| | | i : Integer; |
| | | begin |
| | |
| | | DeleteFile(ImageSavePath+CaseID+'\Checkerr.ini'); |
| | | if FileExists(ImageSavePath+CaseID+'\CheckMemo.dat') then |
| | | DeleteFile(ImageSavePath+CaseID+'\CheckMemo.dat'); |
| | | {if FileExists(ImageSavePath+CaseID+'\ReSize.dat') then //20110421®³±¼ ¦]¬°°O¿ý·|¤£¨£ |
| | | {if FileExists(ImageSavePath+CaseID+'\ReSize.dat') then //20110421拿掉 因為記錄會不見 |
| | | DeleteFile(ImageSavePath+CaseID+'\ReSize.dat');} |
| | | if FileExists(ImageSavePath+CaseID+'\RemoveMemo.dat') then |
| | | DeleteFile(ImageSavePath+CaseID+'\RemoveMemo.dat'); |
| | |
| | | CaseNode.SelectedIndex := 2; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.SetCaseList(Mode:Char;Index:Integer;text:String); //'A:¥[¤J,I:´¡¤J,D:§R°£,E:×§ï' |
| | | Procedure TCB_IMGPSScanX.SetCaseList(Mode:Char;Index:Integer;text:String); //'A:加入,I:插入,D:刪除,E:修改' |
| | | var |
| | | i : Integer; |
| | | begin |
| | |
| | | CaseList.SaveToFile(ImageSavePath+'CaseList.dat'); |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.SetDocNoList(Mode:Char;Index:Integer;CaseNo,DocDir,Copies:String); //'A:¥[¤J,I:´¡¤J,D:§R°£,E:×§ï' |
| | | Procedure TCB_IMGPSScanX.SetDocNoList(Mode:Char;Index:Integer;CaseNo,DocDir,Copies:String); //'A:加入,I:插入,D:刪除,E:修改' |
| | | var |
| | | i : Integer; |
| | | CaseDocNoList : TStringlist; |
| | |
| | | 'D':begin |
| | | if Index <> -1 then |
| | | begin |
| | | //SetRecordEditedDocDir('D',CaseNo,CaseDocNoList.Strings[Index]); //20140624 ×§ï§R°£¤å¥ó®É¤]°O¤@µ§²§°Ê,§R±¼·|µLªk³qª¾«eºÝºô¶¦³²§°Ê |
| | | //SetRecordEditedDocDir('D',CaseNo,CaseDocNoList.Strings[Index]); //20140624 修改刪除文件時也記一筆異動,刪掉會無法通知前端網頁有異動 |
| | | SetRecordEditedDocDir('A',CaseNo,CaseDocNoList.Strings[Index]); |
| | | CaseDocNoList.Delete(Index); |
| | | CaseDocNo_CopiesList.Delete(Index); |
| | |
| | | begin |
| | | if DocDir = CaseDocNoList.Strings[i] then |
| | | begin |
| | | //SetRecordEditedDocDir('D',CaseNo,CaseDocNoList.Strings[i]); //20140624 ×§ï§R°£¤å¥ó®É¤]°O¤@µ§²§°Ê,§R±¼·|µLªk³qª¾«eºÝºô¶¦³²§°Ê |
| | | //SetRecordEditedDocDir('D',CaseNo,CaseDocNoList.Strings[i]); //20140624 修改刪除文件時也記一筆異動,刪掉會無法通知前端網頁有異動 |
| | | SetRecordEditedDocDir('A',CaseNo,CaseDocNoList.Strings[i]); |
| | | CaseDocNoList.Delete(i); |
| | | CaseDocNo_CopiesList.Delete(i); |
| | |
| | | begin |
| | | CaseDocNoList.SaveToFile(ImageSavePath+CaseNo+'\CaseDocNo.dat'); |
| | | CaseDocNo_CopiesList.SaveToFile(ImageSavePath+CaseNo+'\CaseDocNo_Copies.dat'); |
| | | //Showmessage('¦s¤F'); |
| | | //Showmessage('存了'); |
| | | end; |
| | | finally |
| | | CaseDocNoList.Free; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.SetContextList(Mode:Char;Index:Integer;CaseNo,DocDir,FileName:String); //'A:¥[¤J,I:´¡¤J,D:§R°£,E:×§ï' |
| | | Procedure TCB_IMGPSScanX.SetContextList(Mode:Char;Index:Integer;CaseNo,DocDir,FileName:String); //'A:加入,I:插入,D:刪除,E:修改' |
| | | var |
| | | i : Integer; |
| | | //DocNo:String; |
| | | begin |
| | | //DocNo := FormCode2DocNo(FileName2FormCode(FileName)); |
| | | if DocDir = '' then |
| | | DocDir := AttName ; //ªþ¥ó |
| | | DocDir := AttName ; //附件 |
| | | ContextList.Clear; |
| | | if FileExists(ImageSavePath+CaseNo+'\'+DocDir+'\Context.dat') then |
| | | ContextList.LoadFromFile(ImageSavePath+CaseNo+'\'+DocDir+'\Context.dat'); |
| | | SetRecordEditedDocDir('A',CaseNo,DocDir); //°O¿ý¤å¥ó¦³²§°Ê |
| | | SetRecordEditedDocDir('A',CaseNo,DocDir); //記錄文件有異動 |
| | | case Mode of |
| | | 'A':begin |
| | | ContextList.Add(FileName); |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.checkCaseOMRDone:Boolean; //Àˬd®×¥ó¬O§_§¹¦¨OMRÀ訅 |
| | | Function TCB_IMGPSScanX.checkCaseOMRDone:Boolean; //檢查案件是否完成OMR檢核 |
| | | var |
| | | i : Integer; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CheckCaseID_OK:Boolean; //Àˬd¬O§_¦³¥¼°t¸¹ªº®×¥ó |
| | | function TCB_IMGPSScanX.checkFormCodeIsCustom(path, formcode: string): boolean; |
| | | var |
| | | i:integer; |
| | | ini : Tmeminifile; |
| | | str1:String; |
| | | begin |
| | | //ShowMessage(path); |
| | | ini := Tmeminifile.Create(Path+'CustomDocNo.ini'); |
| | | str1:=ini.ReadString(Copy(formcode,1,8),'FormID',''); |
| | | //ShowMessage('str1'+str1); |
| | | if str1 = formcode then |
| | | begin |
| | | Result:=True; |
| | | end |
| | | else |
| | | begin |
| | | Result := False; |
| | | end; |
| | | |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CheckCaseID_OK:Boolean; //檢查是否有未配號的案件 |
| | | var |
| | | i,n : Integer; |
| | | begin |
| | | Result := True; |
| | | for i := 0 to NewTreeNode.Count - 1 do |
| | | begin |
| | | if Pos(_msg('¥¼°t¸¹'),NewTreeNode.Item[i].Text) > 0 then |
| | | if Pos(_msg('未配號'),NewTreeNode.Item[i].Text) > 0 then |
| | | begin |
| | | Result := False; |
| | | Break; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.CreateEmptyCase(Path,CaseID:String); //²£¥ÍªÅ¥Õ®×¸¹(«±½¥ó¥Î) |
| | | Procedure TCB_IMGPSScanX.CreateEmptyCase(Path,CaseID:String); //產生空白案號(重掃件用) |
| | | var |
| | | S : TStringlist; |
| | | begin |
| | |
| | | ScrollRec[Index].Rate := iRate; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.FormIDReplace(CaseID,DocDir,OldFormID,NewFormID:String); //«ü©wFormID§ó´«¦¨·sªºFormID |
| | | Procedure TCB_IMGPSScanX.FormIDReplace(CaseID,DocDir,OldFormID,NewFormID:String); //指定FormID更換成新的FormID |
| | | var |
| | | i : Integer; |
| | | OldFileList,NewFileList : TStringlist; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.ShowFileReplace(Path,NewFormID:String);//Åã¥Üªº¼v¹³´«¦¨·sªºFormID |
| | | Procedure TCB_IMGPSScanX.ShowFileReplace(Path,NewFormID:String);//顯示的影像換成新的FormID |
| | | var |
| | | i,n : Integer; |
| | | OldFile,NewFile:String; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.PageReplaceFormID(Path,NowFormID,NewFormID:String); //¿ï¨ú¶§ó´«FormID |
| | | Procedure TCB_IMGPSScanX.PageReplaceFormID(Path,NowFormID,NewFormID:String); //選取頁更換FormID |
| | | var |
| | | i,n : Integer; |
| | | S,S1 : TStringlist; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.ModeNeedCheck(OMRMode,ScanMode:String):Boolean; //±½ºË¼Ò¦¡¬O§_n°µÀ訅 |
| | | Function TCB_IMGPSScanX.ModeNeedCheck(OMRMode,ScanMode:String):Boolean; //掃瞄模式是否要做檢核 |
| | | begin |
| | | Result := False; |
| | | if Pos(ScanMode,OMRMode) > 0 then |
| | | Result := True; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetInputMask:String; //¨ú±o¿é¤Jªº«O³æ¸¹½X |
| | | Function TCB_IMGPSScanX.GetInputMask:String; //取得輸入的保單號碼 |
| | | var |
| | | InputMaskForm: TInputMaskForm; |
| | | begin |
| | | Result := ''; |
| | | ShowText := _msg('¿é¤J«O³æ¸¹½X¤¤'); |
| | | ShowText := _msg('輸入保單號碼中'); |
| | | DataLoading(True,True); |
| | | InputMaskForm := TInputMaskForm.Create(self); |
| | | try |
| | |
| | | begin |
| | | iDocDir := DocDirList.Strings[i]; |
| | | iDocno := DocNoDir2DocNo(iDocDir); |
| | | {if (((FIs_In_Wh = 'Y') and (not DocNoIs_In_WH(iDocNo))) or //¤J®w±½´y¤£¬Ý«D¤J®w¤å¥ó |
| | | {if (((FIs_In_Wh = 'Y') and (not DocNoIs_In_WH(iDocNo))) or //入庫掃描不看非入庫文件 |
| | | ((FIs_In_Wh = 'N') and (DocNoIs_In_WH(iDocNo)))) and |
| | | ((iDocNo <> 'Attach') and (Copy(iDocNo,1,5)<>'ZZZZZ')) then //«D¤J®w±½´y¤£¬Ý¤J®w¤å¥ó |
| | | ((iDocNo <> 'Attach') and (Copy(iDocNo,1,5)<>'ZZZZZ')) then //非入庫掃描不看入庫文件 |
| | | begin |
| | | Continue; |
| | | end;} |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.WriteResize(ImgName,TxtName:String); //²£¥ÍResize.dat |
| | | Procedure TCB_IMGPSScanX.WriteResize(ImgName,TxtName:String); //產生Resize.dat |
| | | var |
| | | TagTxt : String; |
| | | RecHeight,RecWidth : String; |
| | |
| | | if FileExists(TxtName) then |
| | | S.LoadFromFile(TxtName); |
| | | if (RecHeight <> '') and (RecWidth <> '') and ((RecHeight<>ImgHeight) or (RecWidth<>ImgWidth)) then |
| | | S.Add(ExtractfileName(ImgName)+',ìªø:'+RecHeight+',ì¼e:'+RecWidth+',ªøÅܰÊ:'+ImgHeight+',¼eÅܰÊ:'+ImgWidth); |
| | | S.Add(ExtractfileName(ImgName)+',原長:'+RecHeight+',原寬:'+RecWidth+',長變動:'+ImgHeight+',寬變動:'+ImgWidth); |
| | | S.SaveToFile(TxtName); |
| | | finally |
| | | S.Free; |
| | |
| | | |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetCase_PageCount(var CaseCount,PageCount:Integer):Boolean; //¨ú¥X®×¥óªº¼Æ¶q¤Î¶¼Æ |
| | | Function TCB_IMGPSScanX.GetCase_PageCount(var CaseCount,PageCount:Integer):Boolean; //取出案件的數量及頁數 |
| | | var |
| | | i,n: Integer; |
| | | CaseList,DocList,FileList : TStringlist; |
| | |
| | | Result := True; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FindNoSaveBarCode : Boolean; //§ä¬O§_¦³¤£nÀx¦s¼v¹³ªº±ø½X |
| | | Function TCB_IMGPSScanX.FindNoSaveBarCode : Boolean; //找是否有不要儲存影像的條碼 |
| | | var |
| | | i,n : Integer; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.BarCode2CaseID : String; //Barcode¨Ì³W«hÂনCaseID |
| | | Function TCB_IMGPSScanX.BarCode2CaseID : String; //Barcode依規則轉成CaseID |
| | | var |
| | | i : Integer; |
| | | iCaseID : String; |
| | | begin |
| | | Result := ''; //¨S§ä¨ì |
| | | Result := ''; //沒找到 |
| | | iCaseID := ''; |
| | | for i := 1 to MpsBarcodeinf.Count-1 do |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.BarCode2FormID : String; //Barcode¨Ì³W«hÂনFormID |
| | | Function TCB_IMGPSScanX.BarCode2FormID : String; //Barcode依規則轉成FormID |
| | | var |
| | | i : Integer; |
| | | FormID : String; |
| | | begin |
| | | Result := ''; //¨S§ä¨ì |
| | | Result := ''; //沒找到 |
| | | FormID := ''; |
| | | for i := 1 to MpsBarcodeinf.Count do |
| | | begin |
| | |
| | | if not FormIDAppear(FormID) then |
| | | FormID := ''; |
| | | end; |
| | | if (FormID <> '') and FormIDExists(FormID,False,0) then //¦³¥i¥ÎªºFormID´NÂ÷¶} |
| | | if (FormID <> '') and FormIDExists(FormID,False,0) then //有可用的FormID就離開 |
| | | begin |
| | | Result := FormID; |
| | | Break; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetDocNoDir(Path,DocNo:String):String; //¨ú¥X¥Ø«eDocNoªº¥÷¼Æ |
| | | Function TCB_IMGPSScanX.GetDocNoDir(Path,DocNo:String):String; //取出目前DocNo的份數 |
| | | var |
| | | i : Integer; |
| | | iDocNo : String; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CheckFormIDExists(DocNoNode:TTreeNode;FormID:String):Boolean; //ÀˬdFormID¬O§_¦s¦b¤å¥ó¸Ì |
| | | Function TCB_IMGPSScanX.CheckFormIDExists(DocNoNode:TTreeNode;FormID:String):Boolean; //檢查FormID是否存在文件裡 |
| | | var |
| | | i : Integer; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.DocNo2DocNoDir(Path,DocNo:String):String; //DocNoÂনDocNo(¥÷¼Æ)¥Ø¿ý |
| | | Function TCB_IMGPSScanX.DocNo2DocNoDir(Path,DocNo:String):String; //DocNo轉成DocNo(份數)目錄 |
| | | var |
| | | i : Integer; |
| | | iDocNo : String; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.DocNoDir2DocNo(DocNoDir:String):String; //DocNo(¥÷¼Æ)¥Ø¿ýÂনDocNo |
| | | Function TCB_IMGPSScanX.DocNoDir2DocNo(DocNoDir:String):String; //DocNo(份數)目錄轉成DocNo |
| | | var |
| | | v,ln : Integer; |
| | | begin |
| | |
| | | Result := DocNoDir |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.DocNoDir2Index(Path,DocNoDir:String):Integer; //DocNo(¥÷¼Æ)¥Ø¿ýÂনindex |
| | | Function TCB_IMGPSScanX.DocNoDir2Index(Path,DocNoDir:String):Integer; //DocNo(份數)目錄轉成index |
| | | var |
| | | i : Integer; |
| | | CaseNo_List : TStringlist; |
| | |
| | | if FileExists(SoPath+'UseCase.ini') then |
| | | ZipfileList.Add(SoPath+'UseCase.ini'); |
| | | |
| | | if FileExists(SoPath+'FirstImg.zip') then//20170315 加的 |
| | | begin |
| | | ZipfileList.Add(SoPath+'FirstImg.zip'); |
| | | end; |
| | | |
| | | |
| | | ExeCuteZip(DePath+ZipName,SoPath,ZipFileList,False,False); |
| | | //Showmessage('111'); |
| | | finally |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.ZipMaskFile(SoPath,MarkPath,DePath,ZipName:String); //À£ÁY¾B¸n¼v¹³ÀÉ |
| | | Procedure TCB_IMGPSScanX.ZipMaskFile(SoPath,MarkPath,DePath,ZipName:String); //壓縮遮罩影像檔 |
| | | var |
| | | ZipFileList : TStringlist; |
| | | n : Integer; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.ParserPoint(S:String); //¸ÑªR¤Q¦rÂIªº¦r¦ê |
| | | Procedure TCB_IMGPSScanX.ParserPoint(S:String); //解析十字點的字串 |
| | | var |
| | | PointList : TStringlist; |
| | | Rect : TRect; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FormID2Anchor(FormID:String):String; //¥ÎFormID¨ú¥X¤Q¦r¼Ò¦¡ |
| | | Function TCB_IMGPSScanX.FormID2Anchor(FormID:String):String; //用FormID取出十字模式 |
| | | var |
| | | Anchor : String; |
| | | begin |
| | |
| | | Result := Index2Anchor(Anchor); |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.Index2Anchor(Anchor:String):String; //¤Q¦r¼Ò¦¡ 0->NONE;1->ANCHOR;2->FRAME |
| | | Function TCB_IMGPSScanX.Index2Anchor(Anchor:String):String; //十字模式 0->NONE;1->ANCHOR;2->FRAME |
| | | begin |
| | | if Anchor = '0' then |
| | | Result := 'NONE' |
| | |
| | | procedure TCB_IMGPSScanX.ScanDuplexCBClick(Sender: TObject); |
| | | begin |
| | | ScanDuplex := ScanDuplexCB.Checked; |
| | | //R_W_ScanIni('W'); //usern¨D§ï¦¨¹w³]«á¤£¯à§ï |
| | | //R_W_ScanIni('W'); //user要求改成預設後不能改 |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetFormatID(CaseID: string):String; |
| | |
| | | if FileExists(ImageSavePath+CaseID+'\CaseIndex.dat') then |
| | | begin |
| | | S.LoadFromFile(ImageSavePath+CaseID+'\CaseIndex.dat'); |
| | | //Format_ID := S.Strings[5]; //¥DÁäÈ (³ø»ù³æ¸¹orÄò«O³æ¸¹or«O³æ¸¹½Xor«OÀIÃÒ¸¹orì®×¥ó¨ü½s) |
| | | //Format_ID := S.Strings[5]; //主鍵值 (報價單號or續保單號or保單號碼or保險證號or原案件受編) |
| | | //Result := Format_ID; |
| | | //Handle_No := S.Strings[0]; //¸g¿ì¥N¸¹ |
| | | //Cen_Uid := S.Strings[1]; //³Q«O¤HID |
| | | //Cen_Cliname := S.Strings[2]; //³Q«O¤H©m¦W |
| | | //Cen_Platno := S.Strings[3]; //¨®¸¹ |
| | | //Case_Priority := S.Strings[4];//®×¥óµ¥¯Å |
| | | //Handle_No := S.Strings[0]; //經辦代號 |
| | | //Cen_Uid := S.Strings[1]; //被保人ID |
| | | //Cen_Cliname := S.Strings[2]; //被保人姓名 |
| | | //Cen_Platno := S.Strings[3]; //車號 |
| | | //Case_Priority := S.Strings[4];//案件等級 |
| | | end; |
| | | finally |
| | | S.Free; |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.MemoInfoTransfer(Mode,Str:String;ID_S,Name_S:TStringlist):String; //µù°O¥N½Xµù°OÃþ§OÂà´« Mode 'ID':¥N½XÂà¦WºÙ;'NAME':¦WºÙÂà¥N½X |
| | | Function TCB_IMGPSScanX.MemoInfoTransfer(Mode,Str:String;ID_S,Name_S:TStringlist):String; //註記代碼註記類別轉換 Mode 'ID':代碼轉名稱;'NAME':名稱轉代碼 |
| | | var |
| | | i : Integer; |
| | | begin |
| | | if Mode = 'ID' then |
| | | begin |
| | | Result := '¦Û¦æ¿é¤J'; |
| | | Result := '自行輸入'; |
| | | for i := 0 to ID_S.Count - 1 do |
| | | begin |
| | | if Str = ID_S.Strings[i] then |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.SetSQLData(ColumeStr:String;FromList,ToList:TStringlist); //§âSQLȶë¤J |
| | | Procedure TCB_IMGPSScanX.SetSQLData(ColumeStr:String;FromList,ToList:TStringlist); //把SQL值塞入 |
| | | var |
| | | i : Integer; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetSQLData(TableList:TStringlist;Colname:String;colNo:Integer):String; //¨ÌÄæ¦ì¤Î¯Á¤Þ¨úÈ |
| | | Function TCB_IMGPSScanX.GetSQLData(TableList:TStringlist;Colname:String;colNo:Integer):String; //依欄位及索引取值 |
| | | var |
| | | i,col,v,v1 : Integer; |
| | | ColStr,DataStr: TStringList; |
| | |
| | | DataStr.Free; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FindSQLData(TableList:TStringlist;ColumeStr,KeyColumeStr,KeyStr:String;ColNo:Integer;Var ResultList:TStringlist):Boolean; //§ä«ü©wªº¸ê®Æ |
| | | Function TCB_IMGPSScanX.FindSQLData(TableList:TStringlist;ColumeStr,KeyColumeStr,KeyStr:String;ColNo:Integer;Var ResultList:TStringlist):Boolean; //找指定的資料 |
| | | Var i,n,Findindex : Integer; |
| | | ColList,KeyColList,KeyList : TStringlist; |
| | | Cols,Keycols,keys :String; |
| | |
| | | KeyList.CommaText := KeyStr; |
| | | if ColNo = 0 then |
| | | begin |
| | | for i := 1 to TableList.Count -1 do //§äkey¹ï¤£¹ï |
| | | for i := 1 to TableList.Count -1 do //找key對不對 |
| | | begin |
| | | Findindex := i; |
| | | for n := 0 to KeyColList.Count - 1 do |
| | |
| | | keys := KeyList.Strings[n]; |
| | | //Showmessage(keys); |
| | | //Showmessage(TableList.Strings[i]); |
| | | if GetSQLData(TableList,Keycols,i) = keys then //¹ï.Ä~Äò |
| | | //if Pos('!@!'+keys+'!@!','!@!'+TableList.Strings[i]+'!@!') >0 then //¦b¸ê®Æ¦C«e«á¥[!@! ¥Îposªº¤è¦¡¨Ó§ïµ½³t«× //20130521µo²{§ä¸ê®Æ·|¦³°ÝÃD |
| | | if GetSQLData(TableList,Keycols,i) = keys then //對.繼續 |
| | | //if Pos('!@!'+keys+'!@!','!@!'+TableList.Strings[i]+'!@!') >0 then //在資料列前後加!@! 用pos的方式來改善速度 //20130521發現找資料會有問題 |
| | | Continue |
| | | Else //¤£¹ï.Â÷¶} |
| | | Else //不對.離開 |
| | | begin |
| | | Find := False; |
| | | Break; |
| | | end; |
| | | end; |
| | | if Find then Break; // §ä¨ì¤FÂ÷¶} |
| | | if Find then Break; // 找到了離開 |
| | | end; |
| | | end |
| | | Else |
| | |
| | | Find := True; |
| | | Keycols := KeyColList.Strings[n]; |
| | | keys := KeyList.Strings[n]; |
| | | //if GetSQLData(TableList,Keycols,i) = keys then //¹ï.Ä~Äò |
| | | if Pos('!@!'+keys+'!@!','!@!'+TableList.Strings[i]+'!@!') >0 then //¦b¸ê®Æ¦C«e«á¥[!@! ¥Îposªº¤è¦¡¨Ó§ïµ½³t«× |
| | | //if GetSQLData(TableList,Keycols,i) = keys then //對.繼續 |
| | | if Pos('!@!'+keys+'!@!','!@!'+TableList.Strings[i]+'!@!') >0 then //在資料列前後加!@! 用pos的方式來改善速度 |
| | | Continue |
| | | Else //¤£¹ï.Â÷¶} |
| | | Else //不對.離開 |
| | | begin |
| | | Find := False; |
| | | Break; |
| | | end; |
| | | end; |
| | | end; |
| | | if Find then //¦³§ä¨ìkey |
| | | if Find then //有找到key |
| | | begin |
| | | for n := 0 to ColList.Count -1 do |
| | | begin |
| | |
| | | |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.DataLoading(Loading:Boolean;UseTimer:Boolean); //¸ê®Æ¸ü¤J¤¤n°±¤îÂI¿ïªº°Ê§@ |
| | | Procedure TCB_IMGPSScanX.DataLoading(Loading:Boolean;UseTimer:Boolean); //資料載入中要停止點選的動作 |
| | | begin |
| | | If Loading Then |
| | | begin |
| | |
| | | ErrlistForm : TErrlistForm; |
| | | S : TStringlist; |
| | | UpFormID : String; |
| | | Anchor : String; |
| | | begin |
| | | ShowText := _Msg('³B²zÀˮ֥¢±Ñ¤¤,½ÐµyÔ'); |
| | | ShowText := _Msg('處理檢核失敗中,請稍候'); |
| | | DataLoading(True,True); |
| | | ErrlistForm := TErrlistForm.Create(Self); |
| | | RejectCase := False; |
| | |
| | | TransPath := ImageSavePath+NowCaseNo+'\'; |
| | | if FMode = 'ISCAN' then |
| | | TransPath := ImageSavePath + NowCaseNo+'\DownTemp\'; |
| | | ShowText := NowCaseNo+_Msg('¸ê®Æ¤W¶Ç¤¤,½ÐµyÔ'); |
| | | ShowText := NowCaseNo+_Msg('資料上傳中,請稍候'); |
| | | DataLoading(True,True); |
| | | |
| | | if FMode = 'ISCAN' then |
| | | begin |
| | | If Not TransCaseID(TransPath,NowCaseNo,True) Then //¶Ç°e®×¥ó |
| | | If Not TransCaseID(TransPath,NowCaseNo,True) Then //傳送案件 |
| | | begin |
| | | DataLoading(False,False); |
| | | Exit; |
| | |
| | | end |
| | | Else |
| | | begin |
| | | If Not TransCaseID(TransPath,NowCaseNo,True) Then //¶Ç°e®×¥ó |
| | | If Not TransCaseID(TransPath,NowCaseNo,True) Then //傳送案件 |
| | | begin |
| | | DataLoading(False,False); |
| | | Exit; |
| | |
| | | end; |
| | | CaseHelpBtn.Visible := False; |
| | | LoadImgFile; |
| | | Showmessage(NowCaseNo+_Msg('¶Ç°e§¹¦¨')); |
| | | Showmessage(NowCaseNo+_Msg('傳送完成')); |
| | | DataLoading(False,False); |
| | | end |
| | | Else |
| | |
| | | begin |
| | | //if TreeView1.Selected = nil then Exit; |
| | | //if TreeView1.Selected = NewTreeNode then Exit; |
| | | Displaypath := ''; //20130327 ×¥¿³ø»ù³æ¸¹·|¿ù¸mªº°ÝÃD |
| | | Displaypath := ''; //20130327 修正報價單號會錯置的問題 |
| | | S := TStringlist.Create; |
| | | try |
| | | ClearView(1); |
| | | ShowText := CaseID+_Msg('Àˮ֤¤,½ÐµyÔ'); |
| | | ShowText := CaseID+_Msg('檢核中,請稍候'); |
| | | DataLoading(True,True); |
| | | For i := 0 to NewTreeNode.Count -1 do |
| | | begin |
| | | v := posend('-',NewTreenode.Item[i].Text); |
| | | CaseID := Copy(NewTreenode.Item[i].Text,1,v-1); |
| | | ShowText := CaseID+_Msg('Àˮ֤¤,½ÐµyÔ'); |
| | | ShowText := CaseID+_Msg('檢核中,請稍候'); |
| | | DataLoading(True,True); |
| | | if (NewTreenode.Item[i].ImageIndex <> 7) and (NewTreenode.Item[i].ImageIndex <> 5) then //Àˮ֧¹¦¨ªº¤£¦AÀ訅 |
| | | if (NewTreenode.Item[i].ImageIndex <> 7) and (NewTreenode.Item[i].ImageIndex <> 5) then //檢核完成的不再檢核 |
| | | begin |
| | | If OMRCheckCase(CaseID) then //¦³¦¨¥\ |
| | | If OMRCheckCase(CaseID) then //有成功 |
| | | begin |
| | | S.Add('Y'); |
| | | S.SaveToFile(ImageSavePath+CaseID+'\OMRCheckOk.dat'); |
| | | end; |
| | | end; |
| | | //MyTreeNode2ReFresh(CaseID); //쥻¬OOMR³æ¤@®×¥ó,«á§ï¦¨OMR¥þ³¡®×¥ó ©Ò¥H³oÓnmark |
| | | //MyTreeNode2ReFresh(CaseID); //原本是OMR單一案件,後改成OMR全部案件 所以這個要mark |
| | | end; |
| | | LoadImgFile; |
| | | TreeView1Click(nil); |
| | |
| | | finally |
| | | S.Free; |
| | | end; |
| | | Showmessage(_Msg('Àˮ֧¹¦¨')); |
| | | Showmessage(_Msg('檢核完成')); |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.ClearView(stkv:Integer); |
| | |
| | | ISB1Click(ISB1); |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.DrawDocItem2(CaseNode : TTreenode;Caseno:String):Boolean; //µe¥X¤å¥ó¦WºÙªºTree |
| | | Function TCB_IMGPSScanX.DrawDocItem2(CaseNode : TTreenode;Caseno:String):Boolean; //畫出文件名稱的Tree |
| | | Var |
| | | i,n,m : Integer; |
| | | DocNode,FormNode : TTreeNode; |
| | |
| | | try |
| | | CaseNode.ImageIndex := 1; |
| | | CaseNode.SelectedIndex := 1; |
| | | While CaseNode.Count > 0 do //¥þ§R |
| | | While CaseNode.Count > 0 do //全刪 |
| | | begin |
| | | CaseNode.Item[0].Delete; |
| | | end; |
| | |
| | | iDocNo := DocNoDir2DocNo(CaseDocNoList.Strings[i]); |
| | | //Showmessage(iDocNo); |
| | | //Showmessage(DocNo2DocName(Caseno,iDocNo)); |
| | | {if (((FIs_In_Wh = 'Y') and (not DocNoIs_In_WH(iDocNo))) or //¤J®w±½´y¤£¬Ý«D¤J®w¤å¥ó |
| | | {if (((FIs_In_Wh = 'Y') and (not DocNoIs_In_WH(iDocNo))) or //入庫掃描不看非入庫文件 |
| | | ((FIs_In_Wh = 'N') and (DocNoIs_In_WH(iDocNo)))) and |
| | | ((iDocNo <> 'Attach') and (Copy(iDocNo,1,5)<>'ZZZZZ')) then //«D¤J®w±½´y¤£¬Ý¤J®w¤å¥ó |
| | | ((iDocNo <> 'Attach') and (Copy(iDocNo,1,5)<>'ZZZZZ')) then //非入庫掃描不看入庫文件 |
| | | begin |
| | | Continue; |
| | | end;} |
| | | if not DocNoAppear(iDocNo) then Continue; |
| | | |
| | | |
| | | //DocNode := TreeView1.Items.AddChild(CaseNode,Format('%s{%s}-%d'+_msg('¶'),[CaseDocNoList.Strings[i],DocNo2DocName(Caseno,iDocNo),DocNoPage])); |
| | | //DocNode := TreeView1.Items.AddChild(CaseNode,Format('%s{%s}-%d'+_msg('¥÷'),[CaseDocNoList.Strings[i],DocNo2DocName(Caseno,iDocNo),DocNoCopies])); |
| | | DocNode := TreeView1.Items.AddChild(CaseNode,Format('%s{%s}-%d'+_msg('¥÷'),[DocNo2DocName(Caseno,iDocNo),CaseDocNoList.Strings[i],DocNoCopies])); |
| | | //DocNode := TreeView1.Items.AddChild(CaseNode,Format('%s{%s}-%d'+_msg('頁'),[CaseDocNoList.Strings[i],DocNo2DocName(Caseno,iDocNo),DocNoPage])); |
| | | //DocNode := TreeView1.Items.AddChild(CaseNode,Format('%s{%s}-%d'+_msg('份'),[CaseDocNoList.Strings[i],DocNo2DocName(Caseno,iDocNo),DocNoCopies])); |
| | | DocNode := TreeView1.Items.AddChild(CaseNode,Format('%s{%s}-%d'+_msg('份'),[DocNo2DocName(Caseno,iDocNo),CaseDocNoList.Strings[i],DocNoCopies])); |
| | | |
| | | if GetUseCase('F',ImageSavePath+Caseno+'\',CaseDocNoList.Strings[i]) <> '' Then |
| | | begin |
| | |
| | | DocNode.ImageIndex := 2; |
| | | DocNode.SelectedIndex := 2; |
| | | end; |
| | | if ((Pos('ZZZZZ',DocNode.Text) = 0) and (Pos('YYYYY',DocNode.Text) = 0)) and (FileList.Count =0) then //¨î¦¡¤å¥ó |
| | | if ((Pos('ZZZZZ',DocNode.Text) = 0) and (Pos('YYYYY',DocNode.Text) = 0)) and (FileList.Count =0) then //制式文件 |
| | | begin |
| | | for n := 1 to LASTEST_FORM_INF_List.Count - 1 do |
| | | begin |
| | |
| | | FormID := iiFormID; |
| | | FormPage := GetFormIDPage(FileList,FormID); |
| | | FormName := FormCode2FormName(Caseno,FormID); |
| | | //FormNode := TreeView1.Items.AddChild(DocNode,FormID+'{'+FormName+'}-'+inttostr(FormPage)+_msg('¶')); |
| | | FormNode := TreeView1.Items.AddChild(DocNode,FormName+'{'+FormID+'}-'+inttostr(FormPage)+_msg('¶')); |
| | | //FormNode := TreeView1.Items.AddChild(DocNode,FormID+'{'+FormName+'}-'+inttostr(FormPage)+_msg('頁')); |
| | | FormNode := TreeView1.Items.AddChild(DocNode,FormName+'{'+FormID+'}-'+inttostr(FormPage)+_msg('頁')); |
| | | FormNode.ImageIndex := 4; |
| | | FormNode.SelectedIndex := 4; |
| | | DocNode.AlphaSort(True); |
| | | end; |
| | | end; |
| | | end |
| | | else if (Pos('ZZZZZ',DocNode.Text) > 0) or (Pos('YYYYY',DocNode.Text) > 0) then //¦Ûq¤å¥ó |
| | | else if (Pos('ZZZZZ',DocNode.Text) > 0) or (Pos('YYYYY',DocNode.Text) > 0) then //自訂文件 |
| | | begin |
| | | FormID := GetCustomFormID(ImageSavePath+Caseno+'\',CaseDocNoList.Strings[i]); |
| | | //showmessage(FileList.Text); |
| | | FormPage := GetFormIDPage(FileList,FormID); |
| | | FormName := FormCode2FormName(Caseno,FormID); |
| | | //FormNode := TreeView1.Items.AddChild(DocNode,FormID+'{'+FormName+'}-'+inttostr(FormPage)+_msg('¶')); |
| | | FormNode := TreeView1.Items.AddChild(DocNode,FormName+'{'+FormID+'}-'+inttostr(FormPage)+_msg('¶')); |
| | | //FormNode := TreeView1.Items.AddChild(DocNode,FormID+'{'+FormName+'}-'+inttostr(FormPage)+_msg('頁')); |
| | | FormNode := TreeView1.Items.AddChild(DocNode,FormName+'{'+FormID+'}-'+inttostr(FormPage)+_msg('頁')); |
| | | FormNode.ImageIndex := 4; |
| | | FormNode.SelectedIndex := 4; |
| | | DocNode.AlphaSort(True); |
| | | end; |
| | | SortDocDir_FormID(Caseno,CaseDocNoList.Strings[i]); //ÀɦW¨ÌFormID±Æ§Ç |
| | | SortDocDir_FormID(Caseno,CaseDocNoList.Strings[i]); //檔名依FormID排序 |
| | | |
| | | for n := 0 to FileList.Count - 1 do |
| | | begin |
| | |
| | | FormID := iiFormID; |
| | | FormPage := GetFormIDPage(FileList,FormID); |
| | | FormName := FormCode2FormName(Caseno,FormID); |
| | | //FormNode := TreeView1.Items.AddChild(DocNode,FormID+'{'+FormName+'}-'+inttostr(FormPage)+_msg('¶')); |
| | | FormNode := TreeView1.Items.AddChild(DocNode,FormName+'{'+FormID+'}-'+inttostr(FormPage)+_msg('¶')); |
| | | //FormNode := TreeView1.Items.AddChild(DocNode,FormID+'{'+FormName+'}-'+inttostr(FormPage)+_msg('頁')); |
| | | FormNode := TreeView1.Items.AddChild(DocNode,FormName+'{'+FormID+'}-'+inttostr(FormPage)+_msg('頁')); |
| | | |
| | | FormNode.ImageIndex := 4; |
| | | FormNode.SelectedIndex := 4; |
| | |
| | | // Application.ProcessMessages; |
| | | // FormPage := GetFormIDPage(FileList,FormID); |
| | | /// FormName := FormCode2FormName(Caseno,FormID); |
| | | /// FormNode := TreeView1.Items.AddChild(DocNode,FormID+'{'+FormName+'}-'+inttostr(FormPage)+_msg('¶')); |
| | | /// FormNode := TreeView1.Items.AddChild(DocNode,FormID+'{'+FormName+'}-'+inttostr(FormPage)+_msg('頁')); |
| | | // FormNode.ImageIndex := 4; |
| | | // FormNode.SelectedIndex := 4; |
| | | //end; |
| | |
| | | end; |
| | | DocNoPage := FileList.Count; |
| | | iDocNo := DocNoDir2DocNo(AttName); |
| | | //DocNode := TreeView1.Items.AddChild(CaseNode,Format('%s{%s}-%d'+_msg('¥÷'),[AttName,DocNo2DocName(Caseno,iDocNo),1])); |
| | | DocNode := TreeView1.Items.AddChild(CaseNode,Format('%s{%s}-%d'+_msg('¥÷'),[DocNo2DocName(Caseno,iDocNo),AttName,1])); |
| | | //DocNode := TreeView1.Items.AddChild(CaseNode,Format('%s{%s}-%d'+_msg('份'),[AttName,DocNo2DocName(Caseno,iDocNo),1])); |
| | | DocNode := TreeView1.Items.AddChild(CaseNode,Format('%s{%s}-%d'+_msg('份'),[DocNo2DocName(Caseno,iDocNo),AttName,1])); |
| | | DocNode.ImageIndex := 2; |
| | | DocNode.SelectedIndex := 2; |
| | | for n := 0 to FileList.Count - 1 do |
| | |
| | | begin |
| | | FormPage := GetFormIDPage(FileList,FormID); |
| | | FormName := FormCode2FormName(Caseno,FormID); |
| | | //FormNode := TreeView1.Items.AddChild(DocNode,FormID+'{'+FormName+'}-'+inttostr(FormPage)+_msg('¶')); |
| | | FormNode := TreeView1.Items.AddChild(DocNode,FormName+'{'+FormID+'}-'+inttostr(FormPage)+_msg('¶')); |
| | | //FormNode := TreeView1.Items.AddChild(DocNode,FormID+'{'+FormName+'}-'+inttostr(FormPage)+_msg('頁')); |
| | | FormNode := TreeView1.Items.AddChild(DocNode,FormName+'{'+FormID+'}-'+inttostr(FormPage)+_msg('頁')); |
| | | |
| | | FormNode.ImageIndex := 4; |
| | | FormNode.SelectedIndex := 4; |
| | |
| | | end; |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.initParameter; |
| | | begin |
| | | |
| | | // if FCaseNoLength=0 then |
| | | // begin |
| | | // |
| | | // end; |
| | | |
| | | if FFileSizeLimit = 0 then |
| | | begin |
| | | FFileSizeLimit := 5*1024; |
| | | end; |
| | | |
| | | |
| | | if FImgDPI=0 then |
| | | begin |
| | | FImgDPI := 300; |
| | | ScanDpi := FImgDPI; |
| | | end |
| | | else |
| | | begin |
| | | //FImgDPI := StrToInt(Value); |
| | | ScanDpi := FImgDPI; |
| | | end; |
| | | |
| | | if FScanColor = 0 then |
| | | begin |
| | | ScanColor := ifBlackWhite; |
| | | end; |
| | | |
| | | if FScanColor = 1 then |
| | | begin |
| | | ScanColor := ifGray256 ; |
| | | end; |
| | | |
| | | if FScanColor = 2 then |
| | | begin |
| | | ScanColor := ifTrueColor ; |
| | | end; |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.PrtLbClick(Sender: TObject); |
| | | var |
| | | Width : Double; |
| | |
| | | PrtDialog : TPrintDialog; |
| | | S : String; |
| | | begin |
| | | ShowText := '¦C¦L¤¤,½ÐµyÔ'; |
| | | ShowText := '列印中,請稍候'; |
| | | DataLoading(True,True); |
| | | Case2upload(NowCaseNo); //²£¥Íì¼v¹³µ²ºc |
| | | Case2upload(NowCaseNo); //產生原影像結構 |
| | | |
| | | |
| | | //ontextList.LoadFromFile(ImageSavePath+NowCaseNo+'\Upload\Context.dat'); |
| | |
| | | FileList.LoadFromFile(ImageSavePath+NowCaseNo+'\Upload\Context.dat'); |
| | | DocDirList.LoadFromFile(ImageSavePath+NowCaseNo+'\Upload\DocDir.dat'); |
| | | |
| | | InitialLanguage(PrintForm); //¸ü¤J¦h°ê»y¨¥ |
| | | InitialLanguage(PrintForm); //載入多國語言 |
| | | PrintForm.CheckListBox1.Items.Clear; |
| | | For i := 0 to FileList.Count - 1 do |
| | | begin |
| | |
| | | end; |
| | | if S = '' then |
| | | begin |
| | | Showmessage(_msg('©|¥¼¿ï¾Ü±ý¦C¦L¤å¥ó')); |
| | | Showmessage(_msg('尚未選擇欲列印文件')); |
| | | Exit; |
| | | end |
| | | Else |
| | |
| | | OldCaseInfoForm.FReWrite := FReWrite; |
| | | OldCaseInfoForm.FOldCaseInfo := FOldCaseInfo; |
| | | |
| | | //OldCaseInfoList ®×¥ó½s¸¹@#,¦~«×@#,·~°È§O@#,¬O§_ÂÂ¥ó@#,¤å¥ó½s¸¹[¥÷¼Æ]@#,¤å¥ó½s¸¹[¥÷¼Æ] tab ®×¥ó½s¸¹@#,¦~«×@#,·~°È§O@#,¬O§_ÂÂ¥ó@#,¤å¥ó½s¸¹[¥÷¼Æ]@#,¤å¥ó½s¸¹[¥÷¼Æ] |
| | | //OldCaseInfoList 案件編號@#,年度@#,業務別@#,是否舊件@#,文件編號[份數]@#,文件編號[份數] tab 案件編號@#,年度@#,業務別@#,是否舊件@#,文件編號[份數]@#,文件編號[份數] |
| | | OldCaseInfoList.StrictDelimiter := true; |
| | | OldCaseInfoList.Delimiter := #9; |
| | | OldCaseInfoList.DelimitedText := FOldCaseInfo; |
| | |
| | | |
| | | |
| | | iDocNoList.Add(NewDocDir); |
| | | Oldcopies := GetDocDirCopies(NowCaseNo+'\'+OldCaseInfoForm.UseCaseID,OldDocDir); //®תºCaseID ©ñ¦b·s®×CaseID¥Ø¿ý¸Ì |
| | | Oldcopies := GetDocDirCopies(NowCaseNo+'\'+OldCaseInfoForm.UseCaseID,OldDocDir); //舊案的CaseID 放在新案CaseID目錄裡 |
| | | if FileExists(ImageSavePath+NowCaseNo+'\'+OldCaseInfoForm.UseCaseID+'\CaseDocNo_Copies.dat') then |
| | | iDocNo_CopiesList.Add(inttostr(Oldcopies)) |
| | | else |
| | |
| | | end; |
| | | MkDir(NewPath+NewDocDir); |
| | | end; |
| | | SetUseCase('A',NewPath,NewDocDir,OldCaseInfoForm.UseCaseID,''); //NewDocDir ±qþ¨Óªº |
| | | SetUseCase('A',OldPath,OldDocDir,'',NowCaseNo); //OldDocDir ¥hþ¤F |
| | | StringtoFile('Y',OldPath+'UseCase.dat'); //n¤W¶Ç |
| | | SetUseCase('A',NewPath,NewDocDir,OldCaseInfoForm.UseCaseID,''); //NewDocDir 從哪來的 |
| | | SetUseCase('A',OldPath,OldDocDir,'',NowCaseNo); //OldDocDir 去哪了 |
| | | StringtoFile('Y',OldPath+'UseCase.dat'); //要上傳 |
| | | for n := 0 to DocNoList.Count - 1 do |
| | | begin |
| | | if OldDocDir = DocNoList.Strings[n] then |
| | |
| | | iDocNoList.SaveToFile(NewPath+'CaseDocNo.dat'); |
| | | iDocNo_CopiesList.SaveToFile(NewPath+'CaseDocNo_Copies.dat'); |
| | | DrawDocItem2(MyTreeNode1,NowCaseNo); |
| | | MyTreeNode1.Text := Format('%s-%d'+_Msg('¶'),[NowCaseno,GetCasePage(ImageSavePath,NowCaseNo)]); |
| | | MyTreeNode1.Text := Format('%s-%d'+_Msg('頁'),[NowCaseno,GetCasePage(ImageSavePath,NowCaseNo)]); |
| | | NewTreeNodeRefresh; |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | end; |
| | | finally |
| | | OldCaseInfoForm.OldDocDirList.Free; |
| | |
| | | end; |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.LoadImgFile; //¸ü¤J·s¥ó¤Î´À´«¥ó |
| | | procedure TCB_IMGPSScanX.LastInitFormidListCreate(path: string); |
| | | var |
| | | i:integer; |
| | | ST1:TStringList; |
| | | str1:string; |
| | | begin |
| | | //ShowMessage('path='+path); |
| | | ST1:=TStringList.Create; |
| | | ST1.LoadFromFile(path+'FormCode_Name.dat'); |
| | | for I := 0 to ST1.Count - 1 do |
| | | begin |
| | | if (Pos('_',St1.Strings[i])<>1) and (Pos('_',St1.Strings[i])<>-11) then |
| | | begin |
| | | str1:=Copy(ST1.Strings[i],1,Pos('_',St1.Strings[i])-1); |
| | | if LastInitFormidList.IndexOf(str1) = -1 then |
| | | begin |
| | | LastInitFormidList.Add(str1); |
| | | end; |
| | | end; |
| | | end; |
| | | |
| | | ST1.Free; |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.LoadImgFile; //載入新件及替換件 |
| | | Var |
| | | i,v,v1,m : Integer; |
| | | CasePage : integer; |
| | |
| | | DisplayPath := ''; |
| | | ClearCaseIndex; |
| | | CaseHelpBtn.Visible := False; |
| | | //Del_Sub_NothingPath(ImageSavePath); //²M±¼®×¥ó¥Ø¿ý¬OªÅªº |
| | | //Del_Sub_NothingPath(ImageSavePath); //清掉案件目錄是空的 |
| | | TreeView1.Items.Clear; |
| | | NewTreeNode := nil; |
| | | MyTreenode1 := nil; |
| | | MyTreenode2 := nil; |
| | | MyTreenode3 := nil; |
| | | NewTreeNode := TreeView1.Items.Add(nil,Format(_Msg('%s-¦@%dµ§¦@%d¶'),[FModeName,0,0])); |
| | | NewTreeNode := TreeView1.Items.Add(nil,Format(_Msg('%s-共%d筆共%d頁'),[FModeName,0,0])); |
| | | NewTreenode.ImageIndex := 0; |
| | | NewTreenode.SelectedIndex := 0; |
| | | Del_Sub_NothingPath(ImageSavePath); //²M±¼®×¥ó¥Ø¿ý¬OªÅªº |
| | | Del_Sub_NothingPath(ImageSavePath); //清掉案件目錄是空的 |
| | | GetCase_PageCount(CaseCount,PageCount); |
| | | CaseList.Clear; |
| | | if FileExists(ImageSavePath + 'CaseList.dat') then |
| | |
| | | end; |
| | | |
| | | CasePage := GetCasePage(ImageSavePath,CaseList.Strings[i]); |
| | | MytreeNode1 := TreeView1.Items.AddChild(NewTreeNode,Format(_Msg('%s-%d¶'),[CaseList.Strings[i],CasePage])); |
| | | MytreeNode1 := TreeView1.Items.AddChild(NewTreeNode,Format(_Msg('%s-%d頁'),[CaseList.Strings[i],CasePage])); |
| | | MytreeNode1.ImageIndex := 1; |
| | | MytreeNode1.SelectedIndex := 1; |
| | | DrawDocItem2(MytreeNode1,CaseList.Strings[i]); //ªø¥X¤å¥ó¦WºÙªº¾ð¨Ã¶Ç¦^¬O§_¦³¥Ó½Ð®Ñªº¼v¹³ |
| | | if Pos(_Msg('¥¼°t¸¹'),CaseList.Strings[i]) > 0 then |
| | | DrawDocItem2(MytreeNode1,CaseList.Strings[i]); //長出文件名稱的樹並傳回是否有申請書的影像 |
| | | if Pos(_Msg('未配號'),CaseList.Strings[i]) > 0 then |
| | | begin |
| | | MytreeNode1.ImageIndex := 5; |
| | | MytreeNode1.SelectedIndex := 5; |
| | |
| | | MyTreenode1.ImageIndex := 5; |
| | | MyTreenode1.SelectedIndex := 5; |
| | | |
| | | //AllEnforceLb.Visible := True; //¥þ³¡±j¢°e¥ó |
| | | //AllEnforceLb.Visible := True; //全部強迫送件 |
| | | end; |
| | | end; |
| | | MyTreenode1 := nil; |
| | |
| | | begin |
| | | GetCase_PageCount(CaseCount,PageCount); |
| | | v := Pos('-',NewTreeNode.Text); |
| | | NewTreeNode.Text := Format(_Msg('%s-¦@%dµ§¦@%d¶'),[Copy(NewTreeNode.Text,1,v-1),CaseCount,PageCount]); |
| | | NewTreeNode.Text := Format(_Msg('%s-共%d筆共%d頁'),[Copy(NewTreeNode.Text,1,v-1),CaseCount,PageCount]); |
| | | end; |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.LoadImgFile1; //¸ü¤J·s¥ó¤Î´À´«¥ó |
| | | procedure TCB_IMGPSScanX.LoadImgFile1; //載入新件及替換件 |
| | | Var |
| | | i,n,v,v1,m : Integer; |
| | | p : integer; |
| | |
| | | DisplayPath := ''; |
| | | ClearCaseIndex; |
| | | CaseHelpBtn.Visible := False; |
| | | //Del_Sub_NothingPath(ImageSavePath); //²M±¼®×¥ó¥Ø¿ý¬OªÅªº |
| | | //Del_Sub_NothingPath(ImageSavePath); //清掉案件目錄是空的 |
| | | TreeView1.Items.Clear; |
| | | NewTreeNode := nil; |
| | | MyTreenode1 := nil; |
| | | MyTreenode2 := nil; |
| | | MyTreenode3 := nil; |
| | | NewTreeNode := TreeView1.Items.Add(nil,Format(_Msg('%s-¦@%dµ§¦@%d¶'),[FModeName,0,0])); |
| | | NewTreeNode := TreeView1.Items.Add(nil,Format(_Msg('%s-共%d筆共%d頁'),[FModeName,0,0])); |
| | | NewTreenode.ImageIndex := 0; |
| | | NewTreenode.SelectedIndex := 0; |
| | | |
| | | Del_Sub_NothingPath(ImageSavePath); //²M±¼®×¥ó¥Ø¿ý¬OªÅªº |
| | | Del_Sub_NothingPath(ImageSavePath); //清掉案件目錄是空的 |
| | | GetCase_PageCount(CaseCount,PageCount); |
| | | CaseList.Clear; |
| | | if FileExists(ImageSavePath + 'CaseList.dat') then |
| | |
| | | for m := 0 to CaseDocNoList.Count - 1 do |
| | | begin |
| | | iDocNo := CaseDocNoList.Strings[i]; |
| | | MytreeNode1 := TreeView1.Items.AddChild(NewTreeNode,Format(_Msg('%s-%d¶'),[CaseList.Strings[n],p])); |
| | | MytreeNode1 := TreeView1.Items.AddChild(NewTreeNode,Format(_Msg('%s-%d頁'),[CaseList.Strings[n],p])); |
| | | MytreeNode1.ImageIndex := 1; |
| | | MytreeNode1.SelectedIndex := 1; |
| | | end; |
| | |
| | | Cust_DocNoList.LoadFromFile(ImageSavePath+CaseList.Strings[n]+'\CustomDocNo.dat'); |
| | | |
| | | P := ContextList.Count; |
| | | MytreeNode1 := TreeView1.Items.AddChild(NewTreeNode,Format(_Msg('%s-%d¶'),[CaseList.Strings[n],p])); |
| | | MytreeNode1 := TreeView1.Items.AddChild(NewTreeNode,Format(_Msg('%s-%d頁'),[CaseList.Strings[n],p])); |
| | | MytreeNode1.ImageIndex := 1; |
| | | MytreeNode1.SelectedIndex := 1; |
| | | //DrawDocItem1(MytreeNode1,Doc_Inf_List,CaseList.Strings[n]); //ªø¥X¤å¥ó¦WºÙªº¾ð¨Ã¶Ç¦^¬O§_¦³¥Ó½Ð®Ñªº¼v¹³ |
| | | DrawDocItem2(MytreeNode1,CaseList.Strings[n]); //ªø¥X¤å¥ó¦WºÙªº¾ð¨Ã¶Ç¦^¬O§_¦³¥Ó½Ð®Ñªº¼v¹³ 20140820§ï |
| | | //DrawDocItem1(MytreeNode1,Doc_Inf_List,CaseList.Strings[n]); //長出文件名稱的樹並傳回是否有申請書的影像 |
| | | DrawDocItem2(MytreeNode1,CaseList.Strings[n]); //長出文件名稱的樹並傳回是否有申請書的影像 20140820改 |
| | | |
| | | if Pos(_Msg('¥¼°t¸¹'),CaseList.Strings[n]) > 0 then |
| | | if Pos(_Msg('未配號'),CaseList.Strings[n]) > 0 then |
| | | begin |
| | | MytreeNode1.ImageIndex := 5; |
| | | MytreeNode1.SelectedIndex := 5; |
| | |
| | | MyTreenode1.ImageIndex := 5; |
| | | MyTreenode1.SelectedIndex := 5; |
| | | |
| | | //AllEnforceLb.Visible := True; //¥þ³¡±j¢°e¥ó |
| | | //AllEnforceLb.Visible := True; //全部強迫送件 |
| | | end; |
| | | end; |
| | | end; |
| | |
| | | begin |
| | | GetCase_PageCount(CaseCount,PageCount); |
| | | v := Pos('-',NewTreeNode.Text); |
| | | NewTreeNode.Text := Format(_Msg('%s-¦@%dµ§¦@%d¶'),[Copy(NewTreeNode.Text,1,v-1),CaseCount,PageCount]); |
| | | NewTreeNode.Text := Format(_Msg('%s-共%d筆共%d頁'),[Copy(NewTreeNode.Text,1,v-1),CaseCount,PageCount]); |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FindDivFormCode(FormCode:String):Boolean; //§ä¦³¨S¦³¤À®×ªº±ø½X |
| | | Function TCB_IMGPSScanX.FindDivFormCode(FormCode:String):Boolean; //找有沒有分案的條碼 |
| | | var |
| | | i : Integer; |
| | | DelBarCode : String; |
| | |
| | | IF FindSQLData(FORM_INF_List,'T1.FORM_ID,T1.DIVISION','T1.FORM_ID',FormCode,0,FindResult) then |
| | | begin |
| | | S.CommaText := GetFindResult('T1.DIVISION'); |
| | | for i := 0 to S.Count - 1 do //¥i¯à¦³¦h²Õ |
| | | for i := 0 to S.Count - 1 do //可能有多組 |
| | | begin |
| | | if S.Strings[i] = iMode then |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CheckAvailable:Boolean; //Àˬd¬O§_¥i¨Ï¥Î¤¸¥ó |
| | | Function TCB_IMGPSScanX.CheckAvailable:Boolean; //檢查是否可使用元件 |
| | | var |
| | | SendData : String; |
| | | Msg:String; |
| | |
| | | MacID,IPStr,LegalDate :String; |
| | | begin |
| | | Result := False; |
| | | /////¤U¸üMPSLIC_SCAN.lic ////// |
| | | /////下載MPSLIC_SCAN.lic ////// |
| | | SendData:='data='+HTTPEncode(UTF8Encode(FData))+'&verify='+FVerify+'&work_no=PLN&file=MPSLIC_SCAN.lic'; |
| | | if not dnFile_Get(HTTPSClient,Furl,'service/imgpsc/IMGPSC04/sample',SendData,LngPath+'MPSLIC_SCAN.lic',FReWrite,Memo1,False,DownImgStatus) then |
| | | begin |
| | | Showmessage(_Msg('Àˬdµù¥UÀÉ®×®É,ºô¸ôµo¥Í¿ù»~!!')+_Msg('¿ù»~¥N½X:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason); |
| | | Showmessage(_Msg('檢查註冊檔案時,網路發生錯誤!!')+_Msg('錯誤代碼:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason); |
| | | Exit; |
| | | end; |
| | | /////¤U¸üMPSLIC_SCAN.lic /// |
| | | /////下載MPSLIC_SCAN.lic /// |
| | | |
| | | if CheckLicensebyIP_new(LngPath+'MPSLIC_SCAN.lic',MacID,IPStr,LegalDate,Msg,Nowcount,Totalcount,Lic_Idx) then //Àˬd¬O§_¤vµù¥U¹L |
| | | if CheckLicensebyIP_new(LngPath+'MPSLIC_SCAN.lic',MacID,IPStr,LegalDate,Msg,Nowcount,Totalcount,Lic_Idx) then //檢查是否己註冊過 |
| | | begin |
| | | if (LegalDate <> '') and (ServerDate>LegalDate) and (Lic_Idx>(Totalcount)) then |
| | | begin |
| | | Showmessage(_Msg('¤w¸g¶W¹L¥i¨Ï¥Î´Á¤Î¶W¥X±ÂÅv¼Æ½Ð³sµ¸¼t°Ó')); |
| | | Showmessage(_Msg('已經超過可使用期限及超出授權數請連絡廠商')); |
| | | Result := False; |
| | | //Exit; |
| | | end |
| | |
| | | begin |
| | | if Msg <> '' then |
| | | begin |
| | | Showmessage(Format(_Msg('µù¥UÀɦ³°ÝÃD,½Ð³sµ¸¼t°Ó ¿ù»~ì¦]:%s'),[Msg])); |
| | | Showmessage(Format(_Msg('註冊檔有問題,請連絡廠商 錯誤原因:%s'),[Msg])); |
| | | Result := false; |
| | | Exit; |
| | | end |
| | |
| | | if (LegalDate <> '') and (ServerDate>LegalDate) and (NowCount =0 ) then |
| | | begin |
| | | Lic_Idx := 0; |
| | | Showmessage(_Msg('¤w¸g¶W¹L¥i¨Ï¥Î´Á½Ð³sµ¸¼t°Ó')); |
| | | Showmessage(_Msg('已經超過可使用期限請連絡廠商')); |
| | | Result := False; |
| | | //Exit; |
| | | end |
| | | //else if (LegalDate = '') and (Nowcount >= Totalcount+10) then //¶W¹Lµù¥U¼Æ¶q |
| | | else if ((LegalDate = '') or ((LegalDate <> '') and (ServerDate>LegalDate)) ) and (Nowcount >= Totalcount) then //¶W¹Lµù¥U¼Æ¶q 20150717 yuu»¡®³±¼°eªº10Ó |
| | | //else if (LegalDate = '') and (Nowcount >= Totalcount+10) then //超過註冊數量 |
| | | else if ((LegalDate = '') or ((LegalDate <> '') and (ServerDate>LegalDate)) ) and (Nowcount >= Totalcount) then //超過註冊數量 20150717 yuu說拿掉送的10個 |
| | | begin |
| | | Lic_Idx := 0; |
| | | Showmessage(_Msg('¤w¸g¶W¹L±ÂÅv¼Æ½Ð³sµ¸¼t°Ó')); |
| | | Showmessage(_Msg('已經超過授權數請連絡廠商')); |
| | | Result := False; |
| | | end |
| | | Else //¥¼¶W¹Lµù¥U¼Æ¶qn¼g¤Jµù¥UÀÉ |
| | | Else //未超過註冊數量要寫入註冊檔 |
| | | begin |
| | | {if Messagedlg(_Msg('±z©|¥¼µù¥U±ÂÅv¬O§_n¶i¦æµù¥U??'),MtConfirmation,[mbyes,mbcancel],0) = mrcancel then |
| | | {if Messagedlg(_Msg('您尚未註冊授權是否要進行註冊??'),MtConfirmation,[mbyes,mbcancel],0) = mrcancel then |
| | | begin |
| | | Result := False; |
| | | Exit; |
| | | end;} |
| | | ShowText := _Msg('±ÂÅv¤¤,½ÐµyÔ'); |
| | | ShowText := _Msg('授權中,請稍候'); |
| | | AddLicense(LngPath+'MPSLIC_SCAN.lic',MacID,IPStr,Msg); |
| | | Nowcount := Nowcount + 1; |
| | | DataLoading(True,True); |
| | | |
| | | /////¤W¶ÇMPSLICSCAN.lic //// |
| | | /////上傳MPSLICSCAN.lic //// |
| | | SendData:='data='+HTTPEncode(UTF8Encode(FData))+'@verify='+FVerify+'@work_no=PLN@file_name=MPSLIC_SCAN.lic'; |
| | | if not upFile(HTTPSClient,FUrl,'service/imgpsc/IMGPSC02/sample',SendData,'file',LngPath+'MPSLIC_SCAN.lic',FReWrite,Memo1,False) then |
| | | begin |
| | | Showmessage(_Msg('Àˬdµù¥U®É,ºô¸ôµo¥Í¿ù»~!!')+_MSg('¿ù»~¥N½X:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason+')'); |
| | | Showmessage(_Msg('檢查註冊時,網路發生錯誤!!')+_MSg('錯誤代碼:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason+')'); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | if memo1.Lines.Strings[0] = '1' then |
| | | begin |
| | | Showmessage(_Msg('Àˬdµù¥U®É,ºô¸ôµo¥Í¿ù»~!!')+_Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]); |
| | | Showmessage(_Msg('檢查註冊時,網路發生錯誤!!')+_Msg('錯誤原因:')+memo1.Lines.Strings[1]); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | Showmessage(_Msg('Àˬdµù¥U®É,ºô¸ôµo¥Í¿ù»~!!')+_Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J')); |
| | | Showmessage(_Msg('檢查註冊時,網路發生錯誤!!')+_Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入')); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | /////¤W¶ÇMPSLICSCAN.lic ///// |
| | | //Sleep(30000); //²Ä¤@¦¸µù¥UºÎ30¬í ¥ý¤£ºÎ |
| | | /////上傳MPSLICSCAN.lic ///// |
| | | //Sleep(30000); //第一次註冊睡30秒 先不睡 |
| | | Result := True; |
| | | end; |
| | | end; |
| | |
| | | if FileExists(LngPath+'MPSLIC_SCAN.lic') then |
| | | DeleteFile(LngPath+'MPSLIC_SCAN.lic'); |
| | | if LegalDate = '' then |
| | | StatusBar1.Panels[4].Text := 'µù¥U¸¹:'+MacID+' ³Ñ¾lµù¥U¼Æ:'+inttostr(Totalcount-Nowcount); |
| | | StatusBar1.Panels[4].Text := '註冊號:'+MacID+' 剩餘註冊數:'+inttostr(Totalcount-Nowcount); |
| | | if LegalDate <> '' then |
| | | StatusBar1.Panels[4].Text := '*µù¥U¸¹:'+MacID+'('+inttostr(Lic_Idx)+')'+' ³Ñ¾lµù¥U¼Æ:'+inttostr(Totalcount-Nowcount); |
| | | StatusBar1.Panels[4].Text := '*註冊號:'+MacID+'('+inttostr(Lic_Idx)+')'+' 剩餘註冊數:'+inttostr(Totalcount-Nowcount); |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.SmoothCBClick(Sender: TObject); |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.Case2Mask(SoPath,DePath:String):Boolean;//²£¥Í¾B¸n¼v¹³ |
| | | Function TCB_IMGPSScanX.Case2Mask(SoPath,DePath:String):Boolean;//產生遮罩影像 20170639 發現沒用到 |
| | | var |
| | | XT : TXMLTool; |
| | | i : Integer; |
| | |
| | | Anchor := FormID2Anchor(FormID); |
| | | //ParserPoint(CropMpsV.FindPoint(Anchor)); |
| | | FindPoint(ImageScrollBox1.Graphic,UpLPoint,UpRPoint,DownLPoint,Anchor); |
| | | if FileExists(CheckXmlPath+FormID+'.xml') then //¨S¦³Xml´N¤£¥Î¾B¸n |
| | | if FileExists(CheckXmlPath+FormID+'.xml') then //沒有Xml就不用遮罩 |
| | | begin |
| | | XT.LoadFromFile(CheckXmlPath+FormID+'.xml'); |
| | | if XT.SubNodes['/form/settype10/'].First then |
| | |
| | | begin |
| | | Site := XT.Node['/form/settype10/'+ColEName+'/'+nodename+'/'].Attributes['colxy']; |
| | | SiteList.Add(Site); |
| | | Result := True; //¦³³]©w |
| | | Result := True; //有設定 |
| | | end |
| | | Else |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CheckNeedCrop(Graphic:TDibGraphic):Boolean; //¬O§_¬OA3n¤Á¼v¹³ |
| | | Function TCB_IMGPSScanX.CheckNeedCrop(Graphic:TDibGraphic):Boolean; //是否是A3要切影像 |
| | | Var |
| | | i,FormIDCount : Integer; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetNewCustomDocNo(Path,DocName:String):String; //¨ú¥X¥¼¨Ï¥Îªº¦Ûq¤å¥ó¥N¸¹ |
| | | Function TCB_IMGPSScanX.GetNewCustomDocNo(Path,DocName:String):String; //取出未使用的自訂文件代號 |
| | | var |
| | | ini : Tinifile; |
| | | Ct:Integer; |
| | |
| | | Ct := ini.ReadInteger('CustomCount','Count',0); |
| | | inc(Ct); |
| | | DocNo := 'ZZZZZ'+Add_Zoo(Ct,3); |
| | | if FIs_In_Wh <> 'Y' then //¤£¬O¤J®w¤å¥ó |
| | | if FIs_In_Wh <> 'Y' then //不是入庫文件 |
| | | DocNo := 'YYYYY'+Add_Zoo(Ct,3); |
| | | FormID := DocNo+'010101A'; |
| | | ini.WriteInteger('CustomCount','Count',Ct); |
| | |
| | | NewDocNo :='ZZZZZ001'; |
| | | if FileExists(Path+'CustomDocNo.dat') then |
| | | begin |
| | | /// ZZZZZ001_¦Û©w¤å¥ó¦WºÙ 001_¦Û©w¤å¥ó¦WºÙ |
| | | /// ZZZZZ001_自定文件名稱 001_自定文件名稱 |
| | | S.LoadFromFile(Path+'CustomDocNo.dat'); |
| | | for i := 0 to S.Count - 1 do |
| | | begin |
| | |
| | | C_Name := Copy(S.Strings[i],v+1,ln-v); |
| | | if DocName = C_Name then |
| | | begin |
| | | Showmessage('¤å¥ó¦WºÙ¤w¦s¦b'); |
| | | Showmessage('文件名稱已存在'); |
| | | Result := ''; |
| | | Exit; |
| | | end; |
| | |
| | | end; } |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetCustomDocName(Path,DocNo:String):String; //¨ú¥X¦Û©w¤å¥ó¦WºÙ |
| | | Function TCB_IMGPSScanX.GetCustomDocName(Path,DocNo:String):String; //取出自定文件名稱 |
| | | var |
| | | ini : Tinifile; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetCustomFormID(Path,DocNo:String):String; //¨ú¥X¦Û©w¤å¥óFormID |
| | | Function TCB_IMGPSScanX.GetCustomFormID(Path,DocNo:String):String; //取出自定文件FormID |
| | | var |
| | | ini : Tinifile; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetCustomDocDir(Path,DocName:String):String; //¨ú¥X¦Û©w¤å¥óDocDir |
| | | Function TCB_IMGPSScanX.GetCustomDocDir(Path,DocName:String):String; //取出自定文件DocDir |
| | | var |
| | | i,ct:integer; |
| | | ini : Tinifile; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FindCustomDocName(Path,DocName:String):Boolean; //´M§ä¦Û©w¤å¥ó¦WºÙ¬O§_¦s¦b |
| | | Function TCB_IMGPSScanX.FindCustomDocName(Path,DocName:String):Boolean; //尋找自定文件名稱是否存在 |
| | | var |
| | | ini : Tinifile; |
| | | Ct,i:Integer; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.DeleteCustomDocDir(Path,DocNo:String); //§R°£¦Û©w¤å¥óDocNo |
| | | Procedure TCB_IMGPSScanX.DeleteCustomDocDir(Path,DocNo:String); //刪除自定文件DocNo |
| | | var |
| | | ini : Tinifile; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CheckFormID_Prt(FormID:String):Boolean; //¶Ç¤JªºFormID¬O§_¹w³]¦C¦L |
| | | Function TCB_IMGPSScanX.CheckFormID_Prt(FormID:String):Boolean; //傳入的FormID是否預設列印 |
| | | begin |
| | | Result := False; |
| | | If FindSQLData(FORM_INF_List,'T1.IS_PRINT','T1.FORM_ID',FormID,0,FindResult) Then |
| | |
| | | Printer object. Otherwise, if UsePrintJob is True, the Title |
| | | property of the TDibGraphicPrinter object is used to specify the |
| | | job name. } |
| | | Printer.Title := '¼v¹³¦C¦L'; |
| | | Printer.Title := '影像列印'; |
| | | end; |
| | | |
| | | IF (Page mod 2) = 1 Then |
| | |
| | | |
| | | ImageScrollBox1.DisplayedGraphic.Canvas.Font.Size := 24; |
| | | |
| | | //ImageScrollBox1.DisplayedGraphic.Canvas.TextOut(20,20, _Msg('¦C¦L¤Hû:')+LoginID+' '+_Msg('¦C¦L¤À¦æ:')+FUserUnit+' '+_Msg('¦C¦L¤é´Á:')+DateTime); |
| | | //ImageScrollBox1.DisplayedGraphic.Canvas.TextOut(20,20, _Msg('列印人員:')+LoginID+' '+_Msg('列印分行:')+FUserUnit+' '+_Msg('列印日期:')+DateTime); |
| | | |
| | | GraphicPrinter.Print(ImageScrollBox1.DisplayedGraphic); |
| | | |
| | |
| | | procedure PrintWithAutoPrintJob; |
| | | begin |
| | | GraphicPrinter.UsePrintJob := True; |
| | | GraphicPrinter.Title := '¼v¹³¦C¦L'; |
| | | GraphicPrinter.Title := '影像列印'; |
| | | GraphicPrinter.Print(ImageScrollBox1.Graphic); |
| | | end; |
| | | |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FindLastestDocDir(CaseID,DocNo:String):String; //§ä¥X³Ì·sªºDocDir |
| | | Function TCB_IMGPSScanX.FindLastestDocDir(CaseID,DocNo:String):String; //找出最新的DocDir |
| | | var |
| | | i : Integer; |
| | | DocNoList,FileList : TStringlist; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.Create_Cust_DocDir(CaseID:String); //²£¥Í¥~±¶Ç¤Jªº¤å¥ó¥N¸¹¤Î¦Û©w¤å¥ó |
| | | Procedure TCB_IMGPSScanX.Create_Cust_DocDir(CaseID:String); //產生外面傳入的文件代號及自定文件 |
| | | var |
| | | i,n : Integer; |
| | | C_DocNoList,C_DocNameList : TStringlist; |
| | |
| | | for i := 0 to C_DocNoList.Count - 1 do |
| | | begin |
| | | DocNo := C_DocNoList.Strings[i]; |
| | | //Â¥󤣪ø¥X¿ù»~ªº¤å¥ó¥X¨Ó |
| | | //舊件不長出錯誤的文件出來 |
| | | if (FIs_OldCase = 'Y') and (FWork_no='HLN') and (DocNo = FormCode2DocNo('10000001011112A')) then |
| | | Continue; |
| | | NowDocNo_Ct := GetDocNoCount(CaseID,DocNo); |
| | |
| | | end; |
| | | if DocNo_CT <= NowDocNo_Ct then |
| | | Continue; |
| | | if DirectoryExists(ImageSavePath+CaseID+'\'+DocNo+'('+inttostr(DocNo_Ct)+')') then //¦s¦b¤F |
| | | if DirectoryExists(ImageSavePath+CaseID+'\'+DocNo+'('+inttostr(DocNo_Ct)+')') then //存在了 |
| | | Continue; |
| | | if (DocNo_Ct = 1) and DirectoryExists(ImageSavePath+CaseID+'\'+DocNo) then //¦s¦b¤F 20140327¥[ |
| | | if (DocNo_Ct = 1) and DirectoryExists(ImageSavePath+CaseID+'\'+DocNo) then //存在了 20140327加 |
| | | Continue; |
| | | DocDir := DocNo2DocNoDir(ImageSavePath+CaseID+'\',DocNo) |
| | | |
| | |
| | | MkDir(ImageSavePath+CaseID+'\'+DocDir); |
| | | SetDocNoList('A',-1,CaseID,DocDir,'1'); |
| | | end; |
| | | if not DocNoNeedDiv(DocNo) then //¤£¤À¥÷ªº¨q¼Æ |
| | | if not DocNoNeedDiv(DocNo) then //不分份的秀數 |
| | | SetDocDirCopies(CaseID,DocNo,GetCustomDocNoCount(DocNo)); |
| | | |
| | | end; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.OldCasetoNewCase(CaseID:String); //±N®ץ÷¼ÆÂন·s³W«h |
| | | Procedure TCB_IMGPSScanX.OldCasetoNewCase(CaseID:String); //將舊案份數轉成新規則 |
| | | var |
| | | i,n : Integer; |
| | | C_DocNoList,C_DocNameList : TStringlist; |
| | |
| | | for i := 0 to DocNoList.Count - 1 do |
| | | begin |
| | | //DocNo := DocNoList.Strings[i]; |
| | | DocNo := DocNoDir2DocNo(DocNoList.Strings[i]); //20140812 ¦]Âà®׿ù»~¥ó·|¥X²{DocnoDir |
| | | DocNo := DocNoDir2DocNo(DocNoList.Strings[i]); //20140812 因轉舊案錯誤件會出現DocnoDir |
| | | DocNo_Ct := 0; |
| | | for n := 0 to C_DocNoList.Count - 1 do |
| | | begin |
| | |
| | | |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.ErrFormtoCurrentForm(CaseID,EFormID,CFormID:String);//±N®תº¿ù»~FormID§ï¥¿½TªºFormID |
| | | Procedure TCB_IMGPSScanX.ErrFormtoCurrentForm(CaseID,EFormID,CFormID:String);//將舊案的錯誤FormID改正確的FormID |
| | | var |
| | | DocNoList,FileList :TStringlist; |
| | | EDocNo,CDocNo,iDocNo,iFormID :String; |
| | |
| | | EDocDir := DocNoList.Strings[i]; |
| | | iDocNo := DocNoDir2DocNo(DocNoList.Strings[i]); |
| | | iPath := ImageSavePath+CaseID+'\'+EDocDir+'\'; |
| | | if FileExists(iPath+'Context.dat') then //20140909º|¥[³oÓ§PÂ_³y¦¨¦Ûq¤å¥ó¦ý¨S¼v¹³·|¥X¿ù»~°T®§ |
| | | if FileExists(iPath+'Context.dat') then //20140909漏加這個判斷造成自訂文件但沒影像會出錯誤訊息 |
| | | FileList.LoadFromFile(iPath+'Context.dat'); |
| | | for n := 0 to FileList.Count - 1 do |
| | | begin |
| | |
| | | MoveFile(PWideChar(iPath),PWideChar(iiPath)); |
| | | DocNoList.Strings[i] := StringReplace(DocNoList.Strings[i],iDocNo,CDocNo,[rfReplaceAll]); |
| | | DocNoList.SaveToFile(ImageSavePath+CaseID+'\CaseDocNo.dat'); |
| | | //SetRecordEditedDocDir('A',CaseID,CDocNo); //20140918 yuu»¡§ï¦¨¤£¬ö¿ý |
| | | //SetRecordEditedDocDir('A',CaseID,CDocNo); //20140918 yuu說改成不紀錄 |
| | | end; |
| | | end; |
| | | finally |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.SetRecordEditedDocDir(Mode:Char;CaseID,DocDir:String); //°O¿ý³Q²§°Êªº¤å¥ó¥Ø¿ý 'A:¥[¤JD:§R±¼' |
| | | Procedure TCB_IMGPSScanX.SetRecordEditedDocDir(Mode:Char;CaseID,DocDir:String); //記錄被異動的文件目錄 'A:加入D:刪掉' |
| | | var |
| | | i : Integer; |
| | | Exists : Boolean; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetDocNo_IS_WH(DocNo:String):Boolean; //DocNo¬O§_¬°¤J®w¤å¥ó |
| | | Function TCB_IMGPSScanX.GetDocNo_IS_WH(DocNo:String):Boolean; //DocNo是否為入庫文件 |
| | | var |
| | | i :Integer; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.SortDocDir_FormID(CaseID,DocDir:String); //±NDocDir¸Ìªº¤å¥ó½s¸¹±Æ§Ç |
| | | Procedure TCB_IMGPSScanX.SortDocDir_FormID(CaseID,DocDir:String); //將DocDir裡的文件編號排序 |
| | | var |
| | | i,n,v,ln : Integer; |
| | | Exists:Boolean; |
| | |
| | | if FileExists(ImageSavePath+CaseID+'\'+DocDir+'\Context.dat') then |
| | | begin |
| | | FileList.LoadFromFile(ImageSavePath+CaseID+'\'+DocDir+'\Context.dat'); |
| | | ////¨ú¥XFormID///// |
| | | ////取出FormID///// |
| | | for i := 0 to FileList.Count - 1 do |
| | | begin |
| | | FormID := FileName2FormCode(FileList.Strings[i]); |
| | | if (FormID = 'Attach') or (FormID = 'S_Attach') then Continue; //ªþ¥óÂ÷¶} |
| | | if (FormID = 'Attach') or (FormID = 'S_Attach') then Continue; //附件離開 |
| | | Exists := False; |
| | | for n := 0 to FormIDList.Count - 1 do //¬d¤@¤UFORMID¬O§_¤w¸g¦s¦b¤F |
| | | for n := 0 to FormIDList.Count - 1 do //查一下FORMID是否已經存在了 |
| | | begin |
| | | if FormID = FormIDList.Strings[n] then |
| | | begin |
| | |
| | | FormIDList.Add(FormID); |
| | | end; |
| | | FormIDList.Sort; |
| | | //±Æ§Ç«á²£n§ó¦Wªº²M³æ |
| | | //排序後產要更名的清單 |
| | | for i := 0 to FormIDList.Count - 1 do |
| | | begin |
| | | iFormID := FormIDList.Strings[i]; |
| | |
| | | end; |
| | | end; |
| | | FileList.Clear; |
| | | //§ó¦W¦¨·s¶¶§ÇªºÀɦW |
| | | //更名成新順序的檔名 |
| | | for i := 0 to SortFileList.Count - 1 do |
| | | begin |
| | | v := Pos(',',SortFileList.Strings[i]); |
| | |
| | | RenameFile(ImageSavePath+CaseID+'\'+DocDir+'\'+OldName,ImageSavePath+CaseID+'\'+DocDir+'\'+NewName); |
| | | FileList.Add(NewName); |
| | | end; |
| | | //¥h±¼@¶}ÀY |
| | | //去掉@開頭 |
| | | for i := 0 to FileList.Count - 1 do |
| | | begin |
| | | OldName := FileList.Strings[i]; |
| | |
| | | //TreeView1click(nil); |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.DocNoIs_In_WH(DocNo:String):Boolean; //DocNo¬O§_¬°¤J®w¤å¥ó |
| | | Function TCB_IMGPSScanX.DocNoIs_In_WH(DocNo:String):Boolean; //DocNo是否為入庫文件 |
| | | var |
| | | i : Integer; |
| | | begin |
| | | Result := False; |
| | | if (Copy(DocNo,1,5)='ZZZZZ') then //20140728 yuu »¡¦Ûq¤å¥ó¤]¬O¤J®w¤å¥ó |
| | | if (Copy(DocNo,1,5)='ZZZZZ') then //20140728 yuu 說自訂文件也是入庫文件 |
| | | begin |
| | | Result := True; |
| | | Exit; |
| | |
| | | for i := 0 to FileList.Count - 1 do |
| | | begin |
| | | Docno := FormCode2DocNo(FileName2FormCode(FileList.Strings[i])); |
| | | ShowMessage('Docno='+Docno); |
| | | //ShowMessage('Docno='+Docno); |
| | | DocNoList.Add(DocNo); |
| | | Exists := False; |
| | | for n := 0 to CaseDocNoList.Count - 1 do |
| | |
| | | CaseDocNo_CopiesList.Add('1'); |
| | | end; |
| | | end; |
| | | ShowMessage('CreateCaseNeedData DocNoList='+DocNoList.Text); |
| | | //ShowMessage('CreateCaseNeedData DocNoList='+DocNoList.Text); |
| | | DocNoList.SaveToFile(Path+'DocDir.dat'); |
| | | CaseDocNoList.SaveToFile(Path+'CaseDocNo.dat'); |
| | | CaseDocNo_CopiesList.SaveToFile(Path+'CaseDocNo_Copies.dat') |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CheckSelectImg_UseCase(Path,CaseID:String):Boolean; //Àˬd¿ï¾Üªº¼v¹³¬O§_¦³¥]§t³Q¤Þ¥Îªº¼v¹³ |
| | | Function TCB_IMGPSScanX.CheckSelectImg_UseCase(Path,CaseID:String):Boolean; //檢查選擇的影像是否有包含被引用的影像 |
| | | var |
| | | i : Integer; |
| | | iISBName : String; |
| | |
| | | OldCasePath := Path+OldCaseID+'\'; |
| | | if FileExists(OldCasePath+'UseCase.dat') and FileExists(OldCasePath+'UseCase.ini') then |
| | | begin |
| | | //////ˣ˃///// |
| | | //////壓檔///// |
| | | //ZipMainFile(Path,Path,'Img.zip'); |
| | | |
| | | ////¤W¶Ç///// |
| | | ////上傳///// |
| | | SendData:='data='+HTTPEncode(UTF8Encode(Data))+'&verify='+Verify+'&other_case_no='+OldCaseID; |
| | | //Showmessage(FUrl+'service/slic/SLIC02/useOther?'+senddata); |
| | | if not upFile(HTTPSClient,FUrl,'service/imgpsc/IMGPSC02/useOther',SendData,'file',OldCasePath+'UseCase.ini',FReWrite,Memo1,False) then |
| | | begin |
| | | Showmessage(Format(_Msg('¶Ç°eÂÂ¥ó½s¸¹(%s)ÀÉ®×®É,ºô¸ôµo¥Í¿ù»~!!'+_Msg('¿ù»~¥N½X:')),[OldCaseID])+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason); |
| | | Showmessage(Format(_Msg('傳送舊件編號(%s)檔案時,網路發生錯誤!!'+_Msg('錯誤代碼:')),[OldCaseID])+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | if memo1.Lines.Strings[0] = '1' then |
| | | begin |
| | | Showmessage(Format(_Msg('¶Ç°eÂÂ¥ó½s¸¹(%s)ÀÉ®×®É,ºô¸ôµo¥Í¿ù»~!!')+_Msg('¿ù»~ì¦]:'),[OldCaseID])+memo1.Lines.Strings[1]); |
| | | Showmessage(Format(_Msg('傳送舊件編號(%s)檔案時,網路發生錯誤!!')+_Msg('錯誤原因:'),[OldCaseID])+memo1.Lines.Strings[1]); |
| | | Result := False; |
| | | Exit; |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | Showmessage(Format(_Msg('¶Ç°eÂÂ¥ó½s¸¹(%s)ÀÉ®×®É,ºô¸ôµo¥Í¿ù»~!!')+_Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J'),[OldCaseID])); |
| | | Showmessage(Format(_Msg('傳送舊件編號(%s)檔案時,網路發生錯誤!!')+_Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'),[OldCaseID])); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | end; |
| | | |
| | | ////¤W¶Ç//// |
| | | ////上傳//// |
| | | end; |
| | | finally |
| | | OldCaseInfoList.Free; |
| | |
| | | SendData:='data='+HTTPEncode(UTF8Encode(FData))+'&verify='+FVerify+'&case_no='+CaseID; |
| | | If not ProcessServlet(HTTPSClient,FURL+'service/imgpsc/IMGPSC06/printlog',SendData,FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | IF memo1.Lines.Strings[0] = '1' Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]; |
| | | HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | | Result := False; |
| | | Exit; |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J'); |
| | | HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FormIDAppear(FormID:String):Boolean; //FormID¬O§_¥i¥X²{ |
| | | Function TCB_IMGPSScanX.FormIDAppear(FormID:String):Boolean; //FormID是否可出現 |
| | | var |
| | | iDocNo : String; |
| | | begin |
| | | Result := True; |
| | | iDocNo := FormCode2DocNo(FormID); |
| | | if (((FIs_In_Wh = 'Y') and (not DocNoIs_In_WH(iDocNo))) or //¤J®w±½´y¤£¬Ý«D¤J®w¤å¥ó |
| | | ((FIs_In_Wh = 'N') and (DocNoIs_In_WH(iDocNo)))) and //«D¤J®w±½´y¤£¬Ý¤J®w¤å¥ó |
| | | if (((FIs_In_Wh = 'Y') and (not DocNoIs_In_WH(iDocNo))) or //入庫掃描不看非入庫文件 |
| | | ((FIs_In_Wh = 'N') and (DocNoIs_In_WH(iDocNo)))) and //非入庫掃描不看入庫文件 |
| | | ((iDocNo <> 'Attach') and (iDocNo <> 'S_Attach') and (Copy(iDocNo,1,5)<>'ZZZZZ')) then |
| | | Result := False; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.DocNoAppear(DocNo:String):Boolean; //DocNo¬O§_¥i¥X²{ |
| | | Function TCB_IMGPSScanX.DocNoAppear(DocNo:String):Boolean; //DocNo是否可出現 |
| | | begin |
| | | Result := True; |
| | | if (((FIs_In_Wh = 'Y') and (not DocNoIs_In_WH(DocNo)) or (DocNo ='S_Attach')) or //¤J®w±½´y¤£¬Ý«D¤J®w¤å¥ó |
| | | ((FIs_In_Wh = 'N') and (DocNoIs_In_WH(DocNo)) or (DocNo ='Attach') )) {and //«D¤J®w±½´y¤£¬Ý¤J®w¤å¥ó |
| | | if (((FIs_In_Wh = 'Y') and (not DocNoIs_In_WH(DocNo)) or (DocNo ='S_Attach')) or //入庫掃描不看非入庫文件 |
| | | ((FIs_In_Wh = 'N') and (DocNoIs_In_WH(DocNo)) or (DocNo ='Attach') )) {and //非入庫掃描不看入庫文件 |
| | | (Copy(DocNo,1,5)<>'ZZZZZ')} then |
| | | Result := False; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetDocNoCount(CaseID,DocNo:String):Integer; //¨úDocNo¼Æ¶q |
| | | Function TCB_IMGPSScanX.GetDocNoCount(CaseID,DocNo:String):Integer; //取DocNo數量 |
| | | var |
| | | i : Integer; |
| | | Doc_Ct:Integer; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetDocDirCopies(CaseID,DocDir:String):Integer; //¨úDocDir¼Æ¶q |
| | | Function TCB_IMGPSScanX.GetDocDirCopies(CaseID,DocDir:String):Integer; //取DocDir數量 |
| | | var |
| | | i : Integer; |
| | | DocNoList,DocNo_CopiesList : TStringlist; |
| | | begin |
| | | Result := 1; //¹w³]¦^¶Ç1 //20140521 ¥Ñ0§ï¦¨1 |
| | | Result := 1; //預設回傳1 //20140521 由0改成1 |
| | | DocNoList := TStringlist.Create; |
| | | DocNo_CopiesList := TStringlist.Create; |
| | | try |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.SetDocDirCopies(CaseID,DocDir:String;NewCopies:Integer); //×§ïDocDir¥÷¼Æ |
| | | Procedure TCB_IMGPSScanX.SetDocDirCopies(CaseID,DocDir:String;NewCopies:Integer); //修改DocDir份數 |
| | | var |
| | | i : Integer; |
| | | DocNoList,DocNo_CopiesList : TStringlist; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetDocDirCopies_Rec(Path,CaseID,DocDir:String):Integer; //¨ú°O¿ý¸ÌªºDocDir¥÷¼Æ |
| | | Function TCB_IMGPSScanX.GetDocDirCopies_Rec(Path,CaseID,DocDir:String):Integer; //取記錄裡的DocDir份數 |
| | | var |
| | | i,n,v,v1 : Integer; |
| | | OldCaseInfoList,Caseinfolist : TStringlist; |
| | |
| | | OldCaseInfoList := TStringlist.Create; |
| | | Caseinfolist := TStringlist.Create; |
| | | try |
| | | //OldCaseInfoList ®×¥ó½s¸¹@#,¦~«×@#,·~°È§O@#,¬O§_ÂÂ¥ó@#,Data@#,Verify@#,¤å¥ó½s¸¹[¥÷¼Æ]@#,¤å¥ó½s¸¹[¥÷¼Æ] tab ®×¥ó½s¸¹@#,¦~«×@#,·~°È§O@#,¬O§_ÂÂ¥ó@#,Data@#,Verify@#,¤å¥ó½s¸¹[¥÷¼Æ]@#,¤å¥ó½s¸¹[¥÷¼Æ] |
| | | //OldCaseInfoList 案件編號@#,年度@#,業務別@#,是否舊件@#,Data@#,Verify@#,文件編號[份數]@#,文件編號[份數] tab 案件編號@#,年度@#,業務別@#,是否舊件@#,Data@#,Verify@#,文件編號[份數]@#,文件編號[份數] |
| | | OldCaseInfoList.StrictDelimiter := true; |
| | | OldCaseInfoList.Delimiter := #9; |
| | | OldCaseInfoList.DelimitedText := FOldCaseInfo; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetCustomNameCount(CustomName:String):Integer; //¨ú¥~¶Çªº¦WºÙ¼Æ¶q |
| | | Function TCB_IMGPSScanX.GetCustomNameCount(CustomName:String):Integer; //取外傳的名稱數量 |
| | | var |
| | | i,ct : Integer; |
| | | C_DocNameList : TStringlist; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetCustomDocNoCount(Docno:String):Integer; //¨ú¥~¶ÇªºDocNo¼Æ¶q |
| | | Function TCB_IMGPSScanX.GetCustomDocNoCount(Docno:String):Integer; //取外傳的DocNo數量 |
| | | var |
| | | i,ct : Integer; |
| | | C_DocNoList : TStringlist; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CaseDelete_Enable(CaseID:String):Boolean; //®×¥ó¥i§_³Q§R°£ |
| | | Function TCB_IMGPSScanX.ISDivPageFormID(FormID:String):Boolean; |
| | | var |
| | | i : Integer; |
| | | begin |
| | | Result := False; |
| | | |
| | | for i := 0 to DivPageFormIDList.Count - 1 do |
| | | begin |
| | | if FormID = DivPageFormIDList.Strings[i] then |
| | | begin |
| | | Result := True; |
| | | Break; |
| | | end; |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CaseDelete_Enable(CaseID:String):Boolean; //案件可否被刪除 |
| | | var |
| | | i : Integer; |
| | | CaseDocNoList : TStringlist; |
| | |
| | | CaseDocNoList.LoadFromFile(ImageSavePath+CaseID+'\CaseDocNo.dat'); |
| | | for i := 0 to CaseDocNoList.Count - 1 do |
| | | begin |
| | | if GetUseCase('T',DisplayPath,CaseDocNoList.Strings[i]) <> '' then //¦³³Q¤Þ¥Î¨«ªº |
| | | if GetUseCase('T',DisplayPath,CaseDocNoList.Strings[i]) <> '' then //有被引用走的 |
| | | Result := False; |
| | | end; |
| | | |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.MoveImage(Path:String;mp:Integer); //²¾°Ê¶¼Æ |
| | | Procedure TCB_IMGPSScanX.MoveImage(Path:String;mp:Integer); //移動頁數 |
| | | var |
| | | i,n,inx:Integer; |
| | | FList,D_Flist:TStringlist; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.MoveImage_Drag(Path:String;fp,tp:Integer); //©ì©Ô²¾°Ê¶¼Æ |
| | | Procedure TCB_IMGPSScanX.MoveImage_Drag(Path:String;fp,tp:Integer); //拖拉移動頁數 |
| | | var |
| | | i,n,inx:Integer; |
| | | FList,D_Flist:TStringlist; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.SetUseCase(Mode:Char;Path,DocDir,FormCaseID,ToCaseID:String); //°O¿ý¤Þ¥Î¨ä¥L®×¥ó A:¥[¤J D:§R±¼ |
| | | Procedure TCB_IMGPSScanX.SetUseCase(Mode:Char;Path,DocDir,FormCaseID,ToCaseID:String); //記錄引用其他案件 A:加入 D:刪掉 |
| | | var |
| | | ini : Tinifile; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetUseCase(Mode:Char;Path,DocDir:String):String; //F:¨ú³Q¤Þ¥Î To:¤Þ¥Î |
| | | Function TCB_IMGPSScanX.GetUseCase(Mode:Char;Path,DocDir:String):String; //F:取被引用 To:引用 |
| | | var |
| | | ini : Tinifile; |
| | | begin |
| | |
| | | CopyFile(PWideChar(OldPath+'UseCase.ini'),PWideChar(NewPath+'UseCase.ini'),False); |
| | | |
| | | if FileExists(OldPath+'CaseDocNo.dat') then |
| | | begin |
| | | DocNoList.LoadFromFile(OldPath+'CaseDocNo.dat'); |
| | | end |
| | | else |
| | | begin |
| | | DocNoList.SaveToFile(OldPath+'CaseDocNo.dat'); |
| | | CopyFile(PWideChar(OldPath+'CaseDocNo.dat'),PWideChar(NewPath+'CaseDocNo.dat'),False); |
| | | end; |
| | | |
| | | for i := 0 to DocNoList.Count-1 do |
| | | begin |
| | | DocDir := DocNoList.Strings[i]; |
| | |
| | | iFileList,iFile_DocDirList :TStringlist; |
| | | AA,AA2,AA3,AA4:Boolean; |
| | | begin |
| | | ShowMessage('aaaaaaaa'); |
| | | if not FileExists(SoDir+'CaseDocNo.dat') then |
| | | begin |
| | | ShowMessage('1111111111'); |
| | | end; |
| | | if not FileExists(SoDir+'DocDir.dat') then |
| | | begin |
| | | ShowMessage('222222222'); |
| | | end; |
| | | |
| | | if (not FileExists(SoDir+'CaseDocNo.dat')) or (not FileExists(SoDir+'DocDir.dat')) then //ºIµe±·|¨S³o¨ÇÀÉ |
| | | if (not FileExists(SoDir+'CaseDocNo.dat')) or (not FileExists(SoDir+'DocDir.dat')) then //截畫面會沒這些檔 |
| | | begin |
| | | ShowMessage('²£¥Í¥²nªº¤å¦rÀÉ'); |
| | | CreateCaseNeedData(SoDir); //²£¥Í¥²nªº¤å¦rÀÉ |
| | | //ShowMessage('產生必要的文字檔'); |
| | | CreateCaseNeedData(SoDir); //產生必要的文字檔 |
| | | end; |
| | | |
| | | AA:=CopyFile(PWideChar(SoDir+'CaseDocNo.dat'),PWideChar(DeDir+'CaseDocNo.dat'),False); |
| | |
| | | AA3:=CopyFile(PWideChar(SoDir+'CustomDocNo.ini'),PWideChar(DeDir+'CustomDocNo.ini'),False); |
| | | AA4:=CopyFile(PWideChar(SoDir+'UseCase.ini'),PWideChar(DeDir+'UseCase.ini'),False); |
| | | //ShowMessage(BoolToStr(AA)+#10#13+BoolToStr(AA2)+#10#13+BoolToStr(AA3)+#10#13+BoolToStr(AA4)); |
| | | if FileExists(SoDir+'DocDir.dat') then |
| | | if FileExists(SoDir+'DocDir.dat') then //20170222 新加 |
| | | begin |
| | | CopyFile(PWideChar(SoDir+'DocDir.dat'),PWideChar(DeDir+'DocDir.dat'),False); |
| | | end; |
| | |
| | | DocDir := DocNoList.Strings[i]; |
| | | MkDir(DeDir+DocDir); |
| | | end;} |
| | | ShowMessage('DocNoList='+DocNoList.Text); |
| | | //ShowMessage('DocNoList='+DocNoList.Text); |
| | | |
| | | for i := DocNoList.Count - 1 downto 0 do |
| | | begin |
| | |
| | | end |
| | | else |
| | | begin |
| | | ShowMessage('GGG'); |
| | | //ShowMessage('GGG'); |
| | | DocNoList.Delete(i); |
| | | DocNoList.SaveToFile(DeDir+'CaseDocNo.dat'); |
| | | if i <= CaseDocNo_CopiesList.Count-1 then |
| | | begin |
| | | ShowMessage('KKKK'); |
| | | //ShowMessage('KKKK'); |
| | | CaseDocNo_CopiesList.Delete(i); |
| | | CaseDocNo_CopiesList.SaveToFile(DeDir+'CaseDocNo_Copies.dat'); |
| | | end; |
| | | end; |
| | | end; |
| | | //20170221 ¥ýµù¸Ñ°_¨Ó ¦]¬°¥L¦b¸É¥R±½ºË®É¦n¹³·|¦³Åã¥Üªº°ÝÃD |
| | | //20170221 先註解起來 因為他在補充掃瞄時好像會有顯示的問題 |
| | | |
| | | for i := 0 to iFileList.Count - 1 do |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FormCode2FormName(CaseID,FormCode:String):String; //¥ÎFormCodeÂন¤å¥ó¦WºÙ |
| | | Function TCB_IMGPSScanX.FormCode2FormName(CaseID,FormCode:String):String; //用FormCode轉成文件名稱 |
| | | var |
| | | i,v,ln : Integer; |
| | | DelBarCode : String; |
| | |
| | | begin |
| | | Result := ''; |
| | | if (FormCode = '') or (FormCode = 'Attach') or (FormCode = 'S_Attach') then |
| | | Result := _Msg('¥¼ÂkÃþ') |
| | | Result := _Msg('未歸類') |
| | | //showmessage('a'); |
| | | //stringtofile(FORM_INF_List.Text,'D:\121.txt'); |
| | | Else If FindSQLData(FORM_INF_List,'T1.FORM_ID,T1.FORM_DESC','T1.FORM_ID',FormCode,0,FindResult) then |
| | | Result := GetFindResult('T1.FORM_DESC'); |
| | | |
| | | ////// ¨ì¦Ûq¤å¥ó§ä////// |
| | | ////// 到自訂文件找////// |
| | | if Result = '' then |
| | | Result := GetCustomDocName(ImageSavePath+CaseID+'\',FormCode2DocNo(FormCode)); |
| | | {for i := 0 to Cust_DocNoList.Count - 1 do |
| | |
| | | {DelBarCode := '**'+FormCode; |
| | | for I := 0 to FormCodeList.Count - 1 do |
| | | begin |
| | | if FindDel then //n§ä¤U¬[ªº |
| | | if FindDel then //要找下架的 |
| | | begin |
| | | if (FormCode = FormCodeList.Strings[i]) or (DelBarCode = FormCodeList.Strings[i]) then |
| | | begin |
| | |
| | | end; } |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FormCode2FileName(FormCode:String;List:TStrings):String; //¥ÎFormCode§ä¥XÀɦW(²Ä¤@¶) |
| | | Function TCB_IMGPSScanX.FormCode2FileName(FormCode:String;List:TStrings):String; //用FormCode找出檔名(第一頁) |
| | | var |
| | | i : Integer; |
| | | v,v1 : Integer; |
| | |
| | | begin |
| | | V := pos('_',List.Strings[i]); |
| | | v1 := pos('.',List.Strings[i]); |
| | | if (FormCode = '') and (V = 0)then //FormCode ¬°ªÅªº«h§äªþ¥ó¥X¨Ó |
| | | if (FormCode = '') and (V = 0)then //FormCode 為空的則找附件出來 |
| | | begin |
| | | Result := List.Strings[i]; |
| | | Break; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FileName2FormCode(FileName:String):String; //±qÀɦW¨ú¥XFormCode |
| | | Function TCB_IMGPSScanX.FileName2FormCode(FileName:String):String; //從檔名取出FormCode |
| | | var |
| | | v,v1 : Integer; |
| | | begin |
| | |
| | | begin |
| | | Result := Copy(FileName,v+1,v1-v-1); |
| | | end |
| | | Else //ªþ¥ó |
| | | Else //附件 |
| | | begin |
| | | Result := ''; |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FileName2FormName(CaseID,FileName:String):String; //±qÀɦW¨ú¥X¤å¥ó¦WºÙ |
| | | Function TCB_IMGPSScanX.FileName2FormName(CaseID,FileName:String):String; //從檔名取出文件名稱 |
| | | begin |
| | | Result := FormCode2FormName(CaseID,FileName2FormCode(FileName)); |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FileName2ScanPage(FileName:String):Integer; //±qÀɦWÂà¥X±½ºË¶¼Æ |
| | | Function TCB_IMGPSScanX.FileName2ScanPage(FileName:String):Integer; //從檔名轉出掃瞄頁數 |
| | | Var |
| | | v : Integer; |
| | | FName : String; |
| | | begin |
| | | FName := ExtractFileName(FileName); |
| | | v := Pos('_',FName); |
| | | if v = 0 then //ªþ¥ó |
| | | if v = 0 then //附件 |
| | | v := pos('.',FName); |
| | | Result := Strtoint(Copy(FName,1,v-1)); |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FileName2NoQuene_Filename(FileName:String):String; //¨ú¥X¨S¦³§Ç¸¹ªºÀɦW |
| | | Function TCB_IMGPSScanX.FileName2NoQuene_Filename(FileName:String):String; //取出沒有序號的檔名 |
| | | var |
| | | v,v1 : Integer; |
| | | FName : String; |
| | | begin |
| | | FName := ExtractFileName(FileName); |
| | | v := Pos('_',FName); |
| | | if v = 0 then //ªþ¥ó |
| | | if v = 0 then //附件 |
| | | v := pos('.',FName); |
| | | v1 := length(FName); |
| | | Result := Copy(FName,v,v1-v+1); |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FileName2Index(FileName:String):Integer; //±qÀɦW¨ú¥X¦bContextListªº§Ç¸¹ |
| | | Function TCB_IMGPSScanX.FileName2Index(FileName:String):Integer; //從檔名取出在ContextList的序號 |
| | | var |
| | | i : Integer; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FileName2NowDcoNo(FileName:String;CtList,DNList:TStrings):String; //±qÀɦW¨ú¥XÂkÄݪº¤å¥ó¥N¸¹ |
| | | Function TCB_IMGPSScanX.FileName2NowDcoNo(FileName:String;CtList,DNList:TStrings):String; //從檔名取出歸屬的文件代號 |
| | | var |
| | | i : Integer; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FormCode2DocNo(FormCode:String):String; //FormCodeÂàDocno |
| | | Function TCB_IMGPSScanX.FormCode2DocNo(FormCode:String):String; //FormCode轉Docno |
| | | Var |
| | | i : Integer; |
| | | begin |
| | |
| | | end; |
| | | |
| | | end; |
| | | if (FormCode <> '') and (Result = '') then //¬O¦Ûq¤å¥ó |
| | | if (FormCode <> '') and (Result = '') then //是自訂文件 |
| | | begin |
| | | Result := Copy(FormCode,1,8); |
| | | Result := Copy(FormCode,1,8); //20170224 DocNo 固定長度8碼 |
| | | end; |
| | | |
| | | {If FindSQLData(FORM_INF_List,'T1.DOC_NO','T1.FORM_ID',FormCode,0,FindResult) Then //20130403¤ÓºC¤F..´«±¼ |
| | | {If FindSQLData(FORM_INF_List,'T1.DOC_NO','T1.FORM_ID',FormCode,0,FindResult) Then //20130403太慢了..換掉 |
| | | begin |
| | | Result := GetFindResult('T1.DOC_NO'); |
| | | end;} |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FormCode2Version(FormCode:String):String; //FormCodeÂ઩¥» |
| | | Function TCB_IMGPSScanX.FormCode2Version(FormCode:String):String; //FormCode轉版本 |
| | | begin |
| | | Result := Copy(FormCode,11,5); |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FormCode2Page(FormCode:String):String; //FormCodeÂà¶¼Æ |
| | | Function TCB_IMGPSScanX.FormCode2Page(FormCode:String):String; //FormCode轉頁數 |
| | | begin |
| | | Result := Copy(FormCode,9,2) |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.DocNo2DocName(CaseID,DocNo:String):String; //DocnoÂàDoc¦WºÙ |
| | | Function TCB_IMGPSScanX.DocNo2DocName(CaseID,DocNo:String):String; //Docno轉Doc名稱 |
| | | var |
| | | i,v,ln : Integer; |
| | | CusDocNo,CusDocName : String; |
| | |
| | | Result := ''; |
| | | if DocNo = AttName then |
| | | begin |
| | | Result := _Msg('¥¼ÂkÃþ'); |
| | | Result := _Msg('未歸類'); |
| | | end |
| | | Else |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | if Result = '' then //¥h¦Ûq¤å¥ó¸Ì§ä |
| | | if Result = '' then //去自訂文件裡找 |
| | | begin |
| | | Result := GetCustomDocName(ImageSavePath+CaseID+'\',DocNo); |
| | | {for i := 0 to Cust_DocNoList.Count - 1 do |
| | |
| | | |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.DocNo2FileName(DocNo:String;List:TStrings):String; //¥ÎDocNo§ä¥XÀɦW(²Ä¤@¶) |
| | | Function TCB_IMGPSScanX.DocNo2FileName(DocNo:String;List:TStrings):String; //用DocNo找出檔名(第一頁) |
| | | var |
| | | i : Integer; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FormCode2WorkNo(FormCode:String):String; //¥ÎFormCode¨ú¥X§@·~§O |
| | | Function TCB_IMGPSScanX.FormCode2WorkNo(FormCode:String):String; //用FormCode取出作業別 |
| | | begin |
| | | Result := ''; |
| | | If FindSQLData(FORM_INF_List,'T1.WORK_NO','T1.FORM_ID',FormCode,0,FindResult) Then |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.DocNo2WorkNo(DocNo:String):String; //¥ÎDocNo¨ú¥X§@·~§O |
| | | Function TCB_IMGPSScanX.DocNo2WorkNo(DocNo:String):String; //用DocNo取出作業別 |
| | | begin |
| | | Result := ''; |
| | | If FindSQLData(Doc_Inf_List,'WORK_NO','DOC_NO',DocNo,0,FindResult) Then |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.DocNoNeedDiv(DocNo:String):Boolean; //¬O§_¬O»Ý¤À¥÷¼Æªº¤å¥ó¥N¸¹ |
| | | Function TCB_IMGPSScanX.DocNoNeedDiv(DocNo:String):Boolean; //是否是需分份數的文件代號 |
| | | var |
| | | NeedDiv : String; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CaseNode2Info(Node:TTreeNode;Mode:Char):String; //®×¥óNode¨ú®×¥ó½s¸¹ Mode: I:Caseno;P:Page |
| | | Function TCB_IMGPSScanX.CaseNode2Info(Node:TTreeNode;Mode:Char):String; //案件Node取案件編號 Mode: I:Caseno;P:Page |
| | | var |
| | | v,ln : Integer; |
| | | begin |
| | | //XXXXXX-XX¶ |
| | | //XXXXXX-XX頁 |
| | | V := Pos('-',Node.Text); |
| | | ln := Length(Node.Text); |
| | | case Mode of |
| | |
| | | |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.DocNode2Info(Node:TTreeNode;Mode:Char):String; //¤å¥óNode¨ú¤å¥ó¥N¸¹ Mode: I:Docno;N:Docname;P:Page;G:Group |
| | | Function TCB_IMGPSScanX.DocNode2Info(Node:TTreeNode;Mode:Char):String; //文件Node取文件代號 Mode: I:Docno;N:Docname;P:Page;G:Group |
| | | var |
| | | v,v1,v2,v3,ln :integer; |
| | | begin |
| | | //¤å¥ó¦WºÙ@²Õ¼Æ{¤å¥ó¥N¸¹}-XX¶ |
| | | //文件名稱@組數{文件代號}-XX頁 |
| | | V := PosEnd('@',Node.Text); |
| | | v1 := PosEnd('{',Node.Text); |
| | | v2 := PosEnd('}',Node.Text); |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FormNode2Info(Node:TTreeNode;Mode:Char):String; //ªí³æNode¨úªí³æ¥N¸¹ Mode: I:FormID;N:FormName;P:Page |
| | | Function TCB_IMGPSScanX.FormNode2Info(Node:TTreeNode;Mode:Char):String; //表單Node取表單代號 Mode: I:FormID;N:FormName;P:Page |
| | | var |
| | | v,v1,v2,ln :integer; |
| | | begin |
| | | //ªí³æ¥N¸¹{ªí³æ¦WºÙ}-XX¶ |
| | | //表單代號{表單名稱}-XX頁 |
| | | v := Pos('{',Node.Text); |
| | | v1 := PosEnd('}',Node.Text); |
| | | v2 := PosEnd('-',Node.Text); |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.PriorPage(Page:Integer); //¤W¤@¶ |
| | | Procedure TCB_IMGPSScanX.PriorPage(Page:Integer); //上一頁 |
| | | var |
| | | iISB : TImageScrollBox; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.NextPage(Page:Integer); //¤U¤@¶ |
| | | Procedure TCB_IMGPSScanX.NextPage(Page:Integer); //下一頁 |
| | | var |
| | | iISB : TImageScrollBox; |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.DocNoExistsinTree(CaseNode:TTreeNode;DocNo:String):Boolean; //¬O§_¤v¦s¦b¾ð¸Ì |
| | | Function TCB_IMGPSScanX.DocNoExistsinTree(CaseNode:TTreeNode;DocNo:String):Boolean; //是否己存在樹裡 |
| | | var |
| | | i : Integer; |
| | | begin |
| | |
| | | |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.DocnoNeedGroup(DocNo:String):Boolean; //¶Ç¤JªºDocNo¬O§_»Ý¤À²Õ |
| | | Function TCB_IMGPSScanX.DocnoNeedGroup(DocNo:String):Boolean; //傳入的DocNo是否需分組 |
| | | begin |
| | | Result := False; |
| | | If FindSQLData(Doc_Inf_List,'IS_DOC_DIV','DOC_NO',DocNo,0,FindResult) Then |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.DistinctFormCode(CaseID:String); //±q®×¥ó¸ÌªºFormCode¨ú¥X²Ä¤@¶ |
| | | Procedure TCB_IMGPSScanX.DistinctFormCode(CaseID:String); //從案件裡的FormCode取出第一頁 |
| | | var |
| | | i,n : Integer; |
| | | LForm,OForm : String; |
| | |
| | | end; |
| | | |
| | | |
| | | Function TCB_IMGPSScanX.OMRCheckCase(CaseID:String):Boolean; //OMRÀ訅 |
| | | Function TCB_IMGPSScanX.OMRCheckCase(CaseID:String):Boolean; //OMR檢核 |
| | | var |
| | | i,n,m,v,v1 : Integer; |
| | | XT,RelaXT,ValueXT : TXmltool; |
| | |
| | | OMROK : Boolean; |
| | | CaseOk : Boolean; |
| | | ErrStr : String; |
| | | SiteRec,RelaSiteRec : String; //¦h²Õ¦ì¸m°O¿ý |
| | | SiteRec,RelaSiteRec : String; //多組位置記錄 |
| | | OMRValue : String; |
| | | MainFormID,MainDocNo,MainVersion : String; //¥DFormID |
| | | MainFormPage,CaseFormPage : Integer; //¥Dn¤å¥ó»Ýnªº¶¼Æ |
| | | NeedDocNoStr,NoDocNoStr : String; //¬Û¨Ì ¤¬¥¸¤å¥ó¦r¦ê |
| | | MainFormID,MainDocNo,MainVersion : String; //主FormID |
| | | MainFormPage,CaseFormPage : Integer; //主要文件需要的頁數 |
| | | NeedDocNoStr,NoDocNoStr : String; //相依 互斥文件字串 |
| | | List : TStringlist; |
| | | FormCode : String; |
| | | FormDataPages : Integer; |
| | | NoSite : Boolean; //¥¼©w¦ì |
| | | NoSite : Boolean; //未定位 |
| | | Anchor,Anchor1 : String; |
| | | OMROkCount : Integer; |
| | | //Casecheck : Boolean; //¬O§_n°µÀ訅 |
| | | //AllCheck : Boolean; //¬O§_n°µ§¹¾ãÀ訅 |
| | | //Casecheck : Boolean; //是否要做檢核 |
| | | //AllCheck : Boolean; //是否要做完整檢核 |
| | | begin |
| | | ///OMRErrInfo 1: ¥²n¤å¥ó 2:¬Û¨Ì¤å¥ó 3:¤¬¥¸¤å¥ó 4:¥²¶ñ 5:Äæ¦ì¦³Èªþ¤å¥ó 6:Äæ¦ì¦³È¤£ªþ¤å¥ó |
| | | /// 7: Äæ¦ì¦³È¬ÛÃöÄæ¦ì¤]n¦³È 8:Äæ¦ì¦³Èn¼g³Æµù 9:°±¥Î¤é´Á 10:³Ì¤j¶¼Æ |
| | | ///OMRErrInfo 1: 必要文件 2:相依文件 3:互斥文件 4:必填 5:欄位有值附文件 6:欄位有值不附文件 |
| | | /// 7: 欄位有值相關欄位也要有值 8:欄位有值要寫備註 9:停用日期 10:最大頁數 |
| | | //Casecheck := True; |
| | | //Allcheck := True; |
| | | //if (FMode = 'ISCAN') then |
| | |
| | | begin |
| | | |
| | | end; |
| | | //ShowMessage('MainFormID='+MainFormID); |
| | | if MainFormID = ''then |
| | | begin |
| | | //20131203 yuu»¡¤£Àˬd³oÓ,¥ý®³±¼ |
| | | {if FMode <> 'SSCAN' then //ñ¸p³¹¥ó·|´«¥DFormID,¥ý¸õ¹L |
| | | //20131203 yuu說不檢查這個,先拿掉 20170315 楷琳說未歸類要擋 |
| | | if FCheck_main_form='Y' then |
| | | begin |
| | | ErrStr:=_Msg('§ä¤£¨ì¤À®×¤å¥ó'); //§ä¤£¨ì¥D¤å¥ó |
| | | OMRErr2ini(CaseID,ErrStr,'','','','','','',False,False,True); |
| | | CaseOk := false; |
| | | end;} |
| | | if (FMode <> 'SSCAN') AND (FMode<>'ESCAN') then //簽署章件會換主FormID,先跳過 20170629 ESCAN 也不檢查 |
| | | begin |
| | | ErrStr:=_Msg('找不到分案文件'); //找不到主文件 |
| | | OMRErr2ini(CaseID,ErrStr,'','','','','','',False,False,True); |
| | | CaseOk := false; |
| | | end; |
| | | end; |
| | | |
| | | end |
| | | Else |
| | | begin |
| | | //////¥Dn«D¥Dn¤å¥ó////// |
| | | //////主要非主要文件////// |
| | | DistinctDocinCase(ImageSavePath+CaseID+'\upload\'); |
| | | |
| | | if ModeNeedCheck(OMRErrInfo[1].Mode,FMode) then //¬O§_nÀ訅 |
| | | if ModeNeedCheck(OMRErrInfo[1].Mode,FMode) then //是否要檢核 |
| | | begin |
| | | for i := 0 to DocNo_VerinCase.Count - 1 do |
| | | begin |
| | |
| | | v1 := length(DocNo_VerinCase.Strings[i]); |
| | | MainDocNo := Copy(DocNo_VerinCase.Strings[i],1,v-1); //FormCode2DocNo(MainFormID); |
| | | MainVersion :=Copy(DocNo_VerinCase.Strings[i],v+1,v1-v); //FormCode2Version(MainFormID); |
| | | MainFormPage := GetDataDocNoPage(MainDocNo,MainVersion); //¸ê®Æ®w°O¿ý¥D¤å¥ó¶¼Æ |
| | | CaseFormPage := CheckCaseDocNoPage(CaseID,MainDocNo,MainVersion,MainFormPage); //®×¥ó¥D¤å¥óªº¶¼Æ |
| | | MainFormPage := GetDataDocNoPage(MainDocNo,MainVersion); //資料庫記錄主文件頁數 |
| | | CaseFormPage := CheckCaseDocNoPage(CaseID,MainDocNo,MainVersion,MainFormPage); //案件主文件的頁數 |
| | | IF (MainFormPage > 0) and (MainFormPage <> CaseFormPage) then |
| | | begin |
| | | ErrStr:=MainDocNo+Format(OMRErrInfo[1].Info,[Inttostr(MainFormPage),Inttostr(CaseFormPage)]); //¥Dn¤å¥ó»Ý¦³XX¶¶ÈªþXX¶ |
| | | ErrStr:=MainDocNo+Format(OMRErrInfo[1].Info,[Inttostr(MainFormPage),Inttostr(CaseFormPage)]); //主要文件需有XX頁僅附XX頁 |
| | | OMRErr2ini(CaseID,ErrStr,'','','','','','',False,OMRErrInfo[1].Ignore,OMRErrInfo[1].Display); |
| | | if OMRErrInfo[1].Display then |
| | | CaseOk := false; |
| | | end; |
| | | end; |
| | | end; |
| | | //////¥Dn«D¥Dn¤å¥ó///// |
| | | //////主要非主要文件///// |
| | | //showmessage(MainFormID); |
| | | MainDocNo := FormCode2DocNo(MainFormID); |
| | | MainVersion := FormCode2Version(MainFormID); |
| | |
| | | NoDocNoStr := GetFindResult('MUTEX_FORM_ID'); |
| | | end; |
| | | |
| | | //////¬Û¨Ì¤å¥ó///// |
| | | if ModeNeedCheck(OMRErrInfo[2].Mode,FMode) then //¬O§_nÀ訅 |
| | | //////相依文件///// |
| | | if ModeNeedCheck(OMRErrInfo[2].Mode,FMode) then //是否要檢核 |
| | | begin |
| | | List.CommaText := NeedDocNoStr; |
| | | for I := 0 to List.Count - 1 do |
| | | begin |
| | | if not Case_DocNoExists(CaseID,List.Strings[i]) then //¨Sªþ¬Û¨Ì¤å¥ó |
| | | if not Case_DocNoExists(CaseID,List.Strings[i]) then //沒附相依文件 |
| | | begin |
| | | ErrStr:=Format(OMRErrInfo[2].Info,[DocNo2DocName(CaseID,List.Strings[i])]); //¨Sªþ¬Û¨Ì¤å¥ó |
| | | ErrStr:=Format(OMRErrInfo[2].Info,[DocNo2DocName(CaseID,List.Strings[i])]); //沒附相依文件 |
| | | OMRErr2ini(CaseID,ErrStr,'','','','','','',False,OMRErrInfo[2].Ignore,OMRErrInfo[2].Display); |
| | | if OMRErrInfo[2].Display then |
| | | CaseOk := false; |
| | | end; |
| | | end; |
| | | end; |
| | | //////¬Û¨Ì¤å¥ó///// |
| | | //////相依文件///// |
| | | |
| | | //////¤¬¥¸¤å¥ó///// |
| | | if ModeNeedCheck(OMRErrInfo[3].Mode,FMode) then //¬O§_nÀ訅 |
| | | //////互斥文件///// |
| | | if ModeNeedCheck(OMRErrInfo[3].Mode,FMode) then //是否要檢核 |
| | | begin |
| | | List.CommaText := NoDocNoStr; |
| | | for I := 0 to List.Count - 1 do |
| | | begin |
| | | if Case_DocNoExists(CaseID,List.Strings[i]) then //ªþ¤F¤¬¥¸¤å¥ó |
| | | if Case_DocNoExists(CaseID,List.Strings[i]) then //附了互斥文件 |
| | | begin |
| | | ErrStr:=Format(OMRErrInfo[3].Info,[DocNo2DocName(CaseID,List.Strings[i])]); //¦³ªþ¤¬¥¸¤å¥ó |
| | | ErrStr:=Format(OMRErrInfo[3].Info,[DocNo2DocName(CaseID,List.Strings[i])]); //有附互斥文件 |
| | | OMRErr2ini(CaseID,ErrStr,'','','','','','',False,OMRErrInfo[3].Ignore,OMRErrInfo[3].Display); |
| | | if OMRErrInfo[3].Display then |
| | | CaseOk := false; |
| | | end; |
| | | end; |
| | | end; |
| | | //////¤¬¥¸¤å¥ó///// |
| | | //////互斥文件///// |
| | | end; |
| | | //end; |
| | | List.LoadFromFile(ImageSavePath + CaseID+'\upload\Context.dat'); |
| | | for i := 0 to List.Count - 1 do |
| | | begin |
| | | FormCode := FileName2FormCode(List.Strings[i]); |
| | | /////¥¼ÂkÃþ/// |
| | | {IF FormCode = 'Attach' Then //20140211 yuu»¡¤£Àˬd¤F |
| | | /////未歸類/// |
| | | {IF FormCode = 'Attach' Then //20140211 yuu說不檢查了 |
| | | begin |
| | | ErrStr:=_Msg('©|¦³¤å¥ó¥¼ÂkÃþ'); |
| | | ErrStr:=_Msg('尚有文件未歸類'); |
| | | OMRErr2ini(CaseID,ErrStr,'','','','','','',False,False,True); |
| | | CaseOk := false; |
| | | end; } |
| | | /////¥¼ÂkÃþ////// |
| | | /////未歸類////// |
| | | |
| | | /////¥¼µù¥U¤å¥ó///// |
| | | {IF not FormIDExists(FormCode,False) then //¥¼µù¥U¤å¥ó |
| | | /////未註冊文件///// |
| | | {IF not FormIDExists(FormCode,False) then //未註冊文件 |
| | | begin |
| | | ErrStr:=FormCode+_Msg('¤£¬°¦¹·~°Èªºªí³æ¥N½X'); |
| | | ErrStr:=FormCode+_Msg('不為此業務的表單代碼'); |
| | | OMRErr2ini(CaseID,ErrStr,'','','','',False,False,True); |
| | | CaseOk := false; |
| | | end } |
| | | /////¥¼µù¥U¤å¥ó///// |
| | | //////°±¥Î¤å¥ó// |
| | | {Else} IF ModeNeedCheck(OMRErrInfo[9].Mode,FMode) and (not FormIDExists(FormCode,True,0)) then //¦³°±¥Îªº¤å¥ó |
| | | /////未註冊文件///// |
| | | //////停用文件// |
| | | {Else} IF ModeNeedCheck(OMRErrInfo[9].Mode,FMode) and (not FormIDExists(FormCode,True,0)) and (not checkFormCodeIsCustom(ImageSavePath + CaseID+'\upload\',FormCode)) then //有停用的文件 |
| | | begin |
| | | ErrStr:=Format(OMRErrInfo[9].Info,[FormCode2FormName(CaseID,FormCode)]); //¦³°±¥Î¤å¥ó |
| | | //ShowMessage('AAAA'); |
| | | ErrStr:=Format(OMRErrInfo[9].Info,[FormCode2FormName(CaseID,FormCode)]); //有停用文件 |
| | | OMRErr2ini(CaseID,ErrStr,'','','','','','',False,OMRErrInfo[9].Ignore,OMRErrInfo[9].Display); |
| | | //ShowMessage('ErrStr='+ErrStr); |
| | | if OMRErrInfo[9].Display then |
| | | CaseOk := false; |
| | | end; |
| | | //////°±¥Î¤å¥ó//// |
| | | //////停用文件//// |
| | | end; |
| | | finally |
| | | List.Free; |
| | | end; |
| | | //if AllCheck then |
| | | //begin |
| | | //////³Ì¤j¶¼Æ///// |
| | | //////最大頁數///// |
| | | DistinctFormCode(CaseID); |
| | | if ModeNeedCheck(OMRErrInfo[10].Mode,FMode) then //¬O§_nÀ訅 |
| | | if ModeNeedCheck(OMRErrInfo[10].Mode,FMode) then //是否要檢核 |
| | | begin |
| | | For i := 0 to OMRFileList.Count - 1 do |
| | | begin |
| | | FormCode := FileName2FormCode(OMRFileList.Strings[i]); |
| | | FormDataPages := GetDataFormCodePages(FormCode); |
| | | |
| | | IF (FormCode <> '') and (FormDataPages > 0) and (FindFormCodePages(CaseID,FormCode) > FormDataPages) then //¦³¶W¹L³Ì¤j¶¼Æªº¤å¥ó |
| | | IF (FormCode <> '') and (FormDataPages > 0) and (FindFormCodePages(CaseID,FormCode) > FormDataPages) then //有超過最大頁數的文件 |
| | | begin |
| | | ErrStr:=Format(OMRErrInfo[10].Info,[FormCode2FormName(CaseID,FormCode),inttostr(FormDataPages)]); //¦³¶W¹L³Ì¤j¶¼Æ¤å¥ó |
| | | ErrStr:=Format(OMRErrInfo[10].Info,[FormCode2FormName(CaseID,FormCode),inttostr(FormDataPages)]); //有超過最大頁數文件 |
| | | OMRErr2ini(CaseID,ErrStr,'','','','','','',False,OMRErrInfo[10].Ignore,OMRErrInfo[10].Display); |
| | | if OMRErrInfo[10].Display then |
| | | CaseOk := false; |
| | | end; |
| | | end; |
| | | end; |
| | | /////³Ì¤j¶¼Æ///// |
| | | /////最大頁數///// |
| | | //end; |
| | | ImageScrollBox1.FileName := ''; |
| | | //if FWork_No = 'CW' then //²z½ß´N¤£°µ¤U±ªºÀˮ֤F |
| | | //if FWork_No = 'CW' then //理賠就不做下面的檢核了 |
| | | //begin |
| | | //////OMRÀË®Ö/////// |
| | | //////OMR檢核/////// |
| | | ContextList.LoadFromFile(ImageSavePath+CaseID+'\upload\Context.dat'); |
| | | DistinctFormCode(CaseID); |
| | | ValueXT := TXmltool.Create; |
| | |
| | | OMRFormCode := FileName2FormCode(OMRFileList.Strings[i]); |
| | | OMRFormName := FormCode2FormName(CaseID,OMRFormCode); |
| | | Anchor := FormID2Anchor(OMRFormCode); |
| | | ///¨Ì¤Q¦r©w¦ìÂIÁY©ñ//// |
| | | ImageReSize(CaseID,OMRFile); |
| | | ////¨Ì¤Q¦r©w¦ìÂIÁY©ñ//// |
| | | if not FileExists(CheckXmlPath+OMRFormCode+'.xml') then //¨S¦³Xml´N¤£¥ÎÀ訅 |
| | | ///依十字定位點縮放//// |
| | | ImageReSize_FormID(CaseID,OMRFile); |
| | | ////依十字定位點縮放//// |
| | | if not FileExists(CheckXmlPath+OMRFormCode+'.xml') then //沒有Xml就不用檢核 |
| | | Continue; |
| | | |
| | | |
| | |
| | | RelaXT := TXmltool.Create; |
| | | |
| | | try |
| | | //*******¥²¶ñ******** |
| | | if ModeNeedCheck(OMRErrInfo[4].Mode,FMode) then //¬O§_nÀ訅 |
| | | //*******必填******** |
| | | if ModeNeedCheck(OMRErrInfo[4].Mode,FMode) then //是否要檢核 |
| | | begin |
| | | if XT.SubNodes['/form/settype1/'].First then |
| | | Repeat |
| | | OMROK := False; |
| | | SiteRec := ''; //²M±¼ |
| | | SiteRec := ''; //清掉 |
| | | ColEName := XT.SubNodes['/form/settype1/'].NodeName; |
| | | ColCName := XT.Node['/form/settype1/'+ColEName+'/'].Attributes['coldesc']; |
| | | ColCName := Copy(ColCName,1,length(ColCName)-6); |
| | |
| | | begin |
| | | Pixel := Strtoint(XT.Node['/form/settype1/'+ColEName+'/'+nodename+'/'].Attributes['pixel']); |
| | | Site := XT.Node['/form/settype1/'+ColEName+'/'+nodename+'/'].Attributes['colxy']; |
| | | if SiteRec= '' then //°O¿ý¦ì¸m |
| | | if SiteRec= '' then //記錄位置 |
| | | SiteRec := Site |
| | | else |
| | | SiteRec := SiteRec+'@'+Site; |
| | | //¦³¶ñ´Nok |
| | | //有填就ok |
| | | //Showmessage(ColCName +','+ inttostr(OMRMpsV1.GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site))+','+inttostr(Pixel + SafePixel)); |
| | | //SafePixel:=90000; |
| | | //ShowMessage(ColEName+' '+ColCName+' 圖像實際點數='+IntToStr(GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt))+' 設定點數='+IntToStr( (Pixel + SafePixel))); |
| | | if GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt) > (Pixel + SafePixel) then |
| | | begin |
| | | //Showmessage('oh'); |
| | |
| | | Until not XT.SubNodes['/form/settype1/'+ColEName+'/'].Next; |
| | | if not OMROk then |
| | | begin |
| | | ErrStr:=Format(OMRErrInfo[4].Info,[ColCName]); //XXÄæ¦ì¥¼¶ñ¼g |
| | | ErrStr:=Format(OMRErrInfo[4].Info,[ColCName]); //XX欄位未填寫 |
| | | OMRErr2ini(CaseID,ErrStr,ImageSavePath+CaseID+'\upload\'+OMRFile,SiteRec,'','',Anchor,Anchor1,False,OMRErrInfo[4].Ignore,OMRErrInfo[4].Display); |
| | | if OMRErrInfo[4].Display then |
| | | CaseOk := false; |
| | | end; |
| | | Until not XT.SubNodes['/form/settype1/'].Next ; |
| | | end; |
| | | //*******¥²¶ñ******** |
| | | //*******必填******** |
| | | |
| | | //if AllCheck then |
| | | //begin |
| | | //*******¦³È¬ÛÃö¤å¥óªºÄæ¦ì¤]n¦³È******* |
| | | if ModeNeedCheck(OMRErrInfo[7].Mode,FMode) then //¬O§_nÀ訅 |
| | | //*******有值相關文件的欄位也要有值******* |
| | | if ModeNeedCheck(OMRErrInfo[7].Mode,FMode) then //是否要檢核 |
| | | begin |
| | | if XT.SubNodes['/form/settype3/'].First then |
| | | Repeat |
| | |
| | | ColCName := XT.Node['/form/settype3/'+ColEName+'/'].Attributes['coldesc']; |
| | | ColCName := Copy(ColCName,1,length(ColCName)-6); |
| | | Site := XT.Node['/form/settype3/'+ColEName+'/'].Attributes['colxy']; |
| | | if SiteRec= '' then //°O¿ý¦ì¸m |
| | | if SiteRec= '' then //記錄位置 |
| | | SiteRec := Site |
| | | else |
| | | SiteRec := SiteRec+'@'+Site; |
| | | Pixel := XT.Node['/form/settype3/'+ColEName+'/'].Attributes['pixel']; |
| | | if GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt) > (Pixel + SafePixel) then |
| | | begin |
| | | ////¦³¶ñ¼g//// |
| | | ////有填寫//// |
| | | |
| | | if XT.SubNodes['/form/settype3/'+ColEName+'/'].First then |
| | | Repeat |
| | |
| | | begin |
| | | RelaPixel := Strtoint(RelaXT.Node['/form/settype2/'+RelaColEName+'/'+nodename+'/'].Attributes['pixel']); |
| | | RelaSite := RelaXT.Node['/form/settype2/'+RelaColEName+'/'+nodename+'/'].Attributes['colxy']; |
| | | if RelaSiteRec= '' then //°O¿ý¦ì¸m |
| | | if RelaSiteRec= '' then //記錄位置 |
| | | RelaSiteRec := RelaSite |
| | | else |
| | | RelaSiteRec := RelaSiteRec+'@'+RelaSite; |
| | |
| | | if not OMROk then |
| | | begin |
| | | if not FileExists(ImageSavePath+CaseID+'\upload\'+RelaFile) then |
| | | ErrStr:=Format(OMRErrInfo[7].Info,[ColCName,RelaColCName])+'('+_msg('¥¼ªþ')+RelaFormName+')' //XXÄæ¦ì¶ñ¼g®É,XXÄæ¦ì¥¼¶ñ¼g |
| | | ErrStr:=Format(OMRErrInfo[7].Info,[ColCName,RelaColCName])+'('+_msg('未附')+RelaFormName+')' //XX欄位填寫時,XX欄位未填寫 |
| | | Else if NoSite then |
| | | ErrStr:=Format(OMRErrInfo[7].Info,[ColCName,RelaColCName])+'('+_msg('¥¼©w¦ì')+')' |
| | | ErrStr:=Format(OMRErrInfo[7].Info,[ColCName,RelaColCName])+'('+_msg('未定位')+')' |
| | | Else |
| | | ErrStr:=Format(OMRErrInfo[7].Info,[ColCName,RelaColCName]); //XXÄæ¦ì¶ñ¼g®É,XXÄæ¦ì¥¼¶ñ¼g |
| | | ErrStr:=Format(OMRErrInfo[7].Info,[ColCName,RelaColCName]); //XX欄位填寫時,XX欄位未填寫 |
| | | OMRErr2ini(CaseID,ErrStr,ImageSavePath+CaseID+'\upload\'+OMRFile,SiteRec,ImageSavePath+CaseID+'\upload\'+RelaFile,RelaSiteRec,Anchor,Anchor1,False,OMRErrInfo[7].Ignore,OMRErrInfo[7].Display); |
| | | if OMRErrInfo[7].Display then |
| | | CaseOk := false; |
| | |
| | | end; |
| | | Until not XT.SubNodes['/form/settype3/'].Next ; |
| | | end; |
| | | //*******¦³È¬ÛÃö¤å¥óªºÄæ¦ì¤]n¦³È******* |
| | | //*******有值相關文件的欄位也要有值******* |
| | | |
| | | //*******¦³È¬ÛÃö¤å¥óªºÄæ¦ì¤£¯à¦³È******* |
| | | if ModeNeedCheck(OMRErrInfo[11].Mode,FMode) then //¬O§_nÀ訅 |
| | | //*******有值相關文件的欄位不能有值******* |
| | | if ModeNeedCheck(OMRErrInfo[11].Mode,FMode) then //是否要檢核 |
| | | begin |
| | | if XT.SubNodes['/form/settype8/'].First then |
| | | Repeat |
| | |
| | | ColCName := XT.Node['/form/settype8/'+ColEName+'/'].Attributes['coldesc']; |
| | | ColCName := Copy(ColCName,1,length(ColCName)-6); |
| | | Site := XT.Node['/form/settype8/'+ColEName+'/'].Attributes['colxy']; |
| | | if SiteRec= '' then //°O¿ý¦ì¸m |
| | | if SiteRec= '' then //記錄位置 |
| | | SiteRec := Site |
| | | else |
| | | SiteRec := SiteRec+'@'+Site; |
| | |
| | | |
| | | if GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt) > (Pixel + SafePixel) then |
| | | begin |
| | | ////¦³¶ñ¼g// // |
| | | ////有填寫// // |
| | | inc(OMROkCount); |
| | | end; |
| | | if XT.SubNodes['/form/settype8/'+ColEName+'/'].First then |
| | |
| | | begin |
| | | RelaPixel := Strtoint(RelaXT.Node['/form/settype2/'+RelaColEName+'/'+nodename+'/'].Attributes['pixel']); |
| | | RelaSite := RelaXT.Node['/form/settype2/'+RelaColEName+'/'+nodename+'/'].Attributes['colxy']; |
| | | if RelaSiteRec= '' then //°O¿ý¦ì¸m |
| | | if RelaSiteRec= '' then //記錄位置 |
| | | RelaSiteRec := RelaSite |
| | | else |
| | | RelaSiteRec := RelaSiteRec+'@'+RelaSite; |
| | |
| | | if OMROkCount > 1 then |
| | | begin |
| | | if not FileExists(ImageSavePath+CaseID+'\upload\'+RelaFile) then |
| | | ErrStr:=Format(OMRErrInfo[11].Info,[ColCName,RelaColCName])+'('+_msg('¥¼ªþ')+RelaFormName+')' //XXÄæ¦ì¶ñ¼g®É,XXÄæ¦ì¤]¶ñ¼g |
| | | ErrStr:=Format(OMRErrInfo[11].Info,[ColCName,RelaColCName])+'('+_msg('未附')+RelaFormName+')' //XX欄位填寫時,XX欄位也填寫 |
| | | Else if NoSite then |
| | | ErrStr:=Format(OMRErrInfo[11].Info,[ColCName,RelaColCName])+'('+_msg('¥¼©w¦ì')+')' |
| | | ErrStr:=Format(OMRErrInfo[11].Info,[ColCName,RelaColCName])+'('+_msg('未定位')+')' |
| | | Else |
| | | ErrStr:=Format(OMRErrInfo[11].Info,[ColCName,RelaColCName]); //XXÄæ¦ì¶ñ¼g®É,XXÄæ¦ì¤]¶ñ¼g |
| | | ErrStr:=Format(OMRErrInfo[11].Info,[ColCName,RelaColCName]); //XX欄位填寫時,XX欄位也填寫 |
| | | OMRErr2ini(CaseID,ErrStr,ImageSavePath+CaseID+'\upload\'+OMRFile,SiteRec,ImageSavePath+CaseID+'\upload\'+RelaFile,RelaSiteRec,Anchor,Anchor1,False,OMRErrInfo[7].Ignore,OMRErrInfo[7].Display); |
| | | if OMRErrInfo[11].Display then |
| | | CaseOk := false; |
| | |
| | | Until not XT.SubNodes['/form/settype8/'+ColEName+'/'].Next; |
| | | Until not XT.SubNodes['/form/settype8/'].Next ; |
| | | end; |
| | | //*******¦³È¬ÛÃö¤å¥óªºÄæ¦ì¤£¯à¦³È******* |
| | | //*******有值相關文件的欄位不能有值******* |
| | | |
| | | |
| | | |
| | | //*******¦³È¬Û¨Ì¤å¥ó******* |
| | | if ModeNeedCheck(OMRErrInfo[5].Mode,FMode) then //¬O§_nÀ訅 |
| | | //*******有值相依文件******* |
| | | if ModeNeedCheck(OMRErrInfo[5].Mode,FMode) then //是否要檢核 |
| | | begin |
| | | if XT.SubNodes['/form/settype4/'].First then |
| | | Repeat |
| | |
| | | ColCName := XT.Node['/form/settype4/'+ColEName+'/'].Attributes['coldesc']; |
| | | ColCName := Copy(ColCName,1,length(ColCName)-6); |
| | | Site := XT.Node['/form/settype4/'+ColEName+'/'].Attributes['colxy']; |
| | | if SiteRec= '' then //°O¿ý¦ì¸m |
| | | if SiteRec= '' then //記錄位置 |
| | | SiteRec := Site |
| | | else |
| | | SiteRec := SiteRec+'@'+Site; |
| | | Pixel := XT.Node['/form/settype4/'+ColEName+'/'].Attributes['pixel']; |
| | | if GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt) > (Pixel + SafePixel) then |
| | | begin |
| | | ////¦³¶ñ¼g//// |
| | | ////有填寫//// |
| | | if XT.SubNodes['/form/settype4/'+ColEName+'/'].First then |
| | | Repeat |
| | | nodename := XT.SubNodes['/form/settype4/'+ColEName+'/'].NodeName; |
| | |
| | | RelaDocName := XT.Node['/form/settype4/'+ColEName+'/'+nodename+'/'].Attributes['relaformname']; |
| | | if RelaFile='' then |
| | | begin |
| | | ErrStr:=Format(OMRErrInfo[5].Info,[ColCName,RelaDocName]); //XX¤å¥óXXÄæ¦ì¶ñ¼g®É,»ÝªþXX¤å¥ó |
| | | ErrStr:=Format(OMRErrInfo[5].Info,[ColCName,RelaDocName]); //XX文件XX欄位填寫時,需附XX文件 |
| | | OMRErr2ini(CaseID,ErrStr,ImageSavePath+CaseID+'\upload\'+OMRFile,SiteRec,'','',Anchor,Anchor1,False,OMRErrInfo[5].Ignore,OMRErrInfo[5].Display); |
| | | if OMRErrInfo[5].Display then |
| | | CaseOk := false; |
| | |
| | | end; |
| | | Until not XT.SubNodes['/form/settype4/'].Next ; |
| | | end; |
| | | //*******¦³È¬Û¨Ì¤å¥ó******* |
| | | //*******有值相依文件******* |
| | | |
| | | //*******¦³È¤¬¥¸¤å¥ó******* |
| | | if ModeNeedCheck(OMRErrInfo[6].Mode,FMode) then //¬O§_nÀ訅 |
| | | //*******有值互斥文件******* |
| | | if ModeNeedCheck(OMRErrInfo[6].Mode,FMode) then //是否要檢核 |
| | | begin |
| | | if XT.SubNodes['/form/settype5/'].First then |
| | | Repeat |
| | |
| | | ColCName := XT.Node['/form/settype5/'+ColEName+'/'].Attributes['coldesc']; |
| | | ColCName := Copy(ColCName,1,length(ColCName)-6); |
| | | Site := XT.Node['/form/settype5/'+ColEName+'/'].Attributes['colxy']; |
| | | if SiteRec= '' then //°O¿ý¦ì¸m |
| | | if SiteRec= '' then //記錄位置 |
| | | SiteRec := Site |
| | | else |
| | | SiteRec := SiteRec+'@'+Site; |
| | | Pixel := XT.Node['/form/settype5/'+ColEName+'/'].Attributes['pixel']; |
| | | if GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt) > (Pixel + SafePixel) then |
| | | begin |
| | | ////¦³¶ñ¼g//// |
| | | ////有填寫//// |
| | | if XT.SubNodes['/form/settype5/'+ColEName+'/'].First then |
| | | Repeat |
| | | nodename := XT.SubNodes['/form/settype5/'+ColEName+'/'].NodeName; |
| | |
| | | RelaDocNo := XT.Node['/form/settype5/'+ColEName+'/'+nodename+'/'].Attributes['relaformid']; |
| | | RelaFile := DocNo2FileName(RelaDocNo,ContextList); |
| | | RelaDocName := XT.Node['/form/settype5/'+ColEName+'/'+nodename+'/'].Attributes['relaformname']; |
| | | if RelaFile<>'' then //¦³ªþ 20130604¬Ý¨ì(='')§ïªº(¥¼´ú) |
| | | if RelaFile<>'' then //有附 20130604看到(='')改的(未測) |
| | | begin |
| | | ErrStr:=Format(OMRErrInfo[6].Info,[ColCName,RelaDocName]); //XX¤å¥óXXÄæ¦ì¶ñ¼g®É,¤£¯àªþXX¤å¥ó |
| | | ErrStr:=Format(OMRErrInfo[6].Info,[ColCName,RelaDocName]); //XX文件XX欄位填寫時,不能附XX文件 |
| | | OMRErr2ini(CaseID,ErrStr,ImageSavePath+CaseID+'\upload\'+OMRFile,SiteRec,'','',Anchor,Anchor1,False,OMRErrInfo[6].Ignore,OMRErrInfo[6].Display); |
| | | if OMRErrInfo[6].Display then |
| | | CaseOk := false; |
| | |
| | | end; |
| | | Until not XT.SubNodes['/form/settype5/'].Next ; |
| | | end; |
| | | //*******¦³È¤¬¥¸¤å¥ó******* |
| | | //*******有值互斥文件******* |
| | | |
| | | //*******¦³È¼g³Æµù******* |
| | | if ModeNeedCheck(OMRErrInfo[8].Mode,FMode) then //¬O§_nÀ訅 |
| | | //*******有值寫備註******* |
| | | if ModeNeedCheck(OMRErrInfo[8].Mode,FMode) then //是否要檢核 |
| | | begin |
| | | if XT.SubNodes['/form/settype6/'].First then |
| | | Repeat |
| | |
| | | Site := XT.Node['/form/settype6/'+ColEName+'/'].Attributes['colxy']; |
| | | Pixel := XT.Node['/form/settype6/'+ColEName+'/'].Attributes['pixel']; |
| | | |
| | | if SiteRec= '' then //°O¿ý¦ì¸m |
| | | if SiteRec= '' then //記錄位置 |
| | | SiteRec := Site |
| | | else |
| | | SiteRec := SiteRec+'@'+Site; |
| | | if GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt) > (Pixel + SafePixel) then |
| | | begin |
| | | ////¦³¶ñ¼g//// |
| | | ////有填寫//// |
| | | if not FileExists(ImageSavePath+CaseID+'ScanMemo.dat') then |
| | | begin |
| | | ErrStr:=Format(OMRErrInfo[8].Info,[ColCName]); //XX¤å¥óXXÄæ¦ì¶ñ¼g®É,»Ý¼g³Æµù |
| | | ErrStr:=Format(OMRErrInfo[8].Info,[ColCName]); //XX文件XX欄位填寫時,需寫備註 |
| | | OMRErr2ini(CaseID,ErrStr,ImageSavePath+CaseID+'\upload\'+OMRFile,SiteRec,'','',Anchor,Anchor1,False,OMRErrInfo[8].Ignore,OMRErrInfo[8].Display); |
| | | if OMRErrInfo[8].Display then |
| | | CaseOk := false; |
| | |
| | | end; |
| | | Until not XT.SubNodes['/form/settype6/'].Next ; |
| | | end; |
| | | //*******¦³È¼g³Æµù******* |
| | | //*******有值寫備註******* |
| | | |
| | | //*******OMR±aÈ******** |
| | | //*******OMR帶值******** |
| | | if XT.SubNodes['/form/settype7/'].First then |
| | | Repeat |
| | | ColEName := XT.SubNodes['/form/settype7/'].NodeName; |
| | | ValueXT['/content/'+ColEName+'/@savevalue'] := ''; //¥ýµ¹¹w³]ªÅ¥Õ |
| | | ValueXT['/content/'+ColEName+'/@savevalue'] := ''; //先給預設空白 |
| | | if XT.SubNodes['/form/settype7/'+ColEName+'/'].First then |
| | | Repeat |
| | | nodename := XT.SubNodes['/form/settype7/'+ColEName+'/'].NodeName; |
| | |
| | | Site := XT.Node['/form/settype7/'+ColEName+'/'+nodename+'/'].Attributes['colxy']; |
| | | OMRValue := XT.Node['/form/settype7/'+ColEName+'/'+nodename+'/'].Attributes['getvalue']; |
| | | |
| | | //¦³¶ñ´Nok |
| | | //有填就ok |
| | | if GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt) > (Pixel + SafePixel) then |
| | | begin |
| | | ValueXT['/content/'+ColEName+'/@savevalue'] := OMRValue; //¦³¶ñ´N´«¦¨³]©wªºÈ |
| | | ValueXT['/content/'+ColEName+'/@savevalue'] := OMRValue; //有填就換成設定的值 |
| | | Break; |
| | | end; |
| | | end; |
| | | Until not XT.SubNodes['/form/settype7/'+ColEName+'/'].Next; |
| | | Until not XT.SubNodes['/form/settype7/'].Next ; |
| | | |
| | | //*******OMR±aÈ******** |
| | | //*******OMR帶值******** |
| | | //end; |
| | | Finally |
| | | if (OMRValue <> '') then |
| | |
| | | Result := CaseOk; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.OMRErr2ini(CaseID,Reason,FileName,Site,RelaFileName,RelaSite,Anchor,Anchor1:String;Del,Ingnore,Display:Boolean); //OMRÀˮ֥¢±Ñ¼g¤Jini |
| | | Procedure TCB_IMGPSScanX.OMRErr2ini(CaseID,Reason,FileName,Site,RelaFileName,RelaSite,Anchor,Anchor1:String;Del,Ingnore,Display:Boolean); //OMR檢核失敗寫入ini |
| | | var |
| | | ini : Tinifile; |
| | | Errcount : Integer; |
| | |
| | | begin |
| | | ini := Tinifile.Create(ImageSavePath + CaseID+'\upload\Checkerr.ini'); |
| | | try |
| | | Errcount := ini.ReadInteger('OMRCount','Count',0); //³z¹LErrcount¨Ó¹ïÀ³ |
| | | Errcount := ini.ReadInteger('OMRCount','Count',0); //透過Errcount來對應 |
| | | inc(ErrCount); |
| | | ini.WriteString(inttostr(ErrCount),'Reason',Reason); |
| | | ini.WriteBool(inttostr(ErrCount),'Ingnore',Ingnore); |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.OMRErrini2List(CaseID:String;ErrlistForm:TErrlistForm); //OMRÀˮ֥¢±Ñ±qini¼g¤JListView |
| | | Procedure TCB_IMGPSScanX.OMRErrini2List(CaseID:String;ErrlistForm:TErrlistForm); //OMR檢核失敗從ini寫入ListView |
| | | var |
| | | ini : Tinifile; |
| | | Errcount : Integer; |
| | |
| | | |
| | | for i := 1 to ErrCount do |
| | | begin |
| | | Del := ini.ReadBool(inttostr(i),'Del',False); //¬O§_³Q²¾°£¤F |
| | | Del := ini.ReadBool(inttostr(i),'Del',False); //是否被移除了 |
| | | if Not Del then |
| | | begin |
| | | With ErrlistForm.ErrListLV.Items.Add do |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.DownLanguage:Boolean; //¤U¸ü¦h°ê»y¨¥ÀÉ |
| | | Function TCB_IMGPSScanX.DownLanguage:Boolean; //下載多國語言檔 |
| | | begin |
| | | Result := True; // http://192.168.0.101:8080/fbnp/servlet/CWC01?act=getservertime |
| | | //dnFile(HTTPSClient,FUrl+'Language.Lng','','',LngPath+'Language.Lng',FReWrite.Text,Memo1,False,DownImgStatus) |
| | | If not dnFile_Get(HTTPSClient,FUrl+'Language.Lng','','',LngPath+'Language.Lng',FReWrite,Memo1,False,'') Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | IF memo1.Lines.Strings[0] = '1' Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]; |
| | | HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | | Result := False; |
| | | Exit; |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J'); |
| | | HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.view_image_FormCode(Path,FormCode:String;stpage,stview:integer); //¥ÎFormCode¨Ó§ä¼v¹³ |
| | | procedure TCB_IMGPSScanX.view_image_FormCode(Path,FormCode:String;stpage,stview:integer); //用FormCode來找影像 |
| | | var i,p:integer; |
| | | ISB : TImageScrollBox; |
| | | lb : TLabel; |
| | |
| | | List_FormCode,Err_FormCode: String; |
| | | iFormID : String; |
| | | begin |
| | | ShowText := '¼v¹³Åã¥Ü¤¤,½ÐµyÔ'; |
| | | ShowText := '影像顯示中,請稍候'; |
| | | DataLoading(True,True); |
| | | |
| | | IF FormCode = 'ShowAll' then //Åã¥Ü©Ò¦³ªº¼v¹³ (¦]¬°ªþ¥ó·|¶ÇªÅ¦r¦ê,©Ò¥H¥ÎShowAll) |
| | | IF FormCode = 'ShowAll' then //顯示所有的影像 (因為附件會傳空字串,所以用ShowAll) |
| | | begin |
| | | ClearView(1); |
| | | CreatePreViewISB(ContextList.Count); |
| | |
| | | |
| | | List_FormCode := FileName2FormCode(ContextList.Strings[i]); |
| | | lb := TLabel(FindComponent('lb'+intToStr(stview))); |
| | | lb.Caption := Format(_Msg('²Ä%s¶'),[Add_Zoo(i+1,3)]); |
| | | lb.Caption := Format(_Msg('第%s頁'),[Add_Zoo(i+1,3)]); |
| | | If List_FormCode = '' Then |
| | | lb.Caption := lb.Caption+'('+FormCode2FormName(List_FormCode)+')' |
| | | Else |
| | |
| | | end; |
| | | FitPreViewISB; |
| | | end |
| | | Else //Åã¥Ü«ü©wFormCodeªº¼v¹³ |
| | | Else //顯示指定FormCode的影像 |
| | | begin |
| | | If (TreeView1.Selected <> nil) Then |
| | | begin |
| | |
| | | //MPSViewX.ImageZoomMode := zmFullpage; |
| | | //MPSViewX.AntiAliased := True; |
| | | lb := TLabel(FindComponent('lb'+intToStr(stview))); |
| | | lb.Caption := Format(_Msg('²Ä%s¶'),[Add_Zoo(i+1,3)]); |
| | | lb.Caption := Format(_Msg('第%s頁'),[Add_Zoo(i+1,3)]); |
| | | If List_FormCode = '' Then |
| | | lb.Caption := lb.Caption+'('+FormCode2FormName(NowCaseno,List_FormCode)+')' |
| | | Else |
| | |
| | | DataLoading(False,False); |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.view_image_DocNo(Path,DocNo,FormID:String;Pages:integer); //¥ÎDocNo¨Ó§ä¼v¹³ |
| | | procedure TCB_IMGPSScanX.view_image_DocNo(Path,DocNo,FormID:String;Pages:integer); //用DocNo來找影像 |
| | | var i,n,p:integer; |
| | | ISB : TImageScrollBox; |
| | | lb : TLabel; |
| | |
| | | iDocNo : String; |
| | | iGroupNo,page,Ct : Integer; |
| | | begin |
| | | ShowText := '¼v¹³Åã¥Ü¤¤,½ÐµyÔ'; |
| | | ShowText := '影像顯示中,請稍候'; |
| | | DataLoading(True,True); |
| | | IF DocNo = 'ShowAll' then //Åã¥Ü©Ò¦³ªº¼v¹³ (¦]¬°ªþ¥ó·|¶ÇªÅ¦r¦ê,©Ò¥H¥ÎShowAll) |
| | | IF DocNo = 'ShowAll' then //顯示所有的影像 (因為附件會傳空字串,所以用ShowAll) |
| | | begin |
| | | ClearView(1); |
| | | if GetCasePage(ImageSavePath,NowCaseno) > 30 then |
| | |
| | | For i := 0 to CaseDocNoList.Count-1 do |
| | | begin |
| | | {iDocno := DocNoDir2DocNo(CaseDocNoList.Strings[i]); |
| | | if (((FIs_In_Wh = 'Y') and (not DocNoIs_In_WH(iDocNo))) or //¤J®w±½´y¤£¬Ý«D¤J®w¤å¥ó |
| | | if (((FIs_In_Wh = 'Y') and (not DocNoIs_In_WH(iDocNo))) or //入庫掃描不看非入庫文件 |
| | | ((FIs_In_Wh = 'N') and (DocNoIs_In_WH(iDocNo)))) and |
| | | ((iDocNo <> 'Attach') and (Copy(iDocNo,1,5)<>'ZZZZZ')) then //«D¤J®w±½´y¤£¬Ý¤J®w¤å¥ó |
| | | ((iDocNo <> 'Attach') and (Copy(iDocNo,1,5)<>'ZZZZZ')) then //非入庫掃描不看入庫文件 |
| | | begin |
| | | Continue; |
| | | end; } |
| | |
| | | end; |
| | | FitPreViewISB; |
| | | end |
| | | Else if (DocNo <> '') and (FormID = '') then //Åã¥Ü«ü©wDocNo+²Õ§Oªº¼v¹³ ªþ¥ó¶Ç Attach |
| | | Else if (DocNo <> '') and (FormID = '') then //顯示指定DocNo+組別的影像 附件傳 Attach |
| | | begin |
| | | iDocNo := DocNo; |
| | | ContextList.Clear; |
| | |
| | | end; |
| | | FitPreViewISB; |
| | | end |
| | | Else if (FormID <> '') {and (FormID <> 'Attach')} then //Åã¥Ü«ü©wFormIDªº¼v¹³ |
| | | Else if (FormID <> '') {and (FormID <> 'Attach')} then //顯示指定FormID的影像 |
| | | begin |
| | | If (TreeView1.Selected <> nil) Then |
| | | begin |
| | |
| | | FitPreViewISB; |
| | | end; |
| | | end; |
| | | {Else if (DocNo = 'Attach') and (FormID = 'Attach') then //ªþ¥ó¶Ç Attach |
| | | {Else if (DocNo = 'Attach') and (FormID = 'Attach') then //附件傳 Attach |
| | | begin |
| | | If (TreeView1.Selected <> nil) Then |
| | | begin |
| | |
| | | DataLoading(False,False); |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.ShapeName2PreViewISBName(SP:TShape):String; //Âà¥X«ü©wPreViewISBName |
| | | Function TCB_IMGPSScanX.ShapeName2PreViewISBName(SP:TShape):String; //轉出指定PreViewISBName |
| | | begin |
| | | Result := ISBName+Copy(SP.Name,3,length(SP.Name)-2); |
| | | end; |
| | |
| | | |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.PaintShape(FromImg,ToImg:TImageScrollBox); //µe¦³³Q¿ï¨úªº¼v¹³ |
| | | Procedure TCB_IMGPSScanX.PaintShape(FromImg,ToImg:TImageScrollBox); //畫有被選取的影像 |
| | | var |
| | | i,F_No,T_No : Integer; |
| | | SP : TShape; |
| | |
| | | Result := strtoint(Copy(iISB.Name,length(ISBName)+1,length(iISB.Name)-length(ISBName))); //'PreViewISB' |
| | | end; |
| | | begin |
| | | IF ToImg = nil Then //¥uµe³æ¤@Ó |
| | | IF ToImg = nil Then //只畫單一個 |
| | | begin |
| | | ISB := TImageScrollBox(FindComponent(ISBName+inttostr(GetImgNo(FromImg)))); |
| | | if TShape(FindComponent('SP'+inttostr(GetImgNo(FromImg)))) = nil then |
| | |
| | | var |
| | | i : Integer; |
| | | begin |
| | | IF SelectISB = nil then //¥þFree; |
| | | IF SelectISB = nil then //全Free; |
| | | begin |
| | | For i:= ComponentCount -1 downto 0 do |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | end |
| | | Else //¥uFree«ü©wªº |
| | | Else //只Free指定的 |
| | | begin |
| | | TShape(FindComponent('SP'+Copy(SelectISB.Name,length(ISBName)+1,length(SelectISB.Name)-length(ISBName)))).Free; |
| | | end; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetCaseFormID(Path:String):String; //¨ú®×¥óªº¥DFormID |
| | | Function TCB_IMGPSScanX.GetCaseFormID(Path:String):String; //取案件的主FormID |
| | | var i,n : Integer; |
| | | FileFormID : String; |
| | | begin |
| | |
| | | for I := 0 to ContextList.Count - 1 do |
| | | begin |
| | | FileFormID := FileName2FormCode(ContextList.Strings[i]); |
| | | |
| | | if DivPageFormIDList.IndexOf(FileFormID)<>-1 then //20170509 跳過分案頁的formid |
| | | begin |
| | | Continue; |
| | | end; |
| | | if FindDivFormCode(FileFormID) then |
| | | begin |
| | | Result := FileFormID; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.CreateFormID_FormName(Path,CaseID:String); //²£¥ÍFormID_FormName.dat |
| | | Procedure TCB_IMGPSScanX.CreateFormID_FormName(Path,CaseID:String); //產生FormID_FormName.dat |
| | | var i : Integer; |
| | | S : TStringlist; |
| | | FormID : String; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.CreateDocNo_DocName(Path,CaseID:String); //²£¥ÍDocNo_DocName.dat |
| | | Procedure TCB_IMGPSScanX.CreateDocNo_DocName(Path,CaseID:String); //產生DocNo_DocName.dat |
| | | var |
| | | i : Integer; |
| | | S : TStringlist; |
| | |
| | | for i := 0 to CaseDocNoList.Count - 1 do |
| | | begin |
| | | Doc_Name := CaseDocNoList.Strings[i]+'_'+DocNo2DocName(CaseID,CaseDocNoList.Strings[i]); |
| | | if not DocnoNeedGroup(CaseDocNoList.Strings[i]) Then //¤£¥Î¤À²Õªº¥[*¸¹µ¹´¼»¨ |
| | | if not DocnoNeedGroup(CaseDocNoList.Strings[i]) Then //不用分組的加*號給智豪 |
| | | Doc_Name := '*'+Doc_Name; |
| | | S.Add(Doc_Name); |
| | | end; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.CreateIn_WH(CaseID:String); //²£¥ÍIn_WH.dat |
| | | Procedure TCB_IMGPSScanX.CreateIn_WH(CaseID:String); //產生In_WH.dat |
| | | var |
| | | i,n : Integer; |
| | | DocDirList,In_WH_List : TStringlist; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CreateDocNo_Info(CaseID:String):String; //²£¥Í DocNo[tab]¥÷¼Æ[tab]Á`¶¼Æ[tab]¬O§_²§°Ê[´«¦æ]DocNo[tab]¥÷¼Æ[tab]Á`¶¼Æ[tab]¬O§_²§°Ê |
| | | Function TCB_IMGPSScanX.CreateDocNo_Info(CaseID:String):String; //產生 DocNo[tab]份數[tab]總頁數[tab]是否異動[換行]DocNo[tab]份數[tab]總頁數[tab]是否異動 |
| | | var |
| | | i,n : Integer; |
| | | DocDirList,DocDir_CopiesList,FileList,C_DocNoList : TStringlist; |
| | |
| | | try |
| | | Str := ''; |
| | | if Not FileExists(ImageSavePath+CaseID+'\CaseDocNo.dat') then Exit; |
| | | |
| | | DocDirList.LoadFromFile(ImageSavePath+CaseID+'\CaseDocNo.dat'); |
| | | |
| | | if DocDirList.Count =0 then exit;//20170222 新加 |
| | | |
| | | |
| | | DocDir_CopiesList.LoadFromFile(ImageSavePath+CaseID+'\CaseDocNo_Copies.dat'); |
| | | while DocDirList.Count > 0 do |
| | | begin |
| | | iDocDir := DocDirList.Strings[0]; |
| | | DocNo := DocNoDir2DocNo(iDocDir); |
| | | if Copy(iDocDir,1,5) <> 'ZZZZZ' then //¤£¬°¦Û©w¤å¥ó |
| | | if Copy(iDocDir,1,5) <> 'ZZZZZ' then //不為自定文件 |
| | | begin |
| | | //icopys := 1; |
| | | icopys := GetDocNoCount(CaseID,DocNo); |
| | |
| | | end; } |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CreateCustDocNo_Info(CaseID:String):String; //²£¥Í¦Ûq¤å¥ó DocName[tab]¥÷¼Æ[tab]Á`¶¼Æ[tab]¬O§_²§°Ê[#13#10]DocName[tab]¥÷¼Æ[tab]Á`¶¼Æ[tab]¬O§_²§°Ê |
| | | Function TCB_IMGPSScanX.CreateCustDocNo_Info(CaseID:String):String; //產生自訂文件 DocName[tab]份數[tab]總頁數[tab]是否異動[#13#10]DocName[tab]份數[tab]總頁數[tab]是否異動 |
| | | var |
| | | i,n : Integer; |
| | | DocDirList,FileList : TStringlist; |
| | |
| | | Str := ''; |
| | | if Not FileExists(ImageSavePath+CaseID+'\CaseDocNo.dat') then Exit; |
| | | DocDirList.LoadFromFile(ImageSavePath+CaseID+'\CaseDocNo.dat'); |
| | | //ShowMessage(DocDirList.Text); |
| | | while DocDirList.Count > 0 do |
| | | begin |
| | | iDocDir := DocDirList.Strings[0]; |
| | | DocNo := DocNoDir2DocNo(iDocDir); |
| | | if Copy(iDocDir,1,5) = 'ZZZZZ' then //¬O¦Û©w¤å¥ó |
| | | if Copy(iDocDir,1,5) = 'ZZZZZ' then //是自定文件 |
| | | begin |
| | | //icopys := 1; |
| | | DocName := GetCustomDocName(ImageSavePath+CaseID+'\',DocNo); |
| | |
| | | Result := Str; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CreateDocnoFrom_Info(CaseID:String):String; //²£¥Í³Q¤Þ¶iªº«OºÞ³U¤å¥ó¸ê°T Docno[tab]¥÷¼Æ[tab]®×¥ó½s¸¹#13#10Docno[tab]¥÷¼Æ[tab]®×¥ó½s¸¹ |
| | | Function TCB_IMGPSScanX.CreateDocnoFrom_Info(CaseID:String):String; //產生被引進的保管袋文件資訊 Docno[tab]份數[tab]案件編號#13#10Docno[tab]份數[tab]案件編號 |
| | | var |
| | | i,n : Integer; |
| | | DocDirList,DocDir_CopiesList,FileList : TStringlist; |
| | |
| | | Str := ''; |
| | | if Not FileExists(ImageSavePath+CaseID+'\CaseDocNo.dat') then Exit; |
| | | DocDirList.LoadFromFile(ImageSavePath+CaseID+'\CaseDocNo.dat'); |
| | | |
| | | if DocDirList.Count=0 then exit;//20170222 新加 |
| | | |
| | | |
| | | DocDir_CopiesList.LoadFromFile(ImageSavePath+CaseID+'\CaseDocNo_Copies.dat'); |
| | | while DocDirList.Count > 0 do |
| | | begin |
| | | iDocDir := DocDirList.Strings[0]; |
| | | DocNo := DocNoDir2DocNo(iDocDir); |
| | | if (Copy(iDocDir,1,5) <> 'ZZZZZ') then //¤£¬°¦Û©w¤å¥ó |
| | | if (Copy(iDocDir,1,5) <> 'ZZZZZ') then //不為自定文件 |
| | | begin |
| | | //icopys := 1; |
| | | //icopys := GetDocNoCount(CaseID,DocNo); |
| | |
| | | Result := Str; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CreateCustDocNoFrom_Info(CaseID:String):String; //²£¥Í³Q¤Þ¶iªº¦Û©w¤å¥ó¸ê°T Docno[tab]¥÷¼Æ[tab]®×¥ó½s¸¹#13#10Docno[tab]¥÷¼Æ[tab]®×¥ó½s¸¹ |
| | | Function TCB_IMGPSScanX.CreateCustDocNoFrom_Info(CaseID:String):String; //產生被引進的自定文件資訊 Docno[tab]份數[tab]案件編號#13#10Docno[tab]份數[tab]案件編號 |
| | | var |
| | | i,n : Integer; |
| | | DocDirList,FileList : TStringlist; |
| | |
| | | begin |
| | | iDocDir := DocDirList.Strings[0]; |
| | | DocNo := DocNoDir2DocNo(iDocDir); |
| | | if Copy(iDocDir,1,5) = 'ZZZZZ' then //¬O¦Û©w¤å¥ó |
| | | if Copy(iDocDir,1,5) = 'ZZZZZ' then //是自定文件 |
| | | begin |
| | | //icopys := 1; |
| | | //icopys := GetDocNoCount(CaseID,DocNo); |
| | |
| | | Result := Str; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CreateAttach_Info(CaseID:String):String; //²£¥Í¬O§_¦³Attach Y:¦³ N:¨S¦³ |
| | | Function TCB_IMGPSScanX.CreateAttach_Info(CaseID:String):String; //產生是否有Attach Y:有 N:沒有 |
| | | begin |
| | | Result := 'N'; |
| | | if GetDocDir_Page(CaseID,AttName) > 0 Then |
| | | Result := 'Y'; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetDocNoEdit(CaseID,DocNo,DocName:String):String; //¨ú¥XDocNo¬O§_³Q²§°Ê (Y/N) |
| | | Function TCB_IMGPSScanX.GetDocNoEdit(CaseID,DocNo,DocName:String):String; //取出DocNo是否被異動 (Y/N) |
| | | var |
| | | i : Integer; |
| | | EditedDocDirList : TStringlist; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetDocNo_Count(Path,DocNo:String):Integer; //¨ú¥X¤å¥ó¥÷¼Æ |
| | | Function TCB_IMGPSScanX.GetDocNo_Count(Path,DocNo:String):Integer; //取出文件份數 |
| | | var |
| | | i : Integer; |
| | | iCopys : integer; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetDocNo_Page(Path,DocNo:String):Integer; //¨ú¥X¤å¥óÁ`¶¼Æ |
| | | Function TCB_IMGPSScanX.GetDocNo_Page(Path,DocNo:String):Integer; //取出文件總頁數 |
| | | var |
| | | i : Integer; |
| | | ipages : integer; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.FormIDExists(FormCode:String;CheckDate:Boolean;index:Integer):Boolean; //ÀˬdFormID¬O§_¦s¦b |
| | | Function TCB_IMGPSScanX.FormIDExists(FormCode:String;CheckDate:Boolean;index:Integer):Boolean; //檢查FormID是否存在 |
| | | var |
| | | STDate,SPDate : String; |
| | | Docno,Version : String; |
| | | begin |
| | | Result := False; |
| | | If FormCode = '' then //ªþ¥ó¤£Àˬd |
| | | If FormCode = '' then //附件不檢查 |
| | | begin |
| | | Result := True; |
| | | Exit; |
| | | end; |
| | | if CheckDate then //nÀˬd¤é´Á |
| | | if CheckDate then //要檢查日期 |
| | | begin |
| | | STDate := '00000000'; //¨S³]©w |
| | | SPDate := '99999999'; //¨S³]©w |
| | | STDate := '00000000'; //沒設定 |
| | | SPDate := '99999999'; //沒設定 |
| | | |
| | | IF FindSQLData(FORM_INF_List,'T1.FORM_ID,T1.DOC_NO','T1.FORM_ID',FormCode,index,FindResult) then |
| | | begin |
| | |
| | | Result := True; |
| | | STDate := GetFindResult('START_DATE'); |
| | | SPDate := GetFindResult('STOP_DATE'); |
| | | if STDate = '' then STDate := '00000000'; //¨S³]©w |
| | | if SPDate = '' then SPDate := '99999999'; //¨S³]©w |
| | | if STDate = '' then STDate := '00000000'; //沒設定 |
| | | if SPDate = '' then SPDate := '99999999'; //沒設定 |
| | | if (ServerDate < STDate) or (ServerDate > SPDate) then |
| | | Result := False; |
| | | end; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.Case_DocNoExists(CaseID,Docno:String):Boolean; //Docno¬O§_¦s¦b®×¥ó¸Ì |
| | | Function TCB_IMGPSScanX.Case_DocNoExists(CaseID,Docno:String):Boolean; //Docno是否存在案件裡 |
| | | var |
| | | i : Integer; |
| | | S : TStringlist; |
| | |
| | | TwainShowUI := CB1.Checked; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.ReSortFileName(Path:String); //ÀɦW«·s±Æ§Ç |
| | | Procedure TCB_IMGPSScanX.ReSortFileName(Path:String); //檔名重新排序 |
| | | var |
| | | i : Integer; |
| | | OldName,NewName : String; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.ReSortFileName_New(Path:String); //ÀɦW«·s±Æ§Ç |
| | | Procedure TCB_IMGPSScanX.ReSortFileName_New(Path:String); //檔名重新排序 |
| | | var |
| | | i : Integer; |
| | | OldName,NewName : String; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.ReSortFileName2Scanlist(Path:String); //ÀɦW«·s±Æ§Çµ¹Scanlist.dat |
| | | Procedure TCB_IMGPSScanX.ReSortFileName2Scanlist(Path:String); //檔名重新排序給Scanlist.dat |
| | | var |
| | | i : Integer; |
| | | OldName,NewName : String; |
| | |
| | | end; |
| | | |
| | | |
| | | Function TCB_IMGPSScanX.GetOMRCheckSet : Boolean; //¤U¸üOMRÀË®ÖXMLÀÉ |
| | | Function TCB_IMGPSScanX.GetOMRCheckSet : Boolean; //下載OMR檢核XML檔 |
| | | var |
| | | SendData : String; |
| | | LastDateTime : String; |
| | |
| | | SendData := 'settype=3&lastupdate='+LastDateTime; |
| | | if not dnFile_Get(HTTPSClient,Furl,'service/imgpsc/IMGPSC01/settings',SendData,CheckXmlPath+'OMRSet.zip',FReWrite,Memo1,False,DownImgStatus) then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | if FileExists(CheckXmlPath+'OMRSet.zip') then //¦³§ó·s |
| | | if FileExists(CheckXmlPath+'OMRSet.zip') then //有更新 |
| | | begin |
| | | ExecuteUnZip(CheckXmlPath+'OMRSet.zip',CheckXmlPath,False); |
| | | S.Clear; |
| | |
| | | end |
| | | Else |
| | | begin |
| | | if (Memo1.Lines.Strings[0] = 'nodata') Then //¨S§ó·s |
| | | if (Memo1.Lines.Strings[0] = 'nodata') Then //沒更新 |
| | | begin |
| | | Result := True; |
| | | end |
| | | Else if (Memo1.Lines.Strings[0] = '1') Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]; |
| | | HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | | Result := False; |
| | | Exit; |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J'); |
| | | HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | |
| | | |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.GetKeyinSet : Boolean; //¨úµn¥´³]©w |
| | | Function TCB_IMGPSScanX.GetKeyinSet : Boolean; //取登打設定 |
| | | var |
| | | SendData : String; |
| | | LastDateTime : String; |
| | |
| | | SendData := 'settype=2&lastupdate='+LastDateTime; |
| | | if not dnFile_Get(HTTPSClient,Furl,'service/imgpsc/IMGPSC01/settings',SendData,SitePath+'KeyinSet.zip',FReWrite,Memo1,False,DownImgStatus) then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | if FileExists(SitePath+'KeyinSet.zip') then //¦³§ó·s |
| | | if FileExists(SitePath+'KeyinSet.zip') then //有更新 |
| | | begin |
| | | ExecuteUnZip(SitePath+'KeyinSet.zip',SitePath,False); |
| | | S.Clear; |
| | |
| | | end |
| | | Else |
| | | begin |
| | | if (Memo1.Lines.Strings[0] = 'nodata') Then //¨S§ó·s |
| | | if (Memo1.Lines.Strings[0] = 'nodata') Then //沒更新 |
| | | begin |
| | | Result := True; |
| | | end |
| | | Else if (Memo1.Lines.Strings[0] = '1') Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]; |
| | | HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | | Result := False; |
| | | Exit; |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+_Msg('¶¢¸m¹L¤[©Î³Qµn¥X,½Ð«·sµn¤J'); |
| | | HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | |
| | | var |
| | | SendData : String; |
| | | begin |
| | | //Memo1.Clear; |
| | | SendData := 'data='+HTTPEncode(UTF8Encode(FData))+'&verify='+FVerify+'&case_no='+CaseID+'&work_no='+FWork_no; |
| | | if (FMode = 'NSCAN') then |
| | | if (FMode = 'NSCAN') or (FMode = 'DSCAN') then |
| | | begin |
| | | //ShowMessage('JJJJJ'); |
| | | If not ProcessServlet_Get(HTTPSClient,FURL+'service/imgpsc/IMGPSC05/isnew',SendData,FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := -1; |
| | | Exit; |
| | | end; |
| | | end; |
| | | |
| | | //ShowMessage(SendData); |
| | | //ShowMessage(Memo1.Lines.Text); |
| | | IF memo1.Lines.Strings[0] <> '0' Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+memo1.Lines.Strings[1]; |
| | | HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | | Result := -1; |
| | | Exit; |
| | | end |
| | |
| | | begin |
| | | if (memo1.Lines.Count < 2) then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+'OCX:Index Count error'; |
| | | HttpErrStr := _Msg('錯誤原因:')+'OCX:Index Count error'; |
| | | Result := -1; |
| | | Exit; |
| | | end |
| | |
| | | Result := 1 |
| | | Else |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+'OCX:Value error'; |
| | | HttpErrStr := _Msg('錯誤原因:')+'OCX:Value error'; |
| | | Result := -1; |
| | | Exit; |
| | | end; |
| | |
| | | end; |
| | | end; |
| | | |
| | | Function TCB_IMGPSScanX.CaseComplete(Path,CaseID:String;MainCase:Boolean):Boolean; //³qª¾¶Ç°e§¹¦¨ |
| | | Function TCB_IMGPSScanX.CaseComplete(Path,CaseID:String;MainCase:Boolean):Boolean; //通知傳送完成 |
| | | var |
| | | OMRValue,Batchnum,Usermemo,Checkmemo,UpformID,ReMoveMemo: String; |
| | | Case_type,Handle_no,Format_id,Cen_Uid,Cen_Cliname,Cen_Platno,Cen_Apolyno,Case_priority : String; |
| | |
| | | |
| | | |
| | | Case_type := '0'; |
| | | if FileExists(Path+'Context.dat') then //±½´y¶¼Æ |
| | | if FileExists(Path+'Context.dat') then //掃描頁數 |
| | | begin |
| | | S.LoadFromFile(Path+'Context.dat'); |
| | | Pages := S.Count; |
| | | end; |
| | | if not FileExists(ImageSavePath+CaseID+'\CaseIndex.dat') then //¦pªG¨S³oÓÀÉ´N«²£¥Í¹w³]È |
| | | if not FileExists(ImageSavePath+CaseID+'\CaseIndex.dat') then //如果沒這個檔就重產生預設值 |
| | | begin |
| | | ClearCaseIndex; |
| | | WriteCaseIndex(ImageSavePath+CaseID+'\'); |
| | |
| | | begin |
| | | S.LoadFromFile(ImageSavePath+CaseID+'\CaseIndex.dat'); |
| | | |
| | | Handle_No := S.Strings[0]; //¸g¿ì¥N¸¹ |
| | | Cen_Uid := S.Strings[1]; //³Q«O¤HID |
| | | Cen_Cliname := S.Strings[2]; //³Q«O¤H©m¦W |
| | | Cen_Platno := S.Strings[3]; //¨®¸¹ |
| | | Case_Priority := S.Strings[4];//®×¥óµ¥¯Å |
| | | if FMode = 'SSCAN' then //ñ¸p³¹¥óªº®ÉÔ¤@«ß¶ÇFormat_ID |
| | | Handle_No := S.Strings[0]; //經辦代號 |
| | | Cen_Uid := S.Strings[1]; //被保人ID |
| | | Cen_Cliname := S.Strings[2]; //被保人姓名 |
| | | Cen_Platno := S.Strings[3]; //車號 |
| | | Case_Priority := S.Strings[4];//案件等級 |
| | | if FMode = 'SSCAN' then //簽署章件的時候一律傳Format_ID |
| | | begin |
| | | Format_ID := S.Strings[5]; //¥DÁäÈ (³ø»ù³æ¸¹orÄò«O³æ¸¹or«O³æ¸¹½Xor«OÀIÃÒ¸¹) |
| | | Format_ID := S.Strings[5]; //主鍵值 (報價單號or續保單號or保單號碼or保險證號) |
| | | end |
| | | Else |
| | | begin |
| | | if (Length(UpformID) = 12) and (UpformID[2] = '-') then |
| | | Format_ID := S.Strings[5] //¥DÁäÈ (³ø»ù³æ¸¹orÄò«O³æ¸¹or«O³æ¸¹½Xor«OÀIÃÒ¸¹) |
| | | Format_ID := S.Strings[5] //主鍵值 (報價單號or續保單號or保單號碼or保險證號) |
| | | else |
| | | Cen_Apolyno := S.Strings[5]; //±j¨îÃÒ¸¹ |
| | | Cen_Apolyno := S.Strings[5]; //強制證號 |
| | | end; |
| | | if (FMode = 'MSCAN') and (length(Format_ID) = 16) and (Copy(Format_ID,1,2) = '05') then |
| | | begin |
| | | Format_ID := Copy(Format_ID,3,14); //20130606 yuu»¡ºÊ²z¯¸¥óªº¥DÁäȬ°16½X¥B¶}¶}¬°05ªºn¥h±¼ |
| | | Format_ID := Copy(Format_ID,3,14); //20130606 yuu說監理站件的主鍵值為16碼且開開為05的要去掉 |
| | | end; |
| | | |
| | | end; } |
| | | if FileExists(ImageSavePath+CaseID+'\GetValue.xml') then //±½´y±aÈ |
| | | if FileExists(ImageSavePath+CaseID+'\GetValue.xml') then //掃描帶值 |
| | | begin |
| | | S.LoadFromFile(ImageSavePath+CaseID+'\GetValue.xml'); |
| | | OMRValue := Trim(S.Text); |
| | | end; |
| | | if MainCase then //Âù¥D¬ùªº¥Dn®×¥ó |
| | | if MainCase then //雙主約的主要案件 |
| | | begin |
| | | if FileExists(ImageSavePath+CaseID+'\Batchnum.dat') then |
| | | begin |
| | |
| | | Batchnum := Trim(S.Text); |
| | | end; |
| | | end |
| | | Else //Âù¥D¬ùªº²Ä¤G®×¥ó |
| | | Else //雙主約的第二案件 |
| | | begin |
| | | if FileExists(ImageSavePath+CaseID+'\SecBatchnum.dat') then |
| | | begin |
| | |
| | | if (FMode = 'NSCAN') or (FMode = 'ASCAN') or (FMode = 'DSCAN') or (FMode = 'SSCAN') or (FMode = 'MSCAN') or (FMode = 'RI_SCAN') then |
| | | begin |
| | | SendData := 'checktime='+EnCodeDateTime |
| | | +'&work_no='+FWork_No //§@·~§O |
| | | +'&case_id='+CaseID //¨ü²z½s¸¹ |
| | | +'&form_id='+UpformID //ªí³æ¥N¸¹ |
| | | +'&scan_page='+inttostr(pages) //±½´y¶¼Æ |
| | | +'&scan_get_value='+HTTPEncode(UTF8Encode(OMRValue)) //±½´y±aÈ |
| | | +'&case_priority='+case_priority //®×¥óµ¥¯Å |
| | | +'&batch_no='+batchnum //¨®¶¤§å¸¹ |
| | | +'&user_memo='+HTTPEncode(UTF8Encode(usermemo)) //¨Ï¥ÎªÌµù°O |
| | | +'&check_memo='+HTTPEncode(UTF8Encode(checkmemo)) //Àˮֵù°O |
| | | +'&remove_memo='+HTTPEncode(UTF8Encode(ReMoveMemo)) //Àˮֲ¾°£µù°O |
| | | +'&case_type='+Case_type //¶i¥óºØÃþ ¶i¥ó0 ÂkÀÉ1 |
| | | +'&handle_no='+Handle_no //¸g¿ì¥N¸¹ |
| | | +'&format_id='+Format_id //®×¥ó¥DÁäÈ |
| | | +'&cen_uid='+Cen_Uid //³Q«O¤HID |
| | | +'&cen_cliname='+HTTPEncode(UTF8Encode(Cen_Cliname)) //³Q«O¤H©m¦W |
| | | +'&cen_platno='+Cen_Platno //¨®µP |
| | | +'&cen_apolyno='+Cen_Apolyno //±j¨îÃÒ¸¹ |
| | | +'&has_authorize='+Has_Authorize; //¬O§_¦³±ÂÅv®Ñ¼v¹³ |
| | | +'&work_no='+FWork_No //作業別 |
| | | +'&case_id='+CaseID //受理編號 |
| | | +'&form_id='+UpformID //表單代號 |
| | | +'&scan_page='+inttostr(pages) //掃描頁數 |
| | | +'&scan_get_value='+HTTPEncode(UTF8Encode(OMRValue)) //掃描帶值 |
| | | +'&case_priority='+case_priority //案件等級 |
| | | +'&batch_no='+batchnum //車隊批號 |
| | | +'&user_memo='+HTTPEncode(UTF8Encode(usermemo)) //使用者註記 |
| | | +'&check_memo='+HTTPEncode(UTF8Encode(checkmemo)) //檢核註記 |
| | | +'&remove_memo='+HTTPEncode(UTF8Encode(ReMoveMemo)) //檢核移除註記 |
| | | +'&case_type='+Case_type //進件種類 進件0 歸檔1 |
| | | +'&handle_no='+Handle_no //經辦代號 |
| | | +'&format_id='+Format_id //案件主鍵值 |
| | | +'&cen_uid='+Cen_Uid //被保人ID |
| | | +'&cen_cliname='+HTTPEncode(UTF8Encode(Cen_Cliname)) //被保人姓名 |
| | | +'&cen_platno='+Cen_Platno //車牌 |
| | | +'&cen_apolyno='+Cen_Apolyno //強制證號 |
| | | +'&has_authorize='+Has_Authorize; //是否有授權書影像 |
| | | Showmessage(SendData); |
| | | if not RejectCase then |
| | | begin |
| | | If not ProcessServlet(HTTPSClient,FURL+'servlet/CWC05',SendData,FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | |
| | | begin |
| | | If not ProcessServlet(HTTPSClient,FURL+'servlet/CWC06',SendData,FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | |
| | | +'&user_memo='+HTTPEncode(UTF8Encode(usermemo)) |
| | | +'&check_memo='+HTTPEncode(UTF8Encode(checkmemo)) |
| | | +'&remove_memo='+HTTPEncode(UTF8Encode(ReMoveMemo)) |
| | | +'&has_authorize='+Has_Authorize; //¬O§_¦³±ÂÅv®Ñ¼v¹³ |
| | | +'&has_authorize='+Has_Authorize; //是否有授權書影像 |
| | | //Showmessage(SendData); |
| | | If not ProcessServlet(HTTPSClient,FURL+'servlet/CWC08',SendData,FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | |
| | | +'&user_memo='+HTTPEncode(UTF8Encode(usermemo)) |
| | | +'&check_memo='+HTTPEncode(UTF8Encode(checkmemo)) |
| | | +'&remove_memo='+HTTPEncode(UTF8Encode(ReMoveMemo)) |
| | | +'&has_authorize='+Has_Authorize; //¬O§_¦³±ÂÅv®Ñ¼v¹³ |
| | | +'&has_authorize='+Has_Authorize; //是否有授權書影像 |
| | | If not ProcessServlet(HTTPSClient,FURL+'servlet/CWC09',SendData,FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | |
| | | +'&usermemo='+HTTPEncode(UTF8Encode(usermemo)) |
| | | +'&checkmemo='+HTTPEncode(UTF8Encode(checkmemo)) |
| | | +'&removememo='+HTTPEncode(UTF8Encode(ReMoveMemo)) |
| | | +'&has_authorize='+Has_Authorize; //¬O§_¦³±ÂÅv®Ñ¼v¹³ |
| | | +'&has_authorize='+Has_Authorize; //是否有授權書影像 |
| | | If not ProcessServlet(HTTPSClient,FURL+'servlet/CWC01',SendData,FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | |
| | | +'&usermemo='+HTTPEncode(UTF8Encode(usermemo)) |
| | | +'&checkmemo='+HTTPEncode(UTF8Encode(checkmemo)) |
| | | +'&removememo='+HTTPEncode(UTF8Encode(ReMoveMemo)) |
| | | +'&has_authorize='+Has_Authorize; //¬O§_¦³±ÂÅv®Ñ¼v¹³ |
| | | +'&has_authorize='+Has_Authorize; //是否有授權書影像 |
| | | If not ProcessServlet(HTTPSClient,FURL+'servlet/CWC01',SendData,FReWrite,Memo1,False) Then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~¥N½X:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | HttpErrStr := _Msg('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | |
| | | |
| | | if Memo1.Lines.Strings[0] <> '0'then |
| | | begin |
| | | HttpErrStr := _Msg('¿ù»~ì¦]:')+Memo1.Lines.Strings[1]; |
| | | HttpErrStr := _Msg('錯誤原因:')+Memo1.Lines.Strings[1]; |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | |
| | | //self.FIs_OldCase := 'Y'; |
| | | PageLVclear := True; |
| | | InitialOk := False; |
| | | |
| | | //FMode := 'DSCAN' ; |
| | | //FIs_In_Wh := 'Y'; |
| | | if FIs_In_Wh = 'Y' then |
| | | AttName := 'Attach' //¤J®wªþ¥ó |
| | | AttName := 'Attach' //入庫附件 |
| | | else |
| | | AttName := 'S_Attach'; //Smartlending ªþ¥ó |
| | | AttName := 'S_Attach'; //Smartlending 附件 |
| | | //ShowMessage('1111111'); |
| | | if FMode = 'SAMPLESCAN' then |
| | | begin |
| | |
| | | SampleScanBtn.Visible := True; |
| | | Panel1.Visible := True; |
| | | Panel6.Visible := True; |
| | | ScanDuplexCB.Visible := False; //Âù±±½´y |
| | | ScanDuplexCB.Visible := False; //雙面掃描 |
| | | end |
| | | Else if (FMode = 'NSCAN') then |
| | | begin |
| | |
| | | Panel6.Visible := True; |
| | | Panel21.Visible := True; |
| | | Panel23.Visible := True; |
| | | ScanDuplexCB.Visible := True; //Âù±±½´y |
| | | ScanDuplexCB.Visible := True; //雙面掃描 |
| | | end |
| | | Else if FMode = 'FSCAN' then |
| | | begin |
| | |
| | | DisplayMode(1,1,1,Panel9); |
| | | Application.ProcessMessages; |
| | | StatusBar1.Panels[0].Text := 'Ver'+GetCurrentVersionNo; |
| | | StatusBar1.Panels[1].Text := _Msg('µn¤J¤Hû:')+FUserName; |
| | | StatusBar1.Panels[1].Text := _Msg('登入人員:')+FUserName; |
| | | if FPrintyn = 'Y' then |
| | | PrtLB.Visible := True; |
| | | |
| | | initParameter; //20170222 針對新加的parameter 作初始化參數 |
| | | InitScrollRec; |
| | | If FUrl = '' then |
| | | begin |
| | | Showmessage(_Msg('URL¤£¯à¬°ªÅ¥Õ,½Ð¬¢¸ßµ{¦¡¤Hû')); |
| | | Showmessage(_Msg('URL不能為空白,請洽詢程式人員')); |
| | | Exit; |
| | | end; |
| | | if FUrl[length(FUrl)]<>'/' then |
| | | FUrl := FUrl + '/'; |
| | | //********²M³æ°Ï******** |
| | | |
| | | Doc_Inf_List := TStringList.Create; //Doc_Inf ²M³æ Docno + ª©¥»¬°key |
| | | DM_FORM_INF_List := TStringList.Create; //DM_FORM_INF ²M³æ Docno + ª©¥»¬°key |
| | | FORM_INF_List := TStringList.Create; //FORM_INFªº²M³æ |
| | | CHECK_RULE_INF_List := TStringList.Create; //CHECK_RULE_INF ²M³æ |
| | | MEMO_INF_List := TStringList.Create; //MEMO_INF ²M³æ |
| | | WORK_INF_List := TStringList.Create; //WORK_INF ²M³æ |
| | | LASTEST_FORM_INF_List := TStringList.Create; // LASTEST_FORM_INF ²M³æ |
| | | FindResult := TStringlist.Create; //§äSQLDataªºµ²ªG |
| | | if FWork_no='' then |
| | | begin |
| | | Showmessage(_Msg('業務別不能為空白,請洽詢程式人員')); |
| | | Exit; |
| | | end; |
| | | |
| | | OMRFileList := TStringList.Create; //nOMRÀˮ֪º¤å¥ó(¥uÀˬd¨CºØFormªº²Ä¤@¶) |
| | | FormCode_PageSize := TStringList.Create; //¤å¥óªº¹w³]¤j¤p FormCode_Height_Width |
| | | DocNo_NeedDoc := TStringList.Create; //¦³Docno®Én¬Û¨Ìªº¤å¥ó DocNo_¬Û¨Ì¤å¥ó_¬Û¨Ì¤å¥ó |
| | | DocNo_NoDoc := TStringList.Create; //¦³Docno®É¤¬¥¸ªº¤å¥ó DocNo_¤¬¥¸¤å¥ó_¤¬¥¸¤å¥ó |
| | | DocNo_VerinCase := TStringList.Create; //®×¥ó¸ÌªºDocNo+ª©¥»ªº²M³æ |
| | | CaseDocNoList := TStringlist.Create; //®×¥ó¸ÌªºDocNo²M³æ |
| | | CaseDocNo_CopiesList := TStringlist.Create; //®×¥ó¸ÌªºDocNo¥÷¼Æ²M³æ |
| | | CaseList := TStringList.Create; //°O¿ý±½ºË®×¥óªº¶¶§Ç |
| | | Context_DocnoList := TStringlist.Create; //®×¥ó¸ÌªºÀÉ®×Docno²M³æ |
| | | ContextList := TStringlist.Create; //®×¥ó¸ÌªºÀɮײM³æ |
| | | NoSaveBarCodeList := TStringlist.Create; //¤£Àx¦sªº±ø½X²M³æ |
| | | FormID_List := TStringlist.Create; //FormID²M³æ |
| | | DocNo_List := TStringlist.Create; //DocNo²M³æ |
| | | NowShowFileList := TStringlist.Create; //¥Ø«eÅã¥Üªº¼v¹³²M³æ |
| | | NowSelectFileList := TStringlist.Create; //¥Ø«e³QÂI¿ïªº¼v¹³²M³æ |
| | | Cust_DocNoList := TStringlist.Create; //¦Û¦æ©w¸qªº¤å¥ó¦WºÙ |
| | | IN_WH_DocNoList := TStringlist.Create; //¤J®wªº¤å¥ó²M³æ |
| | | GuideFormIDList := TStringlist.Create; //n·í¾É¤Þ¶ªí³æ²M³æ |
| | | //********²M³æ°Ï******** |
| | | if CaseIDLength = 0 then |
| | | begin |
| | | Showmessage(_Msg('案件編號長度限制不能為空白,請洽詢程式人員')); |
| | | //Exit; //測試時不退出 |
| | | end; |
| | | |
| | | ShowText := _Msg('¸ê®Æ¸ü¤J¤¤,½ÐµyÔ'); |
| | | //********清單區******** |
| | | |
| | | Doc_Inf_List := TStringList.Create; //Doc_Inf 清單 Docno + 版本為key |
| | | DM_FORM_INF_List := TStringList.Create; //DM_FORM_INF 清單 Docno + 版本為key |
| | | FORM_INF_List := TStringList.Create; //FORM_INF的清單 |
| | | CHECK_RULE_INF_List := TStringList.Create; //CHECK_RULE_INF 清單 |
| | | MEMO_INF_List := TStringList.Create; //MEMO_INF 清單 |
| | | WORK_INF_List := TStringList.Create; //WORK_INF 清單 |
| | | LASTEST_FORM_INF_List := TStringList.Create; // LASTEST_FORM_INF 清單 |
| | | FindResult := TStringlist.Create; //找SQLData的結果 |
| | | |
| | | OMRFileList := TStringList.Create; //要OMR檢核的文件(只檢查每種Form的第一頁) |
| | | FormCode_PageSize := TStringList.Create; //文件的預設大小 FormCode_Height_Width |
| | | DocNo_NeedDoc := TStringList.Create; //有Docno時要相依的文件 DocNo_相依文件_相依文件 |
| | | DocNo_NoDoc := TStringList.Create; //有Docno時互斥的文件 DocNo_互斥文件_互斥文件 |
| | | DocNo_VerinCase := TStringList.Create; //案件裡的DocNo+版本的清單 |
| | | CaseDocNoList := TStringlist.Create; //案件裡的DocNo清單 |
| | | CaseDocNo_CopiesList := TStringlist.Create; //案件裡的DocNo份數清單 |
| | | CaseList := TStringList.Create; //記錄掃瞄案件的順序 |
| | | Context_DocnoList := TStringlist.Create; //案件裡的檔案Docno清單 |
| | | ContextList := TStringlist.Create; //案件裡的檔案清單 |
| | | NoSaveBarCodeList := TStringlist.Create; //不儲存的條碼清單 |
| | | FormID_List := TStringlist.Create; //FormID清單 |
| | | DocNo_List := TStringlist.Create; //DocNo清單 |
| | | NowShowFileList := TStringlist.Create; //目前顯示的影像清單 |
| | | NowSelectFileList := TStringlist.Create; //目前被點選的影像清單 |
| | | Cust_DocNoList := TStringlist.Create; //自行定義的文件名稱 |
| | | IN_WH_DocNoList := TStringlist.Create; //入庫的文件清單 |
| | | GuideFormIDList := TStringlist.Create; //要當導引頁表單清單 |
| | | DivPageFormIDList := TStringList.Create; //要當分案頁表單清單 |
| | | LastInitFormidList :=TStringList.Create; |
| | | LastAddFormidList := TStringList.Create; |
| | | SampleFormIDList := TStringList.Create;//20170627 加入 |
| | | //********清單區******** |
| | | |
| | | ShowText := _Msg('資料載入中,請稍候'); |
| | | DataLoading(True,True); |
| | | |
| | | IF not GetServerDate Then |
| | | begin |
| | | Showmessage(_Msg('¨ú¥D¾÷®É¶¡®É,ºô¸ôµo¥Í¿ù»~!!')+HttpErrStr); |
| | | Showmessage(_Msg('取主機時間時,網路發生錯誤!!')+HttpErrStr); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | //ShowMessage('GetServerDate '+ServerDate+' , '+ServerTime); |
| | | ////¤U¸ü¨t²Î¸ê°T//// |
| | | IF not GetSetInf1 Then //¨úDOC_INF ¤å¥ó¸ê°T |
| | | |
| | | if FMode='SAMPLESCAN' then |
| | | begin |
| | | Showmessage(_Msg('¨ú¤å¥ó¸ê°T®É,ºô¸ôµo¥Í¿ù»~!!')+HttpErrStr); |
| | | IF not GetSampleInf Then //取已存在sample |
| | | begin |
| | | Showmessage(_Msg('取存在範本資訊時,網路發生錯誤!!')+HttpErrStr); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | end; |
| | | |
| | | |
| | | |
| | | //ShowMessage('GetServerDate '+ServerDate+' , '+ServerTime); |
| | | ////下載系統資訊//// |
| | | IF not GetSetInf1 Then //取DOC_INF 文件資訊 |
| | | begin |
| | | Showmessage(_Msg('取文件資訊時,網路發生錯誤!!')+HttpErrStr); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | //ShowMessage('GetSetInf1'); |
| | | //showmessage(self.Doc_Inf_List.Text); |
| | | IF not GetSetInf2 Then //¨úDM_FORM_INF ¬Û¨Ì¤¬¥¸¸ê°T |
| | | IF not GetSetInf2 Then //取DM_FORM_INF 相依互斥資訊 |
| | | begin |
| | | Showmessage(_Msg('¨ú¬Û¨Ì¤¬¥¸¸ê°T®É,ºô¸ôµo¥Í¿ù»~!!')+HttpErrStr); |
| | | Showmessage(_Msg('取相依互斥資訊時,網路發生錯誤!!')+HttpErrStr); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | //ShowMessage('GetSetInf2'); |
| | | //Showmessage(self.Doc_Inf_List.Text); |
| | | IF not GetSetInf3 Then //¨úFORM_INF ªí³æ¸ê°T |
| | | IF not GetSetInf3 Then //取FORM_INF 表單資訊 |
| | | begin |
| | | Showmessage(_Msg('¨úªí³æ¸ê°T®É,ºô¸ôµo¥Í¿ù»~!!')+HttpErrStr); |
| | | Showmessage(_Msg('取表單資訊時,網路發生錯誤!!')+HttpErrStr); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | //ShowMessage('GetSetInf3'); |
| | | IF not GetSetInf4 Then //¨úCHECK_RULE_INF ÀˮֳW«h¸ê°T |
| | | IF not GetSetInf4 Then //取CHECK_RULE_INF 檢核規則資訊 |
| | | begin |
| | | Showmessage(_Msg('¨úÀˮֳW«h¸ê°T®É,ºô¸ôµo¥Í¿ù»~!!')+HttpErrStr); |
| | | Showmessage(_Msg('取檢核規則資訊時,網路發生錯誤!!')+HttpErrStr); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | //showmessage(self.CHECK_RULE_INF_List.Text); |
| | | //ShowMessage('GetSetInf4'); |
| | | IF not GetSetInf5 Then //¨úMEMO_INF ±`¥Î¤ù»y¸ê°T |
| | | IF not GetSetInf5 Then //取MEMO_INF 常用片語資訊 |
| | | begin |
| | | Showmessage(_Msg('¨ú±`¥Î¤ù»y¸ê°T®É,ºô¸ôµo¥Í¿ù»~!!')+HttpErrStr); |
| | | Showmessage(_Msg('取常用片語資訊時,網路發生錯誤!!')+HttpErrStr); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | //ShowMessage('GetSetInf5'); |
| | | //showmessage(self.MEMO_INF_List.Text); |
| | | IF not GetSetInf6 Then //¨úWORK_INF ¨t²Î°Ñ¼Æ¸ê°T |
| | | IF not GetSetInf6 Then //取WORK_INF 系統參數資訊 |
| | | begin |
| | | Showmessage(_Msg('¨ú¨t²Î°Ñ¼Æ¸ê°T®É,ºô¸ôµo¥Í¿ù»~!!')+HttpErrStr); |
| | | Showmessage(_Msg('取系統參數資訊時,網路發生錯誤!!')+HttpErrStr); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | //ShowMessage('GetSetInf6'); |
| | | //showmessage(FORM_INF_List.Text); |
| | | IF not GetSetInf7 Then //¨úLASTES_FORM_INF ¨t²Î°Ñ¼Æ¸ê°T |
| | | IF not GetSetInf7 Then //取LASTES_FORM_INF 系統參數資訊 |
| | | begin |
| | | Showmessage(_Msg('¨ú³Ì·sª©FORMID°Ñ¼Æ¸ê°T®É,ºô¸ôµo¥Í¿ù»~!!')+HttpErrStr); |
| | | Showmessage(_Msg('取最新版FORMID參數資訊時,網路發生錯誤!!')+HttpErrStr); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | //ShowMessage('GetSetInf7'); |
| | | //Showmessage(LASTEST_FORM_INF_List.Text); |
| | | SetFormID_DocNo; //±NFormID¤ÎDocno©â¥X¶ë¤JList¸Ì 20130403¼W¥[ |
| | | SetIn_WH_DocNo; //±Nn¤J®wªºDocNo©â¥X¨Ó¥t¦s¤Jlist¸Ì |
| | | GetDefScanIni; //¨ú±o±½´y¹w³]ȤάÛÃö³]©w |
| | | SetFormID_DocNo; //將FormID及Docno抽出塞入List裡 20130403增加 |
| | | SetIn_WH_DocNo; //將要入庫的DocNo抽出來另存入list裡 |
| | | GetDefScanIni; //取得掃描預設值及相關設定 |
| | | |
| | | ////¤U¸ü¨t²Î¸ê°T///// |
| | | ////下載系統資訊///// |
| | | if ImagePath = '' then |
| | | begin |
| | | Showmessage(_Msg('¥»¾÷¼È¦s¸ô®|¤£±o¬°ªÅ¥Õ')); |
| | | Showmessage(_Msg('本機暫存路徑不得為空白')); |
| | | DataLoading(False,False); |
| | | Panel1.Enabled := False; |
| | | Panel2.Enabled := False; |
| | |
| | | ImagePath := ImagePath + 'Scantemp\'; |
| | | ScaniniPath :=ImagePath+FWork_No+'\'+FUserUnit +'\'; |
| | | ImagePath := ImagePath + FWork_No+'\'+FUserUnit+'\'+FMode+'\'; |
| | | //ShowMessage('ImagePath='+ImagePath); |
| | | ImageSavePath := ImagePath; |
| | | str2dir(CheckXmlPath); |
| | | str2dir(SitePath); |
| | | str2dir(ImagePath); |
| | | str2dir(SamplePath); |
| | | Del_Sub_NothingPath(ImagePath); //²M±¼®×¥ó¥Ø¿ý¬OªÅªº |
| | | ShowText := _Msg('¸ê®Æ¸ü¤J¤¤,½ÐµyÔ'); |
| | | Del_Sub_NothingPath(ImagePath); //清掉案件目錄是空的 |
| | | |
| | | |
| | | |
| | | |
| | | ShowText := _Msg('資料載入中,請稍候'); |
| | | DataLoading(True,True); |
| | | |
| | | // if not CheckAvailable Then //Àˬd±ÂÅv 20170218 »¡¤£¥Î¤F |
| | | // if not CheckAvailable Then //檢查授權 20170218 說不用了 |
| | | // begin |
| | | // DataLoading(False,False); |
| | | // Panel1.Enabled := False; |
| | |
| | | // Exit; |
| | | // end; |
| | | |
| | | |
| | | //Button3Click(Self); |
| | | //ShowMessage('CheckAvailable'); |
| | | ShowText := _Msg('¸ê®Æ¸ü¤J¤¤,½ÐµyÔ'); |
| | | ShowText := _Msg('資料載入中,請稍候'); |
| | | DataLoading(True,True); |
| | | |
| | | ////¤U¸ü»y¨¥ÀÉ///// 20170218 ¥ý®³½Õ¥H«K´ú¸Õ |
| | | ////下載語言檔///// 20170218 先拿調以便測試 |
| | | If not DownLanguage Then |
| | | begin |
| | | Showmessage('Language File error!!'+HttpErrStr); |
| | |
| | | Exit; |
| | | end; |
| | | |
| | | InitialLanguage(Self); //¸ü¤J¦h°ê»y¨¥ |
| | | ////¤U¸ü»y¨¥ÀÉ///// |
| | | if (FMode = 'RSCAN') or (FMode = 'ESCAN') or (FMode = 'FSCAN') then //«±½¥ó¤Î²§°Ê¥ón¥u¯à±½«ü©w½s¸¹ªº¥ó |
| | | InitialLanguage(Self); //載入多國語言 |
| | | //FCaseID:='20150302180133';//測試用 |
| | | ////下載語言檔///// |
| | | //ShowMessage('OOOO'); |
| | | |
| | | if (FMode = 'RSCAN') or (FMode = 'DSCAN') or (FMode = 'ESCAN') or (FMode = 'FSCAN') then //重掃件及異動件要只能掃指定編號的件 |
| | | begin |
| | | _Deltree(ImagePath); |
| | | str2dir(ImagePath); |
| | |
| | | MkDir(ImageSavePath+FCaseID); |
| | | CreateEmptyCase(ImageSavePath,FCaseID); |
| | | MkDir(ImageSavePath+FCaseID+'\Download'); |
| | | IF (FMode = 'ESCAN') then //²§°Ê¥ó¥ý¤U¸ü¼v¹³ |
| | | IF (FMode = 'ESCAN') then //異動件先下載影像 |
| | | begin |
| | | ShowText := _Msg('®×¥ó¤U¸ü¤¤,½ÐµyÔ'); |
| | | ShowText := _Msg('案件下載中,請稍候'); |
| | | DataLoading(True,True); |
| | | If not Down_Img(ImageSavePath+FCaseID+'\Download\',FCaseID) then |
| | | begin |
| | | Showmessage(FCaseID+_msg('¸ü¤J²§°Ê¼v¹³®É,ºô¸ôµo¥Í¿ù»~')+HttpErrStr); |
| | | Showmessage(FCaseID+_msg('載入異動影像時,網路發生錯誤')+HttpErrStr); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | //Showmessage(ImageSavePath+FCaseID+'\Download\'+#10#13+ImageSavePath+FCaseID+'\'); |
| | | Download2Case(ImageSavePath+FCaseID+'\Download\',ImageSavePath+FCaseID+'\'); |
| | | //Showmessage('aaa'); |
| | | //Download2Case('C:\Users\Hong\Downloads\¨S¦³¬A¸¹\',ImageSavePath+FCaseID+'\'); |
| | | //Download2Case('C:\Users\Hong\Downloads\沒有括號\',ImageSavePath+FCaseID+'\'); |
| | | if (FIs_OldCase = 'Y') then |
| | | begin |
| | | if (FWork_no='HLN') then |
| | | ErrFormtoCurrentForm(FCaseID,'10000001011112A','11000001011112A'); //´«±¼¿ùªºFormID |
| | | //if not FileExists(ImageSavePath+FCaseID+'\CaseDocNo_Copies.dat') then //³oÓ·|¦bDownload2Case®É¤@«ß²£¥Í©Ò¥H¤£¯à¦³³o¦æ 20141013 |
| | | ErrFormtoCurrentForm(FCaseID,'10000001011112A','11000001011112A'); //換掉錯的FormID |
| | | //if not FileExists(ImageSavePath+FCaseID+'\CaseDocNo_Copies.dat') then //這個會在Download2Case時一律產生所以不能有這行 20141013 |
| | | OldCasetoNewCase(FCaseID); |
| | | //ErrFormtoCurrentForm(FCaseID,'11B00005011312A','11000001011112A'); //´«±¼¿ùªºFormID |
| | | //ErrFormtoCurrentForm(FCaseID,'11B00005011312A','11000001011112A'); //換掉錯的FormID |
| | | //LoadImgFile; |
| | | end; |
| | | {if (FIs_OldCase = 'Y') and (FWork_no='HLN') then //77ª©ªº |
| | | begin |
| | | ErrFormtoCurrentForm(FCaseID,'10000001011112A','11000001011112A'); //´«±¼¿ùªºFormID |
| | | if not FileExists(ImageSavePath+FCaseID+'\CaseDocNo_Copies.dat') then |
| | | OldCasetoNewCase(FCaseID); |
| | | //ErrFormtoCurrentForm(FCaseID,'11B00005011312A','11000001011112A'); //´«±¼¿ùªºFormID |
| | | //LoadImgFile; |
| | | end;} |
| | | Create_Cust_DocDir(FCaseID); //²£¥Í¥~±¶Ç¤Jªº¤å¥ó |
| | | // if (FIs_OldCase = 'Y') and (FWork_no='HLN') then //77版的 |
| | | // begin |
| | | // ErrFormtoCurrentForm(FCaseID,'10000001011112A','11000001011112A'); //換掉錯的FormID |
| | | // if not FileExists(ImageSavePath+FCaseID+'\CaseDocNo_Copies.dat') then |
| | | // OldCasetoNewCase(FCaseID); |
| | | // //ErrFormtoCurrentForm(FCaseID,'11B00005011312A','11000001011112A'); //換掉錯的FormID |
| | | // //LoadImgFile; |
| | | // end; |
| | | Create_Cust_DocDir(FCaseID); //產生外面傳入的文件 |
| | | LastInitFormidListCreate(ImageSavePath+FCaseID+'\Download\'); |
| | | end; |
| | | end; |
| | | //ShowMessage('GetOMRCheckSet«e'); |
| | | ////¤U¸üÀË®ÖXML////// |
| | | |
| | | //ShowMessage('GetOMRCheckSet前'); |
| | | ////下載檢核XML////// |
| | | IF not GetOMRCheckSet Then |
| | | begin |
| | | Showmessage(_Msg('¤U¸üÀˮ֩w¦ìÀÉ®×®É,ºô¸ôµo¥Í¿ù»~!!')+HttpErrStr); |
| | | Showmessage(_Msg('下載檢核定位檔案時,網路發生錯誤!!')+HttpErrStr); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | ////¤U¸üÀË®ÖXML///// |
| | | //ShowMessage('GetOMRCheckSet«á¨Ó'); |
| | | ////¤U¸üµn¥´³]©w///// |
| | | ////下載檢核XML///// |
| | | //ShowMessage('GetOMRCheckSet後來'); |
| | | ////下載登打設定///// |
| | | IF not GetKeyinSet Then |
| | | begin |
| | | Showmessage(_Msg('¤U¸üµn¥´©w¦ìÀÉ®×®É,ºô¸ôµo¥Í¿ù»~!!')+HttpErrStr); |
| | | Showmessage(_Msg('下載登打定位檔案時,網路發生錯誤!!')+HttpErrStr); |
| | | DataLoading(False,False); |
| | | Exit; |
| | | end; |
| | | ////¤U¸üµn¥´³]©w///// |
| | | ////下載登打設定///// |
| | | //ShowMessage('GetKeyinSet'); |
| | | if ScanDenialHint <> '' then //¦³³]©w´£¥Ü¦r¦ê´N¨q¦b¥k¤W¨¤ |
| | | if ScanDenialHint <> '' then //有設定提示字串就秀在右上角 |
| | | begin |
| | | DenialTimeLb.Visible := True; |
| | | DenialTimeLb.Caption := Format(ScanDenialHint,[ScanDenialTime]); |
| | | end; |
| | | |
| | | R_W_Scanini('R'); //±½ºË³]©wªºini |
| | | //ShowMessage(IntToStr(ScanDpi)); |
| | | R_W_Scanini('R'); //掃瞄設定的ini |
| | | //ShowMessage(IntToStr(ScanDpi)); |
| | | ScanDuplexCB.Checked := ScanDuplex; |
| | | if FMode <> 'SAMPLESCAN' then |
| | | LoadImgFile; |
| | |
| | | end; |
| | | InitialOk := True; |
| | | |
| | | {AttFileGB.Visible := True; //ªþ¥[¹q¤lÀɵ¡ //20120207·¨¥É»¡¤£¦b³o¥[¹q¤lÀÉ¥ý®³±¼ |
| | | {AttFileGB.Visible := True; //附加電子檔窗 //20120207楊玉說不在這加電子檔先拿掉 |
| | | Splitter2.Visible := True; |
| | | AttFileGB.Visible := False; //ªþ¥[¹q¤lÀɵ¡ |
| | | AttFileGB.Visible := False; //附加電子檔窗 |
| | | Splitter2.Visible := False; } |
| | | |
| | | DataLoading(False,False); |
| | | //ShowMessage('ªì©l¸Ü°õ¦æ§¹¦¨'); |
| | | //ShowMessage('初始話執行完成'); |
| | | //ShowMessage('GuideFormIDList='+GuideFormIDList.Text); |
| | | //ShowMessage('DivPageFormIDList='+DivPageFormIDList.Text); |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.Timer2Timer(Sender: TObject); |
| | |
| | | CaseID : String; |
| | | i,n,v: Integer; |
| | | ZipFileList : TStringlist; |
| | | CaseTrans : Integer; //-1:¥¢±Ñ 0:¥i 1:¤£¦æ |
| | | CaseTrans : Integer; //-1:失敗 0:可 1:不行 |
| | | SuccessCount,ReCasecount,CheckErrCount : Integer; |
| | | TransMsg : String; |
| | | AreaStr : String; |
| | |
| | | begin |
| | | IF not InitialOk Then |
| | | begin |
| | | Showmessage(_msg('¸ê°T©|¥¼¤U¸ü§¹¦¨,½ÐµyԩΫ·s¶i¤J')); |
| | | Showmessage(_msg('資訊尚未下載完成,請稍候或重新進入')); |
| | | Exit; |
| | | end; |
| | | ClearView(1); |
| | |
| | | ClearCaseIndex; |
| | | RejectCase := False; |
| | | |
| | | if not CheckCaseID_OK then //Àˬd¬O§_¦³¥¼°t¸¹ªº®×¥ó |
| | | if not CheckCaseID_OK then //檢查是否有未配號的案件 |
| | | begin |
| | | Showmessage(_Msg('©|¦³¥¼°t¸¹®×¥ó,µLªk¤W¶Ç')); |
| | | Showmessage(_Msg('尚有未配號案件,無法上傳')); |
| | | Exit; |
| | | end; |
| | | if NewTreeNode.Count = 0 then |
| | | begin |
| | | Showmessage(_Msg('µL¼v¹³»Ý¶Ç°e')); |
| | | Showmessage(_Msg('無影像需傳送')); |
| | | Exit; |
| | | end; |
| | | |
| | |
| | | CheckErrCount := 0; |
| | | if (FMode = 'NSCAN') and (not CheckScanDenialTime) then |
| | | begin |
| | | if Messagedlg(Format(_Msg('¤v¶W¹L¦¬¥ó®É¶¡(%s),¹w©w§@·~¤é¬°¤UÓÀç·~¤é,¬O§_Ä~Äò¤W¶Ç??'),[ScanDenialTime]),mtConfirmation,[mbyes,mbcancel],0)=mrcancel then Exit; |
| | | if Messagedlg(Format(_Msg('己超過收件時間(%s),預定作業日為下個營業日,是否繼續上傳??'),[ScanDenialTime]),mtConfirmation,[mbyes,mbcancel],0)=mrcancel then Exit; |
| | | end; |
| | | |
| | | ShowText := _Msg('¸ê®Æ¤W¶Ç¤¤,½ÐµyÔ'); |
| | | ShowText := _Msg('資料上傳中,請稍候'); |
| | | DataLoading(True,True); |
| | | |
| | | For i := 0 to NewTreeNode.Count -1 do |
| | | begin |
| | | v := posend('-',NewTreenode.Item[i].Text); |
| | | CaseID := Copy(NewTreenode.Item[i].Text,1,v-1); |
| | | ShowText := CaseID+_Msg('¸ê®Æ¤W¶Ç¤¤,½ÐµyÔ'); |
| | | ShowText := CaseID+_Msg('資料上傳中,請稍候'); |
| | | DataLoading(True,True); |
| | | CreateIn_WH(CaseID); //²£¥Í¤J®w¤å¥ó¤å¦rÀÉ In_Wh.dat |
| | | Case2upload(CaseID); //²£¥Íì¼v¹³µ²ºc |
| | | |
| | | CreateIn_WH(CaseID); //產生入庫文件文字檔 In_Wh.dat |
| | | Case2upload(CaseID); //產生原影像結構 |
| | | TransPath := ImageSavePath+CaseID+'\Upload\'; |
| | | |
| | | {if FMode = 'ESCAN' then //20140320 yuu»¡®³±¼¦¹Àˬd |
| | | {if FMode = 'ESCAN' then //20140320 yuu說拿掉此檢查 |
| | | begin |
| | | S := TStringlist.Create; |
| | | try |
| | | S.LoadFromFile(TransPath + 'Context.dat'); |
| | | if S.Count = 0 then |
| | | begin |
| | | Showmessage(_Msg('µL¼v¹³ÀɵLªk¶Ç°e')); |
| | | Showmessage(_Msg('無影像檔無法傳送')); |
| | | DataLoading(False,False); |
| | | LoadImgFile; |
| | | Exit; |
| | |
| | | s.Free; |
| | | end; |
| | | end;} |
| | | |
| | | if (FMode = 'NSCAN') then |
| | | if (FMode = 'NSCAN') or (FMode = 'DSCAN') then //20170406 待掃瞄也要問一下 |
| | | begin |
| | | /////°T°Ý¬O§_¥i¤W¶Ç///// |
| | | /////訊問是否可上傳///// |
| | | CaseTrans := CaseAsk(CaseID); |
| | | /////°T°Ý¬O§_¥i¤W¶Ç//// |
| | | /////訊問是否可上傳//// |
| | | end |
| | | Else ///¤£¬O·s¥ó¡B«±½¥ó¡B²§°Ê¥óªº¤£¬d |
| | | Else ///不是新件、重掃件、異動件的不查 |
| | | begin |
| | | CaseTrans := 0; |
| | | end; |
| | | if CaseTrans = -1 then //¥¢±Ñ |
| | | if CaseTrans = -1 then //失敗 |
| | | begin |
| | | Showmessage(_Msg('¸ß°Ý®×¥ó¥i§_¶Ç°e®É,ºô¸ôµo¥Í¿ù»~!!')+HttpErrStr); |
| | | Showmessage(_Msg('詢問案件可否傳送時,網路發生錯誤!!')+HttpErrStr); |
| | | DataLoading(False,False); |
| | | LoadImgFile; |
| | | Exit; |
| | | end; |
| | | if CaseTrans = 1 then |
| | | begin |
| | | ////«½Æ³B²z///// |
| | | ////重複處理///// |
| | | Inc(ReCasecount); |
| | | ////«½Æ³B²z///// |
| | | ////重複處理///// |
| | | Continue; |
| | | end |
| | | Else if CaseTrans = 0 then //¥i¥H¶Ç°e |
| | | Else if CaseTrans = 0 then //可以傳送 |
| | | begin |
| | | ///////ÀË®Ö////// 20100927 User§ï¬°·h¦Ü¥~±°µ ///20101019 User¤S§ï¦^¤W¶Çn°µ |
| | | //if FMode = 'NSCAN' then //20101019§ï¦¨Åª³]©w¨º¨Ç¼Ò¦¡n°µ¨º¨ÇÀ訅 |
| | | ///////檢核////// 20100927 User改為搬至外面做 ///20101019 User又改回上傳要做 |
| | | //if FMode = 'NSCAN' then //20101019改成讀設定那些模式要做那些檢核 |
| | | //begin |
| | | |
| | | ///¨Ì¤Q¦r©w¦ìÂIÁY©ñ//// |
| | | CaseReSize(CaseID); //©Ò¥H¼v¹³¦A°µ¤@¦¸ÁY©ñ |
| | | ////¨Ì¤Q¦r©w¦ìÂIÁY©ñ/////// } |
| | | ///依十字定位點縮放//// |
| | | CaseReSize(CaseID); //所以影像再做一次縮放 |
| | | ////依十字定位點縮放/////// } |
| | | if (FMode <> 'FSCAN') then |
| | | begin |
| | | if (NewTreenode.Item[i].ImageIndex <> 7) and (NewTreenode.Item[i].ImageIndex <> 5) then //Àˮ֧¹¦¨ªº¤£¦AÀ訅 |
| | | if (NewTreenode.Item[i].ImageIndex <> 7) and (NewTreenode.Item[i].ImageIndex <> 5) then //檢核完成的不再檢核 |
| | | begin |
| | | ShowText := CaseID+_Msg('Àˮ֤¤,½ÐµyÔ'); |
| | | ShowText := CaseID+_Msg('檢核中,請稍候'); |
| | | DataLoading(True,True); |
| | | If not OMRCheckCase(CaseID) then |
| | | begin |
| | |
| | | end; |
| | | end; |
| | | //end; |
| | | ///////ÀË®Ö////// |
| | | ShowText := CaseID+_Msg('¸ê®Æ¤W¶Ç¤¤,½ÐµyÔ'); |
| | | ///////檢核////// |
| | | ShowText := CaseID+_Msg('資料上傳中,請稍候'); |
| | | DataLoading(True,True); |
| | | If Not TransCaseID(TransPath,CaseID,True) Then //¶Ç°e®×¥ó |
| | | //ShowMessage('NNNNN'); |
| | | //ShowMessage('退出');DataLoading(False,False);Exit; |
| | | If Not TransCaseID(TransPath,CaseID,True) Then //傳送案件 |
| | | begin |
| | | DataLoading(False,False); |
| | | LoadImgFile; |
| | |
| | | end; |
| | | end; |
| | | DataLoading(False,False); |
| | | TransMsg := Format(_Msg('¦¨¥\¥ó%d¥ó'),[SuccessCount]); |
| | | TransMsg := Format(_Msg('成功件%d件'),[SuccessCount]); |
| | | if ReCasecount > 0 then |
| | | TransMsg := TransMsg + #13#10 + Format(_Msg('µLªk¤W¶Ç¥ó%d¥ó'),[ReCasecount]); |
| | | TransMsg := TransMsg + #13#10 + Format(_Msg('無法上傳件%d件'),[ReCasecount]); |
| | | if CheckErrCount > 0 then |
| | | TransMsg := TransMsg + #13#10 + Format(_Msg('Àˮ֥¢±Ñ¥ó%d¥ó'),[CheckErrCount]); |
| | | TransMsg := TransMsg + #13#10 + Format(_Msg('檢核失敗件%d件'),[CheckErrCount]); |
| | | |
| | | Showmessage(_Msg('¶Ç°e§¹¦¨')+#13#10+TransMsg); |
| | | Showmessage(_Msg('傳送完成')+#13#10+TransMsg); |
| | | |
| | | LoadImgFile; |
| | | if (FMode = 'ESCAN') and (SuccessCount = 1) then |
| | | begin |
| | | if FEvents <> nil Then |
| | | begin |
| | | FEvents.OnClosePage; |
| | | end; |
| | | end; |
| | | if (FMode = 'DSCAN') and (SuccessCount = 1) then |
| | | begin |
| | | if FEvents <> nil Then |
| | | begin |
| | |
| | | NowShowFileList.Clear; |
| | | StatusBar1.Panels[2].Text := ''; |
| | | ClearCaseIndex; |
| | | PageLv.Items.Clear; //¶¼Æ²M³æ |
| | | PageLv.Items.Clear; //頁數清單 |
| | | //Panel18.Enabled:= False; |
| | | UseOldCaseLb.Visible := False; |
| | | PM107.Visible := False; //³Æµù¥\¯à |
| | | CaseHelpBtn.Visible := False; //Àˮ֥¢±Ñì¦]¶s |
| | | PM107.Visible := False; //備註功能 |
| | | CaseHelpBtn.Visible := False; //檢核失敗原因鈕 |
| | | Panel5.Visible := True; |
| | | ContextList.Clear; |
| | | SortMode := false; |
| | | ISB1.ZoomMode := zmFullPage; |
| | | IF TreeView1.Selected.Parent <> nil Then |
| | | begin |
| | | if TreeView1.Selected.Parent = NewTreenode then //ÂI¦b®×¥ó¤W |
| | | if TreeView1.Selected.Parent = NewTreenode then //點在案件上 |
| | | begin |
| | | //Panel18.Enabled := True; |
| | | PM107.Visible := True; //³Æµù¥\¯à |
| | | PM107.Visible := True; //備註功能 |
| | | MyTreeNode1 := TreeView1.Selected; |
| | | MyTreeNode2 := nil; |
| | | MyTreeNode3 := nil; |
| | |
| | | ScrollBar1.Max := page; |
| | | MyTreeNode1.Expand(True); |
| | | end |
| | | Else If TreeView1.Selected.Parent.Parent = NewTreenode Then //ÂI¦b¤å¥ó¤W |
| | | Else If TreeView1.Selected.Parent.Parent = NewTreenode Then //點在文件上 |
| | | begin |
| | | |
| | | MyTreeNode1 := TreeView1.Selected.Parent; |
| | |
| | | DisplayPath := ImageSavePath+NowCaseNo+'\'; |
| | | |
| | | if GetUseCase('F',DisplayPath,NowDocDir) <> '' then |
| | | StatusBar1.Panels[2].Text := Format('±q%s¤Þ¥Î',[GetUseCase('F',DisplayPath,NowDocDir)]); |
| | | StatusBar1.Panels[2].Text := Format('從%s引用',[GetUseCase('F',DisplayPath,NowDocDir)]); |
| | | if GetUseCase('T',DisplayPath,NowDocDir) <> '' then |
| | | StatusBar1.Panels[2].Text := Format('³Q%s¤Þ¥Î',[GetUseCase('T',DisplayPath,NowDocDir)]); |
| | | StatusBar1.Panels[2].Text := Format('被%s引用',[GetUseCase('T',DisplayPath,NowDocDir)]); |
| | | if FLoanDoc_Enable = 'Y' then |
| | | begin |
| | | AddCredit1RG.Enabled := True; |
| | |
| | | Cust_DocNoList.LoadFromFile(DisplayPath+'CustomDocNo.dat'); |
| | | MyTreeNode1.Expand(True); |
| | | end |
| | | Else If (NewTreenode <> nil) and (TreeView1.Selected.Parent.Parent.Parent = NewTreenode) Then //ÂI¦bªí³æ¤W |
| | | Else If (NewTreenode <> nil) and (TreeView1.Selected.Parent.Parent.Parent = NewTreenode) Then //點在表單上 |
| | | begin |
| | | //NoteBtn.Visible := True; //³Æµù¥\¯à |
| | | //NoteBtn.Visible := True; //備註功能 |
| | | //Panel18.Enabled := True; |
| | | ClearView(1); |
| | | PM107.Visible := True; //³Æµù¥\¯à |
| | | PM107.Visible := True; //備註功能 |
| | | MyTreeNode1 := TreeView1.Selected.Parent.Parent; |
| | | MyTreeNode2 := TreeView1.Selected.Parent; |
| | | MyTreeNode3 := TreeView1.Selected; |
| | |
| | | NowFormName := Copy(MyTreeNode3.Text,v+1,v1-v-1); |
| | | page := strtoint(Copy(MyTreeNode3.Text,v2+1,ln-v2-1)); |
| | | end |
| | | Else //ÂI¦bªþ¥óªº¶¼Æ |
| | | Else //點在附件的頁數 |
| | | begin |
| | | NowFormCode := ''; |
| | | page := 1; |
| | |
| | | DisplayPath := ImageSavePath+NowCaseNo+'\'; |
| | | |
| | | if GetUseCase('F',DisplayPath,NowDocDir) <> '' then |
| | | StatusBar1.Panels[2].Text := Format('±q%s¤Þ¥Î',[GetUseCase('F',DisplayPath,NowDocDir)]); |
| | | StatusBar1.Panels[2].Text := Format('從%s引用',[GetUseCase('F',DisplayPath,NowDocDir)]); |
| | | if GetUseCase('T',DisplayPath,NowDocDir) <> '' then |
| | | StatusBar1.Panels[2].Text := Format('³Q%s¤Þ¥Î',[GetUseCase('T',DisplayPath,NowDocDir)]); |
| | | StatusBar1.Panels[2].Text := Format('被%s引用',[GetUseCase('T',DisplayPath,NowDocDir)]); |
| | | |
| | | if FLoanDoc_Enable = 'Y' then |
| | | begin |
| | |
| | | end; |
| | | MyTreeNode1.Expand(True); |
| | | end |
| | | Else //ÂI¦bNewTreenode or MyTreenode1 ¤W |
| | | Else //點在NewTreenode or MyTreenode1 上 |
| | | begin |
| | | ClearView(1); |
| | | MyTreeNode1 := nil; |
| | |
| | | NewDocNo := Copy(iTreeNode2.Text,v+1,v1-v-1); |
| | | NewPath := ImagePath+NewCaseNo+'\'; |
| | | OldFileName := ExtractFileName(DisplayISB.FileName); |
| | | if Copy(NewDocNo,1,5) = 'ZZZZZ' then //¦Ûq¤å¥ó |
| | | if Copy(NewDocNo,1,5) = 'ZZZZZ' then //自訂文件 |
| | | begin |
| | | NewFileName := Add_Zoo(FileName2ScanPage(OldFileName),3)+'_'+NewDocNo+'0000000'+ExtractFileExt(OldFileName); |
| | | NewFormCode := NewDocNo+'0000000'; |
| | |
| | | NewFormName := Copy(iTreeNode3.Text,1,v1-1); |
| | | end; |
| | | NewPath := ImagePath+NewCaseNo+'\'+NewDocDir+'\'; |
| | | if NewPath = DisplayPath Then //¦P®×¥ó |
| | | if NewPath = DisplayPath Then //同案件 |
| | | begin |
| | | if NewFormCode <> '' then |
| | | //NewFileName := Copy(OldFileName,1,3)+'_'+NewFormCode+ExtractFileExt(OldFileName) |
| | |
| | | //NewFileName := Copy(OldFileName,1,3)+ExtractFileExt(OldFileName) |
| | | NewFileName := Add_Zoo(GetDocDir_Page(NewCaseNo,NewDocDir),3)+ExtractFileExt(OldFileName); |
| | | end |
| | | else //¤£¦P®×¥ó |
| | | else //不同案件 |
| | | begin |
| | | if NewFormCode <> '' then |
| | | //NewFileName := Copy(OldFileName,1,3)+'_'+NewFormCode+ExtractFileExt(OldFileName) |
| | |
| | | //NewFileName := Copy(OldFileName,1,3)+ExtractFileExt(OldFileName) |
| | | NewFileName := Add_Zoo(GetDocDir_Page(NewCaseNo,NewDocDir)+1,3)+ExtractFileExt(OldFileName); |
| | | |
| | | if NewCaseNo = NowCaseNo then //¦P®×¥ó¤£§ï¶¶§Ç |
| | | if NewCaseNo = NowCaseNo then //同案件不改順序 |
| | | begin |
| | | CopyFile(PWideChar(OldFileName),PwideChar(NewPath+NewFileName),False); |
| | | SetContextList('A',-1,NewCaseNo,NewDocDir,NewFileName); |
| | |
| | | ContextList.LoadFromFile(DisplayPath+'Context.dat'); |
| | | if (ContextList.Count = 1) and ((FMode = 'NSCAN') or (FMode = 'ASCAN') or (FMode = 'DSCAN') or (FMode = 'SSCAN') or (FMode = 'MSCAN') or (FMode = 'RI_SCAN') or (FMode = 'ISCAN')) then |
| | | begin |
| | | if Messagedlg(Format(_Msg('²¾°Ê«á(%s)®×¥óµL¼v¹³,±N§R°£¦¹®×¥ó,¬O§_½T©w²¾°Ê?'),[NowCaseno]),mtconfirmation,[mbyes,mbcancel],0) = mrCancel then Exit; |
| | | if Messagedlg(Format(_Msg('移動後(%s)案件無影像,將刪除此案件,是否確定移動?'),[NowCaseno]),mtconfirmation,[mbyes,mbcancel],0) = mrCancel then Exit; |
| | | end; |
| | | CopyFile(PWideChar(DisplayISB.FileName),PWideChar(NewPath+NewFileName),False); |
| | | ContextList.LoadFromFile(NewPath+'Context.dat'); |
| | | ContextList.Add(NewFileName); |
| | | ContextList.SaveToFile(NewPath+'Context.dat'); |
| | | //Showmessage('1'); |
| | | iTreeNode2.Text := Format(_Msg('%s-%d¶'),[NewCaseNo,GetCasePage(ImagePath,NewCaseNo)]); |
| | | iTreeNode2.Text := Format(_Msg('%s-%d頁'),[NewCaseNo,GetCasePage(ImagePath,NewCaseNo)]); |
| | | //Showmessage('2'); |
| | | //DrawDocItem(iTreeNode1,FORM_INF_List,NewCaseNo); |
| | | //DrawDocItem1(MytreeNode1,Doc_Inf_List,NewCaseno); 20140820§ï |
| | | //DrawDocItem1(MytreeNode1,Doc_Inf_List,NewCaseno); 20140820改 |
| | | DrawDocItem2(MytreeNode1,NewCaseno); |
| | | //Showmessage('3'); |
| | | ClearErrini(NewCaseNo,iTreeNode1); |
| | |
| | | ReSortFileName(ExtractFilePath(OldFileName)); |
| | | end; |
| | | DrawDocItem2(MytreeNode1,NowCaseno); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //²M±¼ÀˮְO¿ý |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | | if GoAtt then |
| | | begin |
| | | GotoAttach(AttLv); |
| | |
| | | or((NewNode.Level <>2) and (NewNode.Level<>3)) |
| | | or((NewNode.Level =2) and ((ImgDocNo = Node2DocNo(NewNode))or(Node2DocNo(NewNode)='')or (copy(Node2DocNo(NewNode),1,5)<>'ZZZZZ'))) |
| | | or((NewNode.Level =3) and ((ImgFormCode=Node3FormID(NewNode)) or (ImgDocNo = Node3DocNo(NewNode)) or (Node3DocNo(NewNode)=''))) |
| | | or(Pos(_Msg('¥¼µù¥U¤å¥ó'),Newnode.Text)>0) |
| | | or(Pos(_Msg('未註冊文件'),Newnode.Text)>0) |
| | | Then |
| | | Accept := False;} |
| | | end; |
| | |
| | | procedure TCB_IMGPSScanX.Set_language(const Value: WideString); |
| | | begin |
| | | FLanguage := lowercase(Value); |
| | | if FLanguage='zh-tw' then |
| | | begin |
| | | FLanguage:='zh_tw' |
| | | end; |
| | | if FileExists(LngPath+'Language.lng') then |
| | | begin |
| | | InitialLanguage(Self); //¸ü¤J¦h°ê»y¨¥ |
| | | InitialLanguage(Self); //載入多國語言 |
| | | end; |
| | | end; |
| | | |
| | |
| | | begin |
| | | FUseProxy := UpperCase(Value); |
| | | if FUseProxy = 'Y' then |
| | | UseProxy := True; //n¤£n¥ÎProxy |
| | | UseProxy := True; //要不要用Proxy |
| | | |
| | | end; |
| | | |
| | |
| | | FCustDocYN := UpperCase(Value); |
| | | end; |
| | | |
| | | function TCB_IMGPSScanX.Get_casenolength: WideString; |
| | | begin |
| | | |
| | | end; |
| | | |
| | | function TCB_IMGPSScanX.Get_filesizelimit: WideString; |
| | | begin |
| | | |
| | | end; |
| | | |
| | | function TCB_IMGPSScanX.Get_imgdpi: WideString; |
| | | begin |
| | | |
| | | end; |
| | | |
| | | function TCB_IMGPSScanX.Get_scancolor: WideString; |
| | | begin |
| | | |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.Set_casenolength(const Value: WideString); |
| | | begin |
| | | if Value ='' then |
| | | begin |
| | | FCaseNoLength := 0 ; |
| | | CaseIDLength := FCaseNoLength; |
| | | end |
| | | else |
| | | begin |
| | | FCaseNoLength := StrToInt(Value) ; |
| | | CaseIDLength := FCaseNoLength; |
| | | end; |
| | | |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.Set_filesizelimit(const Value: WideString); |
| | | begin |
| | | //ShowMessage(Value); |
| | | if Value ='' then |
| | | begin |
| | | FFileSizeLimit := 5*1024; |
| | | end |
| | | else |
| | | begin |
| | | FFileSizeLimit := StrToInt(Value); |
| | | end; |
| | | |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.Set_imgdpi(const Value: WideString); |
| | | begin |
| | | if Value ='' then |
| | | begin |
| | | FImgDPI := 300; |
| | | ScanDpi := FImgDPI; |
| | | end |
| | | else |
| | | begin |
| | | FImgDPI := StrToInt(Value); |
| | | ScanDpi := FImgDPI; |
| | | Def_ScanDpi := FImgDPI; |
| | | end; |
| | | |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.Set_scancolor(const Value: WideString); |
| | | begin |
| | | if value='' then |
| | | begin |
| | | FScanColor := 0; |
| | | ScanColor := ifBlackWhite; |
| | | end |
| | | else |
| | | begin |
| | | FScanColor := StrToInt(Value); |
| | | ScanColor := ifBlackWhite; |
| | | end; |
| | | |
| | | if FScanColor = 1 then |
| | | begin |
| | | ScanColor := ifGray256 ; |
| | | end; |
| | | |
| | | if FScanColor = 2 then |
| | | begin |
| | | ScanColor := ifTrueColor ; |
| | | end; |
| | | |
| | | end; |
| | | |
| | | function TCB_IMGPSScanX.Get_imgdelete: WideString; |
| | | begin |
| | | |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.Set_imgdelete(const Value: WideString); |
| | | begin |
| | | FImgDelete:=Value; |
| | | end; |
| | | |
| | | function TCB_IMGPSScanX.Get_check_main_form: WideString; |
| | | begin |
| | | |
| | | end; |
| | | |
| | | function TCB_IMGPSScanX.Get_isExternal: WideString; |
| | | begin |
| | | |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.Set_check_main_form(const Value: WideString); |
| | | begin |
| | | FCheck_main_form := Value; |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.Set_isExternal(const Value: WideString); |
| | | begin |
| | | FIsExternal:=Value; |
| | | end; |
| | | |
| | | initialization |
| | | TActiveFormFactory.Create( |
| | | ComServer, |