| | |
| | | DivPageFormIDList:TStringlist; //要當分案頁表單清單 |
| | | LastInitFormidList:TStringList; |
| | | LastAddFormidList:TstringList; |
| | | SampleFormIDList:TStringList; //20170627 已存在範本的formid |
| | | //********清單區******** |
| | | |
| | | //********顯示區******** |
| | |
| | | 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; |
| | |
| | | DivPageFormIDList.Free; //要當分案頁表單清單 |
| | | LastInitFormidList.Free; |
| | | LastAddFormidList.Free; |
| | | SampleFormIDList.Free; |
| | | //********清單區******** |
| | | if FEvents <> nil then FEvents.OnDestroy; |
| | | end; |
| | |
| | | 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('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; |
| | |
| | | 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 |
| | |
| | | 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 文件資訊 |
| | |
| | | ShowText := CaseID+_Msg('資料上傳中,請稍候'); |
| | | DataLoading(True,True); |
| | | //ShowMessage('NNNNN'); |
| | | //ShowMessage('退出'); |
| | | //Exit; |
| | | If Not TransCaseID(TransPath,CaseID,True) Then //傳送案件 |
| | | begin |
| | | DataLoading(False,False); |