unit u_op_seae_card; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, dxExEdtr, XPMenu, Menus, dxDBTLCl, dxGrClms, dxDBCtrl, dxDBGrid, dxTL, dxCntner, DB, ADODB, Mask, wwdbedit, Wwdotdot, Wwdbcomb, wwdblook, RxLookup, wwdbdatetimepicker, StdCtrls, bsSkinCtrls, ExtCtrls; type Tfrm_op_seae_card = class(TForm) Panel2: TPanel; Panel3: TPanel; bsSkinButton10: TbsSkinButton; bsSkinButton6: TbsSkinButton; bsSkinButton9: TbsSkinButton; bsSkinButton5: TbsSkinButton; bsSkinPanel1: TbsSkinPanel; Label6: TLabel; Label3: TLabel; Label1: TLabel; Label2: TLabel; Label10: TLabel; Label5: TLabel; Label9: TLabel; Label8: TLabel; Label11: TLabel; Label30: TLabel; Label125: TLabel; Label124: TLabel; Label16: TLabel; Label7: TLabel; Label4: TLabel; Label12: TLabel; Edit1: TEdit; Edit4: TEdit; Edit2: TEdit; Edit3: TEdit; wwDBDateTimePicker1: TwwDBDateTimePicker; wwDBDateTimePicker2: TwwDBDateTimePicker; RxDBLookupCombo2: TRxDBLookupCombo; wwDBDateTimePicker3: TwwDBDateTimePicker; wwDBDateTimePicker4: TwwDBDateTimePicker; Edit7: TEdit; wwDBLookupCombo49: TwwDBLookupCombo; wwDBLookupCombo52: TwwDBLookupCombo; RxDBLookupCombo6: TRxDBLookupCombo; wwDBComboBox1: TwwDBComboBox; wwDBDateTimePicker5: TwwDBDateTimePicker; wwDBDateTimePicker6: TwwDBDateTimePicker; t_op_seae: TADOQuery; t_op_seae1: TDataSource; dxDBGrid1: TdxDBGrid; dxDBGrid1Column84: TdxDBGridCheckColumn; dxDBGrid1Column85: TdxDBGridColumn; dxDBGrid1Column1: TdxDBGridMaskColumn; dxDBGrid1Column2: TdxDBGridMaskColumn; dxDBGrid1Column3: TdxDBGridMaskColumn; dxDBGrid1Column4: TdxDBGridMaskColumn; dxDBGrid1Column5: TdxDBGridMaskColumn; dxDBGrid1Column6: TdxDBGridMaskColumn; dxDBGrid1Column7: TdxDBGridMaskColumn; dxDBGrid1Column8: TdxDBGridMaskColumn; dxDBGrid1Column78: TdxDBGridColumn; dxDBGrid1Column9: TdxDBGridMaskColumn; dxDBGrid1Column10: TdxDBGridMaskColumn; dxDBGrid1Column11: TdxDBGridMaskColumn; dxDBGrid1Column12: TdxDBGridMaskColumn; dxDBGrid1Column13: TdxDBGridMaskColumn; dxDBGrid1Column14: TdxDBGridMaskColumn; dxDBGrid1Column15: TdxDBGridMaskColumn; dxDBGrid1Column16: TdxDBGridDateColumn; dxDBGrid1Column17: TdxDBGridDateColumn; dxDBGrid1Column18: TdxDBGridDateColumn; dxDBGrid1Column19: TdxDBGridMaskColumn; dxDBGrid1Column20: TdxDBGridMaskColumn; dxDBGrid1Column22: TdxDBGridDateColumn; dxDBGrid1Column23: TdxDBGridMaskColumn; dxDBGrid1Column24: TdxDBGridMaskColumn; dxDBGrid1Column25: TdxDBGridMaskColumn; dxDBGrid1Column26: TdxDBGridMaskColumn; dxDBGrid1Column27: TdxDBGridMaskColumn; dxDBGrid1Column28: TdxDBGridMaskColumn; dxDBGrid1Column29: TdxDBGridMaskColumn; dxDBGrid1Column30: TdxDBGridMaskColumn; dxDBGrid1Column31: TdxDBGridDateColumn; dxDBGrid1Column32: TdxDBGridMaskColumn; dxDBGrid1Column33: TdxDBGridMaskColumn; dxDBGrid1Column34: TdxDBGridMaskColumn; dxDBGrid1Column35: TdxDBGridMaskColumn; dxDBGrid1Column36: TdxDBGridMaskColumn; dxDBGrid1Column37: TdxDBGridMaskColumn; dxDBGrid1Column38: TdxDBGridMaskColumn; dxDBGrid1Column39: TdxDBGridColumn; dxDBGrid1Column40: TdxDBGridColumn; dxDBGrid11: TdxDBGridMaskColumn; dxDBGrid12: TdxDBGridMaskColumn; dxDBGrid13: TdxDBGridMaskColumn; dxDBGrid14: TdxDBGridMaskColumn; dxDBGrid15: TdxDBGridMaskColumn; dxDBGrid16: TdxDBGridMaskColumn; dxDBGrid17: TdxDBGridMaskColumn; dxDBGrid18: TdxDBGridMaskColumn; dxDBGrid19: TdxDBGridMaskColumn; dxDBGrid110: TdxDBGridMaskColumn; dxDBGrid111: TdxDBGridMaskColumn; dxDBGrid112: TdxDBGridMaskColumn; dxDBGrid113: TdxDBGridMaskColumn; dxDBGrid114: TdxDBGridMaskColumn; dxDBGrid115: TdxDBGridMaskColumn; dxDBGrid116: TdxDBGridMaskColumn; dxDBGrid117: TdxDBGridMaskColumn; dxDBGrid118: TdxDBGridMaskColumn; dxDBGrid119: TdxDBGridMaskColumn; dxDBGrid120: TdxDBGridMaskColumn; dxDBGrid1Column61: TdxDBGridMaskColumn; dxDBGrid1TEU: TdxDBGridMaskColumn; dxDBGrid1Column63: TdxDBGridMaskColumn; dxDBGrid1Column64: TdxDBGridMaskColumn; dxDBGrid1Column65: TdxDBGridDateColumn; dxDBGrid1Column66: TdxDBGridMaskColumn; dxDBGrid1Column67: TdxDBGridMaskColumn; dxDBGrid1Column72: TdxDBGridMaskColumn; dxDBGrid1Column68: TdxDBGridMaskColumn; dxDBGrid1Column69: TdxDBGridMaskColumn; dxDBGrid1Column70: TdxDBGridMaskColumn; dxDBGrid1Column74: TdxDBGridMaskColumn; dxDBGrid1Column75: TdxDBGridMaskColumn; dxDBGrid1Column73: TdxDBGridColumn; dxDBGrid1Column76: TdxDBGridColumn; dxDBGrid1Column77: TdxDBGridCheckColumn; dxDBGrid1Column79: TdxDBGridColumn; dxDBGrid1Column80: TdxDBGridColumn; dxDBGrid1Column81: TdxDBGridColumn; dxDBGrid1Column86: TdxDBGridCheckColumn; dxDBGrid1Column87: TdxDBGridCheckColumn; dxDBGrid1Column88: TdxDBGridColumn; PopupMenu2: TPopupMenu; N10: TMenuItem; N11: TMenuItem; N14: TMenuItem; N13: TMenuItem; N12: TMenuItem; N15: TMenuItem; N16: TMenuItem; XPMenu1: TXPMenu; t_op_seaesel: TADOQuery; ds_op_seaesel1: TDataSource; pm1: TPopupMenu; N1: TMenuItem; N2: TMenuItem; N3: TMenuItem; dxDBGrid1Column89: TdxDBGridColumn; dxDBGrid1Column90: TdxDBGridColumn; dxDBGrid1Column91: TdxDBGridColumn; dxDBGrid1Column92: TdxDBGridColumn; dxDBGrid1Column94: TdxDBGridColumn; dxDBGrid1Column96: TdxDBGridColumn; dxDBGrid1Column97: TdxDBGridColumn; Label13: TLabel; RxDBLookupCombo1: TRxDBLookupCombo; Label14: TLabel; wwDBDateTimePicker7: TwwDBDateTimePicker; Label15: TLabel; wwDBDateTimePicker8: TwwDBDateTimePicker; Label17: TLabel; wwDBDateTimePicker9: TwwDBDateTimePicker; Label18: TLabel; wwDBDateTimePicker10: TwwDBDateTimePicker; wwDBDateTimePicker11: TwwDBDateTimePicker; Label19: TLabel; Label20: TLabel; wwDBDateTimePicker12: TwwDBDateTimePicker; wwDBComboBox2: TwwDBComboBox; Label21: TLabel; bsSkinButton11: TbsSkinButton; PopupMenu1: TPopupMenu; N9: TMenuItem; MenuItem4: TMenuItem; N17: TMenuItem; MenuItem5: TMenuItem; N18: TMenuItem; MenuItem6: TMenuItem; MenuItem7: TMenuItem; MenuItem8: TMenuItem; N19: TMenuItem; N20: TMenuItem; N21: TMenuItem; N22: TMenuItem; N23: TMenuItem; MenuItem9: TMenuItem; MenuItem10: TMenuItem; N24: TMenuItem; N25: TMenuItem; N26: TMenuItem; N27: TMenuItem; N28: TMenuItem; dxDBGrid1Column93: TdxDBGridCheckColumn; dxDBGrid1Column95: TdxDBGridCheckColumn; Label22: TLabel; Edit5: TEdit; Label23: TLabel; RxDBLookupCombo3: TRxDBLookupCombo; Label24: TLabel; RxDBLookupCombo4: TRxDBLookupCombo; Edit6: TEdit; Label25: TLabel; N4: TMenuItem; N5: TMenuItem; N6: TMenuItem; N7: TMenuItem; N8: TMenuItem; N29: TMenuItem; N30: TMenuItem; N31: TMenuItem; N32: TMenuItem; dxDBGrid1Column98: TdxDBGridColumn; dxDBGrid1Column99: TdxDBGridColumn; dxDBGrid1Column100: TdxDBGridColumn; dxDBGrid1Column101: TdxDBGridColumn; dxDBGrid1Column102: TdxDBGridColumn; Label26: TLabel; RxDBLookupCombo5: TRxDBLookupCombo; RxDBLookupCombo7: TRxDBLookupCombo; Label27: TLabel; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure bsSkinButton5Click(Sender: TObject); procedure bsSkinButton10Click(Sender: TObject); procedure bsSkinButton6Click(Sender: TObject); procedure dxDBGrid1ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); procedure N10Click(Sender: TObject); procedure N14Click(Sender: TObject); procedure N12Click(Sender: TObject); procedure N16Click(Sender: TObject); procedure FormShow(Sender: TObject); procedure Edit1KeyPress(Sender: TObject; var Key: Char); procedure bsSkinButton13Click(Sender: TObject); procedure bsSkinButton1Click(Sender: TObject); procedure N3Click(Sender: TObject); procedure N1Click(Sender: TObject); procedure bsSkinButton9Click(Sender: TObject); procedure bsSkinButton11Click(Sender: TObject); procedure MenuItem4Click(Sender: TObject); procedure MenuItem5Click(Sender: TObject); procedure MenuItem6Click(Sender: TObject); procedure N19Click(Sender: TObject); procedure N21Click(Sender: TObject); procedure N23Click(Sender: TObject); procedure N24Click(Sender: TObject); procedure N26Click(Sender: TObject); procedure N28Click(Sender: TObject); procedure N4Click(Sender: TObject); procedure N5Click(Sender: TObject); procedure N6Click(Sender: TObject); procedure N7Click(Sender: TObject); procedure N8Click(Sender: TObject); procedure N29Click(Sender: TObject); procedure N30Click(Sender: TObject); procedure N31Click(Sender: TObject); procedure N32Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frm_op_seae_card: Tfrm_op_seae_card; implementation uses my_sys_function, u_main, u_data_share; {$R *.dfm} procedure Tfrm_op_seae_card.FormClose(Sender: TObject; var Action: TCloseAction); begin savereggrid(dxdbgrid1,caption); frm_op_seae_card.Hide; frm_op_seae_card.ManualFloat(frm_op_seae_card.BoundsRect ); frm_main.freeTabs('frm_op_seae_card'); action:=cafree; frm_op_seae_card:=nil; end; procedure Tfrm_op_seae_card.bsSkinButton5Click(Sender: TObject); begin close; end; procedure Tfrm_op_seae_card.bsSkinButton10Click(Sender: TObject); var str:widestring; begin str:='where 1=1'; if (wwDBDateTimePicker5.text<>'')or(wwDBDateTimePicker6.text<>'') then begin if wwDBDateTimePicker5.text<>'' then str:=str+' and 接单日期>='+''''+wwDBDateTimePicker5.text+''''; if wwDBDateTimePicker6.text<>'' then str:=str+' and 接单日期<='+''''+wwDBDateTimePicker6.text+''''; end; if (wwDBDateTimePicker7.text<>'')or(wwDBDateTimePicker8.text<>'') then begin if wwDBDateTimePicker7.text<>'' then str:=str+' and 送单日期>='+''''+wwDBDateTimePicker7.text+''''; if wwDBDateTimePicker8.text<>'' then str:=str+' and 送单日期<='+''''+wwDBDateTimePicker8.text+''''; end; if (wwDBDateTimePicker9.text<>'')or(wwDBDateTimePicker10.text<>'') then begin str:=str+' and 是否回单=1'; if wwDBDateTimePicker9.text<>'' then str:=str+' and 回单日期>='+''''+wwDBDateTimePicker9.text+''''; if wwDBDateTimePicker10.text<>'' then str:=str+' and 回单日期<='+''''+wwDBDateTimePicker10.text+''''; end else begin if wwDBComboBox1.text='没有回单' then str:=str+' and 是否回单=0'; if wwDBComboBox1.text='已经回单' then str:=str+' and 是否回单=1'; end; if (wwDBDateTimePicker11.text<>'')or(wwDBDateTimePicker12.text<>'') then begin str:=str+' and 是否还单=1'; if wwDBDateTimePicker11.text<>'' then str:=str+' and 还单日期>='+''''+wwDBDateTimePicker11.text+''''; if wwDBDateTimePicker12.text<>'' then str:=str+' and 还单日期<='+''''+wwDBDateTimePicker12.text+''''; end else begin if wwDBComboBox2.text='没有还单' then str:=str+' and 是否还单=0'; if wwDBComboBox2.text='已经还单' then str:=str+' and 是否还单=1'; end; if RxDBLookupCombo1.DisplayValues[1]<>''then str:=str+' and 单证名称='+''''+RxDBLookupCombo1.DisplayValues[1]+''''; if Edit1.text<>''then str:=str+' and 业务编号 like '+''''+'%'+Edit1.text+'%'+''''; if Edit4.text<>''then str:=str+' and 委托编号 like '+''''+'%'+Edit4.text+'%'+''''; if Edit2.text<>''then str:=str+' and 主提单号 like '+''''+'%'+Edit2.text+'%'+''''; if Edit3.text<>''then str:=str+' and 分提单号 like '+''''+'%'+Edit3.text+'%'+''''; if Edit5.text<>''then str:=str+' and 单证号码 like '+''''+'%'+Edit5.text+'%'+''''; if Edit6.text<>''then str:=str+' and 快递号 like '+''''+'%'+Edit6.text+'%'+''''; if wwDBDateTimePicker1.text<>''then str:=str+' and 开船日期>='+''''+wwDBDateTimePicker1.text+''''; if wwDBDateTimePicker2.text<>''then str:=str+' and 开船日期<='+''''+wwDBDateTimePicker2.text+''''; if wwDBDateTimePicker3.text<>''then str:=str+' and 会计期间>='+''''+wwDBDateTimePicker3.text+''''; if wwDBDateTimePicker4.text<>''then str:=str+' and 会计期间<='+''''+wwDBDateTimePicker4.text+''''; if RxDBLookupCombo2.DisplayValues[1]<>''then str:=str+' and 委托单位='+''''+RxDBLookupCombo2.DisplayValues[1]+''''; if RxDBLookupCombo3.DisplayValues[1]<>''then str:=str+' and 经营单位='+''''+RxDBLookupCombo3.DisplayValues[1]+''''; if RxDBLookupCombo4.DisplayValues[1]<>''then str:=str+' and 快递公司='+''''+RxDBLookupCombo4.DisplayValues[1]+''''; if RxDBLookupCombo5.DisplayValues[1]<>''then str:=str+' and 代理公司='+''''+RxDBLookupCombo5.DisplayValues[1]+''''; if RxDBLookupCombo7.DisplayValues[1]<>''then str:=str+' and 单证经营单位='+''''+RxDBLookupCombo7.DisplayValues[1]+''''; if RxDBLookupCombo6.DisplayValues[1]<>''then str:=str+' and 操作员='+''''+RxDBLookupCombo6.DisplayValues[1]+''''; if wwDBLookupCombo49.text<>''then str:=str+' and 船名 like '+''''+'%'+wwDBLookupCombo49.text+'%'+''''; if Edit7.text<>''then str:=str+' and 航次 like '+''''+'%'+Edit7.text+'%'+''''; if wwDBLookupCombo52.text<>''then str:=str+' and 卸货港 like '+''''+'%'+wwDBLookupCombo52.text+'%'+''''; t_op_seae.close; t_op_seae.sql.clear; t_op_seae.sql.add('select * from v_op_card_bscard '+str+' order by CA_ID'); t_op_seae.open; end; procedure Tfrm_op_seae_card.bsSkinButton6Click(Sender: TObject); begin Edit1.text:=''; Edit4.text:=''; Edit2.text:=''; Edit3.text:=''; Edit5.text:=''; wwDBDateTimePicker1.text:=''; wwDBDateTimePicker2.text:=''; RxDBLookupCombo2.ClearValue; wwDBDateTimePicker3.text:=''; wwDBDateTimePicker4.text:=''; wwDBLookupCombo49.text:=''; Edit7.text:=''; wwDBLookupCombo52.text:=''; RxDBLookupCombo6.ClearValue; wwDBComboBox1.text:=''; wwDBComboBox2.text:=''; wwDBDateTimePicker5.text:=''; wwDBDateTimePicker6.text:=''; wwDBDateTimePicker7.text:=''; wwDBDateTimePicker8.text:=''; wwDBDateTimePicker9.text:=''; wwDBDateTimePicker10.text:=''; wwDBDateTimePicker11.text:=''; wwDBDateTimePicker12.text:=''; end; procedure Tfrm_op_seae_card.dxDBGrid1ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort(Column,t_op_seae,'CA_ID'); end; procedure Tfrm_op_seae_card.N10Click(Sender: TObject); begin update_grid_view_no(dxdbgrid1); end; procedure Tfrm_op_seae_card.N14Click(Sender: TObject); begin update_grid_view_all(dxdbgrid1); end; procedure Tfrm_op_seae_card.N12Click(Sender: TObject); begin update_grid(dxdbgrid1,110); end; procedure Tfrm_op_seae_card.N16Click(Sender: TObject); begin grid_save_xls(dxdbgrid1); end; procedure Tfrm_op_seae_card.FormShow(Sender: TObject); begin loadreggrid(dxdbgrid1,true,caption); end; procedure Tfrm_op_seae_card.Edit1KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then begin key:=#0; frm_op_seae_card.bsSkinButton10Click(Sender); end; end; procedure Tfrm_op_seae_card.bsSkinButton13Click(Sender: TObject); begin if t_op_seae.IsEmpty then exit; if t_op_seae.FieldByName('是否签单').asboolean then begin showmessage('当前业务已经签单!!'); exit; end; { if t_op_seae.FieldByName('业务状态').asstring='业务封帐' then begin showmessage('当前业务已经封帐!!'); exit; end; } t_op_seae.Edit; t_op_seae['是否签单']:=1; t_op_seae['签回日期']:=date; t_op_seae.post; showmessage('确认签单成功!!'); end; procedure Tfrm_op_seae_card.bsSkinButton1Click(Sender: TObject); begin if t_op_seae.IsEmpty then exit; if not t_op_seae.FieldByName('是否签单').asboolean then begin showmessage('当前业务还没有签单!!'); exit; end; {if t_op_seae.FieldByName('业务状态').asstring='业务封帐' then begin showmessage('当前业务已经封帐!!'); exit; end; } t_op_seae.Edit; t_op_seae['是否签单']:=0; t_op_seae['签回日期']:=null; t_op_seae.post; showmessage('取消签单成功!!'); end; procedure Tfrm_op_seae_card.N3Click(Sender: TObject); var i:integer; str:widestring; begin if t_op_seae.IsEmpty then exit; if dxDBGrid1.SelectedCount>=0 then begin for i:=0 to dxDBGrid1.SelectedCount-1 do begin t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i])); if i=0 then str:='('+t_op_seae.fieldbyname('CA_ID').asstring else str:=str+','+t_op_seae.fieldbyname('CA_ID').asstring; end; end else begin str:='('+t_op_seae.fieldbyname('CA_ID').asstring; end; str:=str+')'; t_op_seaesel.close; t_op_seaesel.sql.clear; t_op_seaesel.sql.add('select * from v_op_card_bscard ' +'where CA_ID in '+str +' order by CA_ID'); t_op_seaesel.open; sys_print('海运出口单证管理',2,nil,nil,nil,nil,ds_op_seaesel1,nil,nil,nil,nil,nil,nil); end; procedure Tfrm_op_seae_card.N1Click(Sender: TObject); begin sys_print('海运出口单证管理',2,nil,nil,nil,nil,t_op_seae1,nil,nil,nil,nil,nil,nil); end; procedure Tfrm_op_seae_card.bsSkinButton9Click(Sender: TObject); var Pnt:Tpoint; begin Pnt:=bsSkinButton9.ClientToScreen(Point(0,bsSkinButton9.Height)); pm1.Popup(Pnt.x,Pnt.y); end; procedure Tfrm_op_seae_card.bsSkinButton11Click(Sender: TObject); var Pnt:Tpoint; begin Pnt:=bsSkinButton11.ClientToScreen(Point(0,bsSkinButton11.Height)); PopupMenu1.Popup(Pnt.x,Pnt.y); end; procedure Tfrm_op_seae_card.MenuItem4Click(Sender: TObject); begin if t_op_seae.isempty then exit; t_op_seae.Edit; t_op_seae['送单日期']:=date; t_op_seae.post; end; procedure Tfrm_op_seae_card.MenuItem5Click(Sender: TObject); var i:integer; begin if t_op_seae.isempty then exit; if dxDBGrid1.SelectedCount>=1 then begin for i:=0 to dxDBGrid1.SelectedCount-1 do begin t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i])); t_op_seae.Edit; t_op_seae['送单日期']:=date; t_op_seae.post; end; end else begin t_op_seae.Edit; t_op_seae['送单日期']:=date; t_op_seae.post; end; end; procedure Tfrm_op_seae_card.MenuItem6Click(Sender: TObject); begin if t_op_seae.isempty then exit; t_op_seae.first; while not t_op_seae.eof do begin t_op_seae.Edit; t_op_seae['送单日期']:=date; t_op_seae.post; t_op_seae.next; end; end; procedure Tfrm_op_seae_card.N19Click(Sender: TObject); begin if t_op_seae.isempty then exit; t_op_seae.Edit; t_op_seae['是否回单']:=1; t_op_seae['回单日期']:=date; t_op_seae.post; end; procedure Tfrm_op_seae_card.N21Click(Sender: TObject); var i:integer; begin if t_op_seae.isempty then exit; if dxDBGrid1.SelectedCount>=1 then begin for i:=0 to dxDBGrid1.SelectedCount-1 do begin t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i])); t_op_seae.Edit; t_op_seae['是否回单']:=1; t_op_seae['回单日期']:=date; t_op_seae.post; end; end else begin t_op_seae.Edit; t_op_seae['是否回单']:=1; t_op_seae['回单日期']:=date; t_op_seae.post; end; end; procedure Tfrm_op_seae_card.N23Click(Sender: TObject); begin if t_op_seae.isempty then exit; t_op_seae.first; while not t_op_seae.eof do begin t_op_seae.Edit; t_op_seae['是否回单']:=1; t_op_seae['回单日期']:=date; t_op_seae.post; t_op_seae.next; end; end; procedure Tfrm_op_seae_card.N24Click(Sender: TObject); begin if t_op_seae.isempty then exit; t_op_seae.Edit; t_op_seae['是否回单']:=1; t_op_seae['是否还单']:=1; t_op_seae['还单日期']:=date; t_op_seae.post; end; procedure Tfrm_op_seae_card.N26Click(Sender: TObject); var i:integer; begin if t_op_seae.isempty then exit; if dxDBGrid1.SelectedCount>=1 then begin for i:=0 to dxDBGrid1.SelectedCount-1 do begin t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i])); t_op_seae.Edit; t_op_seae['是否回单']:=1; t_op_seae['是否还单']:=1; t_op_seae['还单日期']:=date; t_op_seae.post; end; end else begin t_op_seae.Edit; t_op_seae['是否回单']:=1; t_op_seae['是否还单']:=1; t_op_seae['还单日期']:=date; t_op_seae.post; end; end; procedure Tfrm_op_seae_card.N28Click(Sender: TObject); begin if t_op_seae.isempty then exit; t_op_seae.first; while not t_op_seae.eof do begin t_op_seae.Edit; t_op_seae['是否回单']:=1; t_op_seae['是否还单']:=1; t_op_seae['还单日期']:=date; t_op_seae.post; t_op_seae.next; end; end; procedure Tfrm_op_seae_card.N4Click(Sender: TObject); begin if t_op_seae.isempty then exit; t_op_seae.Edit; t_op_seae['送单日期']:=null; t_op_seae.post; end; procedure Tfrm_op_seae_card.N5Click(Sender: TObject); var i:integer; begin if t_op_seae.isempty then exit; if dxDBGrid1.SelectedCount>=1 then begin for i:=0 to dxDBGrid1.SelectedCount-1 do begin t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i])); t_op_seae.Edit; t_op_seae['送单日期']:=null; t_op_seae.post; end; end else begin t_op_seae.Edit; t_op_seae['送单日期']:=null; t_op_seae.post; end; end; procedure Tfrm_op_seae_card.N6Click(Sender: TObject); begin if t_op_seae.isempty then exit; t_op_seae.first; while not t_op_seae.eof do begin t_op_seae.Edit; t_op_seae['送单日期']:=null; t_op_seae.post; t_op_seae.next; end; end; procedure Tfrm_op_seae_card.N7Click(Sender: TObject); begin if t_op_seae.isempty then exit; t_op_seae.Edit; t_op_seae['是否回单']:=0; t_op_seae['回单日期']:=null; t_op_seae.post; end; procedure Tfrm_op_seae_card.N8Click(Sender: TObject); var i:integer; begin if t_op_seae.isempty then exit; if dxDBGrid1.SelectedCount>=1 then begin for i:=0 to dxDBGrid1.SelectedCount-1 do begin t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i])); t_op_seae.Edit; t_op_seae['是否回单']:=0; t_op_seae['回单日期']:=null; t_op_seae.post; end; end else begin t_op_seae.Edit; t_op_seae['是否回单']:=0; t_op_seae['回单日期']:=null; t_op_seae.post; end; end; procedure Tfrm_op_seae_card.N29Click(Sender: TObject); begin if t_op_seae.isempty then exit; t_op_seae.first; while not t_op_seae.eof do begin t_op_seae.Edit; t_op_seae['是否回单']:=0; t_op_seae['回单日期']:=null; t_op_seae.post; t_op_seae.next; end; end; procedure Tfrm_op_seae_card.N30Click(Sender: TObject); begin if t_op_seae.isempty then exit; t_op_seae.Edit; t_op_seae['是否回单']:=0; t_op_seae['是否还单']:=0; t_op_seae['还单日期']:=null; t_op_seae.post; end; procedure Tfrm_op_seae_card.N31Click(Sender: TObject); var i:integer; begin if t_op_seae.isempty then exit; if dxDBGrid1.SelectedCount>=1 then begin for i:=0 to dxDBGrid1.SelectedCount-1 do begin t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i])); t_op_seae.Edit; t_op_seae['是否回单']:=0; t_op_seae['是否还单']:=0; t_op_seae['还单日期']:=null; t_op_seae.post; end; end else begin t_op_seae.Edit; t_op_seae['是否回单']:=0; t_op_seae['是否还单']:=0; t_op_seae['还单日期']:=null; t_op_seae.post; end; end; procedure Tfrm_op_seae_card.N32Click(Sender: TObject); begin if t_op_seae.isempty then exit; t_op_seae.first; while not t_op_seae.eof do begin t_op_seae.Edit; t_op_seae['是否回单']:=0; t_op_seae['是否还单']:=0; t_op_seae['还单日期']:=null; t_op_seae.post; t_op_seae.next; end; end; end.