unit u_op_seae_tdqr; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, bsSkinCtrls, ExtCtrls, dxExEdtr, dxCntner, dxTL,inifiles, dxDBCtrl, dxDBGrid, ComCtrls, Grids, DBGridEh, DB, ADODB, Menus, dxmdaset, kbmMemTable, RxMemDS, dxDBTLCl, dxGrClms, DBCtrls, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxButtonEdit, cxDBEdit, Mask, RxRichEd, bsSkinBoxCtrls, bsdbctrls, wwdbedit, Wwdotdot, Wwdbcomb, wwdbdatetimepicker; type Tfrm_op_seae_tdqr = class(TForm) bsSkinPanel9: TbsSkinPanel; Label130: TLabel; Label131: TLabel; Edit4: TEdit; Edit2: TEdit; bsSkinButton44: TbsSkinButton; dsrtd_qr: TDataSource; qrytd_qr: TADOQuery; bsSkinPanel1: TbsSkinPanel; bsSkinButton7: TbsSkinButton; bsSkinButton6: TbsSkinButton; bsSkinButton5: TbsSkinButton; bsSkinButton38: TbsSkinButton; Notebook1: TNotebook; dxDBGrid1: TdxDBGrid; bsSkinPanel2: TbsSkinPanel; bsSkinPanel3: TbsSkinPanel; dxDBGrid1Column1: TdxDBGridColumn; dxDBGrid1Column2: TdxDBGridColumn; dxDBGrid1Column3: TdxDBGridColumn; dxDBGrid1Column4: TdxDBGridColumn; dxDBGrid1Column5: TdxDBGridColumn; dxDBGrid1Column6: TdxDBGridColumn; dxDBGrid1Column7: TdxDBGridColumn; dxDBGrid1Column8: TdxDBGridColumn; dxDBGrid1Column9: TdxDBGridColumn; bsSkinSplitter1: TbsSkinSplitter; bsSkinDBMemo21: TbsSkinDBMemo2; bsSkinMemo21: TbsSkinMemo2; bsSkinButton1: TbsSkinButton; dxDBGrid1Column10: TdxDBGridColumn; Label10: TLabel; Label5: TLabel; wwDBDateTimePicker1: TwwDBDateTimePicker; wwDBDateTimePicker2: TwwDBDateTimePicker; wwDBComboBox6: TwwDBComboBox; wwDBComboBox18: TwwDBComboBox; Label1: TLabel; Edit1: TEdit; procedure bsSkinButton5Click(Sender: TObject); procedure bsSkinButton7Click(Sender: TObject); procedure bsSkinButton6Click(Sender: TObject); procedure bsSkinButton38Click(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure bsSkinPanel1Resize(Sender: TObject); procedure FormShow(Sender: TObject); procedure dsrtd_qrDataChange(Sender: TObject; Field: TField); procedure pop0Click(Sender: TObject); procedure pop2Click(Sender: TObject); procedure pop3Click(Sender: TObject); procedure bsSkinButton44Click(Sender: TObject); procedure bsSkinButton1Click(Sender: TObject); private { Private declarations } procedure setdiffcolor ; public { Public declarations } end; var frm_op_seae_tdqr: Tfrm_op_seae_tdqr; implementation {$R *.dfm} uses u_main,my_sys_function, u_op_seae_assistant, u_data_share, u_op_seaetd_query,u_op_seae_difftd, u_send_msg; procedure Tfrm_op_seae_tdqr.bsSkinButton5Click(Sender: TObject); begin close ; end; procedure Tfrm_op_seae_tdqr.bsSkinButton7Click(Sender: TObject); begin qrytd_qr.Prior ; end; procedure Tfrm_op_seae_tdqr.bsSkinButton6Click(Sender: TObject); begin qrytd_qr.Next ; end; procedure Tfrm_op_seae_tdqr.bsSkinButton38Click(Sender: TObject); begin if bsSkinButton38.Caption='显示报文' then begin bsSkinButton38.Caption:='返回列表'; Notebook1.PageIndex:=0; exit; end; if bsSkinButton38.Caption='返回列表' then begin bsSkinButton38.Caption:='显示报文'; Notebook1.PageIndex:=1; exit; end; end; procedure Tfrm_op_seae_tdqr.FormClose(Sender: TObject; var Action: TCloseAction); begin frm_op_seae_tdqr.Hide; frm_op_seae_tdqr.ManualFloat(frm_op_seae_tdqr.BoundsRect ); frm_main.freeTabs('frm_op_seae_tdqr'); action:=cafree; frm_op_seae_tdqr:=nil; end; procedure Tfrm_op_seae_tdqr.bsSkinPanel1Resize(Sender: TObject); var i:integer; begin end; procedure Tfrm_op_seae_tdqr.FormShow(Sender: TObject); begin Notebook1.PageIndex:=1 ; with qrytd_qr,sql do begin close ; clear ; add('SELECT * from t_op_Edi_Log '); add('where 1=2'); open; end; wwDBComboBox18.text:='大于'; wwDBComboBox6.text:='小于'; end; procedure Tfrm_op_seae_tdqr.dsrtd_qrDataChange(Sender: TObject; Field: TField); begin setdiffcolor ; end; procedure Tfrm_op_seae_tdqr.pop0Click(Sender: TObject); begin //撤销提交确认 end; procedure Tfrm_op_seae_tdqr.pop2Click(Sender: TObject); begin // 接受客户确认 end; procedure Tfrm_op_seae_tdqr.pop3Click(Sender: TObject); begin // 批准客户修改 end; procedure Tfrm_op_seae_tdqr.setdiffcolor; begin end; procedure Tfrm_op_seae_tdqr.bsSkinButton44Click(Sender: TObject); var str:widestring; begin str:=''; str:=query_tiaojian(1,str,'t_op_Edi_Log.委托编号','模糊',Edit4.text); str:=query_tiaojian(1,str,'t_op_Edi_Log.主提单号','模糊',Edit2.text); str:=query_tiaojian(1,str,'t_op_Edi_Log.开船日期',wwDBComboBox18.text,wwDBDateTimePicker1.text); str:=query_tiaojian(1,str,'t_op_Edi_Log.开船日期',wwDBComboBox6.text,wwDBDateTimePicker2.text); if trim(str)='' then begin str:='where '+open_data('0001','t_op_Edi_Log.录入人','no','no','no','no'); end else begin str:=str+' and '+open_data('0001','t_op_Edi_Log.录入人','no','no','no','no'); end; if Trim(Edit1.Text)<>'' then begin str:='select t_op_Edi_Log.* from t_op_Edi_Log left Join t_op_seae on t_op_seae.主提单号= t_op_Edi_Log.主提单号 ' +str; str:=str+ ' and t_op_seae.客服员='+''''+Edit1.Text+''''; end else begin str:='select t_op_Edi_Log.* from t_op_Edi_Log ' +str; end; qrytd_qr.close; qrytd_qr.sql.clear; qrytd_qr.sql.add(str); qrytd_qr.Open; if qrytd_qr.IsEmpty then begin showmessage('没有检索出所需数据!!'); exit; end; end; procedure Tfrm_op_seae_tdqr.bsSkinButton1Click(Sender: TObject); var str:Tstringlist; i:Integer; begin exit; str:=Tstringlist.Create; str.Clear; str.Text:=qrytd_qr.FieldByName('EDI报文').Value; for i:=0 to str.Count-1 do begin if Pos('UNB+UNOC:2+',str[i])>0 then begin bsSkinMemo21.Lines.Add(StringReplace(str[i], 'UNB+UNOC:2', '发送方标识',[rfReplaceAll, rfIgnoreCase])); end; if Pos('UNH+',str[i])>0 then begin bsSkinMemo21.Lines.Add(StringReplace(str[i], 'UNH+', '信息编号',[rfReplaceAll, rfIgnoreCase])); end; end; // bsSkinMemo21.Lines.Text:=str.Text; end; end.