| | |
| | | NowShowFileList : TStringlist; //目前顯示的影像清單 |
| | | NowSelectFileList : TStringlist; //目前被點選的影像清單 |
| | | GuideFormIDList : TStringlist; //要當導引頁表單清單 |
| | | DivPageFormIDList:TStringlist; //要當分案頁表單清單 |
| | | LastInitFormidList:TStringList; |
| | | LastAddFormidList:TstringList; |
| | | SampleFormIDList:TStringList; //20170627 已存在範本的formid |
| | | //********清單區******** |
| | | |
| | | //********顯示區******** |
| | |
| | | Has_Authorize :String; //是否有授權書影像 |
| | | AttName : String; //未歸類目錄名稱 |
| | | NowGuideFormID : String; |
| | | NowDivPageFormID:String; |
| | | |
| | | FirstDocDir : String; |
| | | |
| | |
| | | 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 FindFormCodePages(CaseID,FormCode:String):Integer; //計算案件裡FormID的頁數 |
| | | Function GetDataFormCodePages(FormCode:String):Integer; //取記錄的FormcID的頁數 |
| | | Procedure CaseReSize(CaseID:String); //案件的影像縮放 |
| | | Procedure ImageReSize(CaseID,FileName:String); //依十字定位點做縮放 |
| | | Procedure ImageReSize_FormID(CaseID,FileName:String); //依十字定位點做縮放 |
| | | Procedure ImageReSize_tmp(FormID,FileName:String); //依十字定位點做縮放(暫存檔) |
| | | Function TransCaseID(Path,CaseID:String;MainCase:Boolean):Boolean; //傳送案件 |
| | | Procedure NewTreeNodeRefresh; |
| | |
| | | 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; |
| | |
| | | Cust_DocNoList.Free; //自行定義文件名稱 |
| | | IN_WH_DocNoList.Free; //入庫的文件清單 |
| | | GuideFormIDList.Free; //要當導引頁表單清單 |
| | | |
| | | DivPageFormIDList.Free; //要當分案頁表單清單 |
| | | LastInitFormidList.Free; |
| | | LastAddFormidList.Free; |
| | | SampleFormIDList.Free; |
| | | //********清單區******** |
| | | if FEvents <> nil then FEvents.OnDestroy; |
| | | end; |
| | |
| | | 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 |
| | |
| | | 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); |
| | |
| | | var |
| | | SampleFormID : String; |
| | | SendData : String; |
| | | buttonSelected : Integer; |
| | | begin |
| | | ScanMode := smSample; |
| | | ClearView(1); |
| | |
| | | ShowText := _Msg('範本掃描中,請稍候'); |
| | | DataLoading(True,True); |
| | | 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 |
| | |
| | | //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); |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.Button4Click(Sender: TObject); |
| | |
| | | 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; |
| | |
| | | if FormID = '' then |
| | | begin |
| | | 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 //只找分案頁上的案件條碼 |
| | | //ShowMessage('FormID='+FormID); |
| | | if (FormID <>'') and FindDivFormCode(FormID) and (NowDivPageFormID <> '') Then //只找分案頁上的案件條碼 |
| | | begin |
| | | |
| | | ScanInfo.ImageCount := 0; |
| | | ClearView(1); |
| | | ContextList.Clear; |
| | |
| | | ClearCaseIndex; //清掉案件索引 |
| | | ScanCaseno := BarCode2CaseID; //取出案件編號 |
| | | NowGuideFormID := ''; |
| | | NowDivPageFormID :=''; |
| | | //ShowMessage('NowGuideFormID='+NowGuideFormID+#10#13+'FormID='+FormID+#10#13+'ScanCaseno='+ScanCaseno); |
| | | end; |
| | | if ScanCaseno = '' then //一開始都沒找到 |
| | | begin |
| | |
| | | Str2Dir(ScanPath); |
| | | |
| | | ScanDocDir := FindLastestDocDir(ScanCaseno,DocNo); |
| | | if DocNoNeedDiv(DocNo) then //要分份數 |
| | | |
| | | 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 |
| | |
| | | begin |
| | | ScanSaveFilename := ''; |
| | | FormID := BarCode2FormID; //取出FormID |
| | | if (FormID <> '') and ISGuideFormID(FormID) then |
| | | 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 //要分份數 |
| | | //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 //不分份數 |
| | |
| | | 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; |
| | |
| | | ServerTime := Copy(ServerDate,9,6); |
| | | ServerDate := Copy(ServerDate,1,8); |
| | | 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('閒置過久或被登出,請重新登入'); |
| | | Result := False; |
| | | Exit; |
| | | end; |
| | | |
| | | end; |
| | | |
| | | 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 |
| | |
| | | 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; //找到了...離開 |
| | | end; |
| | |
| | | For i := 0 to S.Count -1 do |
| | | begin |
| | | FileName := S.Strings[i]; |
| | | ImageReSize(CaseID,FileName); //依十字定位點做縮放 |
| | | ImageReSize_FormID(CaseID,FileName); //依十字定位點做縮放 |
| | | end; |
| | | finally |
| | | S.Free; |
| | | end; |
| | | end; |
| | | |
| | | Procedure TCB_IMGPSScanX.ImageReSize(CaseID,FileName:String); //依十字定位點做縮放 |
| | | Procedure TCB_IMGPSScanX.ImageReSize_FormID(CaseID,FileName:String); //依十字定位點做縮放 |
| | | var |
| | | FormID : String; |
| | | DH,DW : String; |
| | |
| | | DW := GetFindResult('T1.FORM_WIDTH'); |
| | | ANCHOR := UpperCase(GetFindResult('T1.ANCHOR')); |
| | | ANCHOR := Index2Anchor(ANCHOR); |
| | | //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); |
| | | //showmessage(ImageSavePath+CaseID+'\Upload\'+FileName); |
| | | S := TStringlist.Create; ///20110422拿掉 換成上傳才做 |
| | | if FileExists(ImageSavePath+CaseID+'\Upload\ReSize.dat') then |
| | | S.LoadFromFile(ImageSavePath+CaseID+'\Upload\ReSize.dat'); |
| | |
| | | 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; |
| | | 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'); |
| | |
| | | +'&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 |
| | |
| | | end; |
| | | end; |
| | | |
| | | 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; |
| | |
| | | OMRFormName := FormCode2FormName(CaseID,OMRFormCode); |
| | | Anchor := FormID2Anchor(OMRFormCode); |
| | | ///依十字定位點縮放//// |
| | | ImageReSize(CaseID,OMRFile); |
| | | ImageReSize_FormID(CaseID,OMRFile); |
| | | ////依十字定位點縮放//// |
| | | if not FileExists(CheckXmlPath+OMRFormCode+'.xml') then //沒有Xml就不用檢核 |
| | | Continue; |
| | |
| | | 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; |
| | |
| | | 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]; |
| | |
| | | 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('錯誤代碼:')+inttostr(HttpError.HttpErrorCode)+','+HttpError.HttpReason; |
| | |
| | | Exit; |
| | | end; |
| | | end; |
| | | |
| | | //ShowMessage(SendData); |
| | | //ShowMessage(Memo1.Lines.Text); |
| | | IF memo1.Lines.Strings[0] <> '0' Then |
| | | begin |
| | | HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1]; |
| | |
| | | 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(False,False); |
| | | Exit; |
| | | end; |
| | | |
| | | if FMode='SAMPLESCAN' then |
| | | begin |
| | | 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 文件資訊 |
| | |
| | | ImagePath := ImagePath + 'Scantemp\'; |
| | | ScaniniPath :=ImagePath+FWork_No+'\'+FUserUnit +'\'; |
| | | ImagePath := ImagePath + FWork_No+'\'+FUserUnit+'\'+FMode+'\'; |
| | | //ShowMessage('ImagePath='+ImagePath); |
| | | ImageSavePath := ImagePath; |
| | | str2dir(CheckXmlPath); |
| | | str2dir(SitePath); |
| | |
| | | |
| | | DataLoading(False,False); |
| | | //ShowMessage('初始話執行完成'); |
| | | //ShowMessage('GuideFormIDList='+GuideFormIDList.Text); |
| | | //ShowMessage('DivPageFormIDList='+DivPageFormIDList.Text); |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.Timer2Timer(Sender: TObject); |
| | |
| | | s.Free; |
| | | end; |
| | | end;} |
| | | if (FMode = 'NSCAN') then |
| | | if (FMode = 'NSCAN') or (FMode = 'DSCAN') then //20170406 待掃瞄也要問一下 |
| | | begin |
| | | /////訊問是否可上傳///// |
| | | CaseTrans := CaseAsk(CaseID); |
| | |
| | | ShowText := CaseID+_Msg('資料上傳中,請稍候'); |
| | | DataLoading(True,True); |
| | | //ShowMessage('NNNNN'); |
| | | //ShowMessage('退出'); |
| | | //Exit; |
| | | If Not TransCaseID(TransPath,CaseID,True) Then //傳送案件 |
| | | begin |
| | | DataLoading(False,False); |