| | |
| | | iISB : TImageScrollBox; |
| | | GoAtt : Boolean; |
| | | AttLv : Integer; |
| | | ST1 :TStringList; |
| | | begin |
| | | PreNode2Name := ''; |
| | | ST1:=TStringList.Create; |
| | | if TreeView1.Selected.Parent = MyTreeNode1 then |
| | | PreNode2Name:= GetNode2Name(MyTreeNode2); |
| | | ShowText := _Msg('文件歸類中,請稍候'); |
| | |
| | | try |
| | | InitialLanguage(DocListForm); //載入多國語言 |
| | | //InitialLanguage(PatchDlg); //載入多國語言 |
| | | DocListForm.CheckBox1.Visible:=False; |
| | | for i := 1 to FORM_INF_List.Count - 1 do |
| | | begin |
| | | FormID := GetSQLData(FORM_INF_List,'T1.FORM_ID',i); |
| | |
| | | begin |
| | | if (Components[i] is TShape) and (copy(Components[i].Name,1,2)='SP') then |
| | | begin |
| | | //Showmessage(Components[i].Name); |
| | | iISBName := ShapeName2PreViewISBName(TShape(Components[i])); |
| | | iISB := TImageScrollBox(FindComponent(iISBName)); |
| | | OldName := ExtractFileName(iISB.FileName); |
| | | Ext := ExtractFileExt(OldName); |
| | | FormID := DocListForm.DocLV.Selected.Caption; |
| | | DocNo := FormCode2DocNo(FormID); |
| | | |
| | | if DocListForm.CheckBox1.Checked then |
| | | begin |
| | | FormID := DocListForm.Edit1.Text; |
| | | DocNo := GetNewCustomDocNo(DisplayPath,FormID); |
| | | end |
| | | else |
| | | begin |
| | | FormID := DocListForm.DocLV.Selected.Caption; |
| | | DocNo := FormCode2DocNo(FormID); |
| | | end; |
| | | |
| | | |
| | | if DocNoDir2DocNo(Path2DocDir(ExtractFilePath(iISB.FileName),NowCaseno)) = DocNo then |
| | | DocDir := Path2DocDir(ExtractFilePath(iISB.FileName),NowCaseNo) |
| | | Else |
| | | DocDir := FindLastestDocDir(NowCaseno,DocNo); |
| | | |
| | | //ShowMessage('DocNoNeedDiv(DocNo)='+BoolToStr(DocNoNeedDiv(DocNo),true)); |
| | | //ShowMessage('DocDir='+DocDir); |
| | | if DocNoNeedDiv(DocNo) then //要分份數 |
| | | begin |
| | | if ((FormCode2Page(FormID) = '01') and (GetDocDir_Page(NowCaseno,DocDir)>0)) or (DocDir = '') then |
| | | begin |
| | | DocDir := DocNo2DocNoDir(ImageSavePath + NowCaseno+'\',DocNo); |
| | | end |
| | | else |
| | | begin //20171016 真對補件影響 所加的判斷 |
| | | ST1.Clear; |
| | | if FileExists(ImageSavePath + NowCaseno+'\'+DocDir+'\Context.dat') then |
| | | begin |
| | | ST1.LoadFromFile(ImageSavePath + NowCaseno+'\'+DocDir+'\Context.dat'); |
| | | if ISExistImg(ImageSavePath + NowCaseno+'\'+DocDir+'\'+ST1.Strings[0]) then |
| | | begin |
| | | DocDir := DocNo2DocNoDir(ImageSavePath + NowCaseno+'\',DocNo); |
| | | end; |
| | | end; |
| | | end; |
| | | end |
| | | Else //不分份數 |
| | | begin |
| | |
| | | //ReNameContext(iISB.FileName,OldName,NewName); |
| | | end; |
| | | end; |
| | | //ShowMessage('KKKK'); |
| | | ReSortFileName(ExtractFilePath(iISB.FileName)); |
| | | DrawDocItem2(MytreeNode1,NowCaseno); |
| | | ClearErrini(NowCaseno,MyTreeNode1); //清掉檢核記錄 |
| | |
| | | finally |
| | | DataLoading(False,False); |
| | | DocListForm.Free; |
| | | ST1.Free; |
| | | end; |
| | | |
| | | end; |
| | |
| | | DocListForm := TDocListForm.Create(self); |
| | | try |
| | | InitialLanguage(DocListForm); //載入多國語言 |
| | | DocListForm.CheckBox1.Visible:=True; |
| | | for i := 1 to FORM_INF_List.Count - 1 do |
| | | begin |
| | | NewFormID := GetSQLData(FORM_INF_List,'T1.FORM_ID',i); |
| | |
| | | end; |
| | | FormCode := FileName2FormCode(S.Strings[n]); |
| | | //Showmessage('1:'+version+','+FormCode2Version(FormCode)+','+DocNo+','+FormCode2DocNo(FormCode)+','+iPage+','+FormCode2Page(FormCode)); |
| | | LogFile1.LogToFile(logTimeString+'caseno='+CaseID+','+version+','+FormCode2Version(FormCode)+','+DocNo+','+FormCode2DocNo(FormCode)+','+iPage+','+FormCode2Page(FormCode)); |
| | | LogFile1.LogToFile(logTimeString+'CheckCaseDocNoPage caseno='+CaseID+','+version+','+FormCode2Version(FormCode)+','+DocNo+','+FormCode2DocNo(FormCode)+','+iPage+','+FormCode2Page(FormCode)); |
| | | if (version = FormCode2Version(FormCode)) and (DocNo = FormCode2DocNo(FormCode)) and (ipage = FormCode2Page(FormCode)) then |
| | | begin |
| | | LogFile1.LogToFile(logTimeString+'CheckCaseDocNoPage caseno='+CaseID+','+version+','+FormCode2Version(FormCode)+','+DocNo+','+FormCode2DocNo(FormCode)+','+iPage+','+FormCode2Page(FormCode)); |
| | | //Showmessage(version+','+DocNo+',iPage='+iPage); |
| | | //Showmessage(inttostr(Count+1)); |
| | | Inc(Count); |
| | |
| | | Result := False; |
| | | Exit; |
| | | end |
| | | Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | Else if Pos('<script type="text/javascript" src="scripts/IMGPS00/login.js"></script>',Memo1.Lines.Text) > 0 then |
| | | begin |
| | | HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | |
| | | FormID : String; |
| | | OldFile,NewFile:String; |
| | | Ext : String; |
| | | ST1:TStringList; |
| | | begin |
| | | ST1:=TStringList.Create; |
| | | OldFileList := TStringlist.Create; |
| | | NewFileList := TStringlist.Create; |
| | | try |
| | |
| | | NewDocDir := FindLastestDocDir(CaseID,NewDocNo); |
| | | if NewDocDir = '' then |
| | | NewDocDir := NewDocNo; |
| | | //ShowMessage('NewDocDir='+NewDocDir); |
| | | if DocNoNeedDiv(NewDocNo) and (FormCode2Page(NewFormID)='01') then |
| | | begin |
| | | NewDocDir := DocNo2DocNoDir(ImageSavePath+CaseID+'\',NewDocNo); |
| | | end |
| | | else |
| | | begin |
| | | ST1.Clear; |
| | | if FileExists(ImageSavePath + NowCaseno+'\'+NewDocDir+'\Context.dat') then |
| | | begin |
| | | ST1.LoadFromFile(ImageSavePath + NowCaseno+'\'+NewDocDir+'\Context.dat'); |
| | | if ISExistImg(ImageSavePath + NowCaseno+'\'+NewDocDir+'\'+ST1.Strings[0]) then |
| | | begin |
| | | NewDocDir := DocNo2DocNoDir(ImageSavePath + NowCaseno+'\',NewDocNo); |
| | | end; |
| | | end; |
| | | end; |
| | | if Not DirectoryExists(ImageSavePath+CaseID+'\'+NewDocDir) then |
| | | begin |
| | | MkDir(ImageSavePath+CaseID+'\'+NewDocDir); |
| | |
| | | finally |
| | | OldFileList.Free; |
| | | NewFileList.Free; |
| | | ST1.Free; |
| | | end; |
| | | end; |
| | | |
| | |
| | | S.LoadFromFile(ImageSavePath + CaseID+'\upload\Context.dat'); |
| | | for i := 0 to S.Count - 1 do |
| | | begin |
| | | LogFile1.LogToFile(logTimeString+S.Strings[i]+' ISExistImg='+BoolToStr(ISExistImg(ImageSavePath+CaseID+'\upload\'+S.Strings[i]),true)); |
| | | LogFile1.LogToFile(logTimeString+S.Strings[i]+' reSizeExistImgList='+BoolToStr(reSizeExistImgList.IndexOf(LoadFileGetMD5(ImageSavePath+CaseID+'\upload\'+S.Strings[i]))<>-1,true)); |
| | | if FWH_category='N' then |
| | | begin |
| | | if ISExistImg(ImageSavePath+CaseID+'\upload\'+S.Strings[i]) then |
| | | if (ISExistImg(ImageSavePath+CaseID+'\upload\'+S.Strings[i])) |
| | | or (reSizeExistImgList.IndexOf(LoadFileGetMD5(ImageSavePath+CaseID+'\upload\'+S.Strings[i]))<>-1) then |
| | | begin |
| | | Continue; |
| | | end; |
| | |
| | | |
| | | end; |
| | | //ShowMessage('MainFormID='+MainFormID); |
| | | LogFile1.LogToFile(logTimeString+' '+CaseID+' '+'MainFormID='+MainFormID); |
| | | LogFile1.LogToFile(logTimeString+' '+FModeName+' '+CaseID+' '+'MainFormID='+MainFormID); |
| | | if MainFormID = ''then |
| | | begin |
| | | //20131203 yuu說不檢查這個,先拿掉 20170315 楷琳說未歸類要擋 20170726 因此有檢查必要FormID 所以 可以拿掉 |
| | |
| | | LogFile1.LogToFile(logTimeString+'最大頁數B段 '+CaseID+' '+'OMRFileList.Text='+OMRFileList.Text); |
| | | For i := 0 to OMRFileList.Count - 1 do |
| | | begin |
| | | if FModeName='異動件' then Continue; |
| | | |
| | | if FWH_category='N' then |
| | | begin |