{ ==============================================================================
|
方法名稱:GetDocNo_IS_WH
|
引用相依:
|
方法描述:判斷指定文件編號是否屬於「入庫文件」類別。
|
============================================================================== }
|
Function TCB_IMGPSScanX.GetDocNo_IS_WH(DocNo:String):Boolean; //DocNo是否為入庫文件
|
var
|
i :Integer;
|
begin
|
Result := False;
|
for i := 0 to IN_WH_DocNoList.Count - 1 do
|
begin
|
if DocNo = IN_WH_DocNoList.Strings[i] then
|
begin
|
Result := True;
|
Break;
|
end;
|
end;
|
end;
|
|
|
{ ==============================================================================
|
方法名稱:DocNoIs_In_WH
|
引用相依:
|
方法描述:判斷指定文件編號(包含自定義 ZZZZZ 系列)是否為入庫文件。
|
============================================================================== }
|
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 說自訂文件也是入庫文件
|
begin
|
Result := True;
|
Exit;
|
end;
|
for i := 0 to IN_WH_DocNoList.Count -1 do
|
begin
|
if DocNo = IN_WH_DocNoList.Strings[i] then
|
begin
|
Result := True;
|
Break;
|
end;
|
end;
|
end;
|
|
|
{ ==============================================================================
|
方法名稱:FormIDAppear
|
引用相依:
|
方法描述:判斷特定的表單代碼(FormID)是否符合目前入庫/非入庫作業模式的顯示規則。
|
主要過濾掉不屬於當前作業範疇的文件。
|
============================================================================== }
|
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 //入庫掃描不看非入庫文件
|
((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;
|
|
if (FIs_In_Wh='Y') and (FWH_category='Y') then //20170816 新加
|
begin
|
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;
|
|
if (FIs_In_Wh='Y') and (FWH_category='N') then //20170816 新加
|
begin
|
Result:=True;
|
end;
|
|
end;
|
|
|
{ ==============================================================================
|
方法名稱:DocNoAppear
|
引用相依:
|
方法描述:判斷文件編號(DocNo)是否應在介面上顯示。包含針對附件與入庫屬性的互斥過
|
濾。
|
============================================================================== }
|
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 //入庫掃描不看非入庫文件
|
((FIs_In_Wh = 'N') and (DocNoIs_In_WH(DocNo)) or (DocNo ='Attach') )) {and //非入庫掃描不看入庫文件
|
(Copy(DocNo,1,5)<>'ZZZZZ')} {then
|
{Result := False;}
|
//20181031 應該要換成下面的判斷比較對,FIs_In_Wh傳空的話才會出全部
|
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;
|
|
|
{ ==============================================================================
|
方法名稱:ISGuideFormID
|
引用相依:
|
方法描述:檢查指定的表單代碼是否屬於「引導頁(Guide Page)」清單。
|
============================================================================== }
|
Function TCB_IMGPSScanX.ISGuideFormID(FormID:String):Boolean;
|
var
|
i : Integer;
|
begin
|
Result := False;
|
for i := 0 to GuideFormIDList.Count - 1 do
|
begin
|
if FormID = GuideFormIDList.Strings[i] then
|
begin
|
Result := True;
|
Break;
|
end;
|
end;
|
end;
|
|
|
{ ==============================================================================
|
方法名稱:ISDivPageFormID
|
引用相依:
|
方法描述:檢查指定的表單代碼是否屬於「分案頁(Division Page)」清單。
|
============================================================================== }
|
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;
|