From 4b2b4710d0f6c07cd528deae900e7d89488f5dad Mon Sep 17 00:00:00 2001
From: doom4ster <doom4ster@gmail.com>
Date: 星期二, 09 五月 2017 11:11:21 +0800
Subject: [PATCH] scan ocx ver2.0.1.10 修改導引頁在新件掃瞄 分案文件 問題, 與上傳時抓的主formid 跳過導引頁formid

---
 CB_IMGPSScanImp.pas |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/CB_IMGPSScanImp.pas b/CB_IMGPSScanImp.pas
index c33da9a..732bb3b 100644
--- a/CB_IMGPSScanImp.pas
+++ b/CB_IMGPSScanImp.pas
@@ -4022,14 +4022,17 @@
 
           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  //只找分案頁上的案件條碼
+//ShowMessage('FormID='+FormID);
+          if (FormID <>'') and FindDivFormCode(FormID) and (NowGuideFormID <> '')  Then  //只找分案頁上的案件條碼
           begin
+
             ScanInfo.ImageCount := 0;
             ClearView(1);
             ContextList.Clear;
@@ -4037,6 +4040,7 @@
             ClearCaseIndex;                //清掉案件索引
             ScanCaseno := BarCode2CaseID; //取出案件編號
             NowGuideFormID := '';
+//ShowMessage('NowGuideFormID='+NowGuideFormID+#10#13+'FormID='+FormID+#10#13+'ScanCaseno='+ScanCaseno);
           end;
           if ScanCaseno = '' then //一開始都沒找到
           begin
@@ -11971,6 +11975,10 @@
   for I := 0 to ContextList.Count - 1 do
   begin
     FileFormID := FileName2FormCode(ContextList.Strings[i]);
+    if FileFormID=GuideFormIDList.Strings[0] then //20170509 跳過導引頁的formid
+    begin
+      Continue;
+    end;
     if FindDivFormCode(FileFormID) then
     begin
       Result := FileFormID;

--
Gitblit v1.8.0