You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

922 lines
29 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

unit u_op_seae_teshufandan;
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, ComCtrls,
bsSkinTabs, DBCtrls,DateUtils;
type
Tfrm_op_seae_teshufandan = class(TForm)
Panel2: TPanel;
Panel3: TPanel;
bsSkinButton10: TbsSkinButton;
bsSkinButton6: 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;
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;
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;
bsSkinButton13: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
PopupMenu2: TPopupMenu;
N16: TMenuItem;
XPMenu1: TXPMenu;
t_op_seaesel: TADOQuery;
ds_op_seaesel1: TDataSource;
pm1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
bsSkinPanel2: TbsSkinPanel;
bsSkinPanel3: TbsSkinPanel;
bsSkinButton2: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
t_op_bill: TADOQuery;
ds_op_bill1: TDataSource;
bsSkinPageControl1: TbsSkinPageControl;
bskntbsht1: TbsSkinTabSheet;
bskntbsht2: TbsSkinTabSheet;
dxDBGrid2: TdxDBGrid;
dxDBGrid2Column2: TdxDBGridColumn;
dxDBGrid2Column3: TdxDBGridColumn;
dxDBGrid2Column4: TdxDBGridColumn;
dxDBGrid2Column5: TdxDBGridColumn;
dxDBGrid2Column6: TdxDBGridColumn;
bsSkinPanel4: TbsSkinPanel;
dxDBGrid3: TdxDBGrid;
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
dxDBGridMaskColumn13: TdxDBGridMaskColumn;
dxDBGridMaskColumn14: TdxDBGridMaskColumn;
dxDBGridMaskColumn15: TdxDBGridMaskColumn;
dxDBGridDateColumn1: TdxDBGridDateColumn;
dxDBGridMaskColumn17: TdxDBGridMaskColumn;
dxDBGridMaskColumn24: TdxDBGridMaskColumn;
dxDBGridMaskColumn57: TdxDBGridMaskColumn;
dxDBGridMaskColumn58: TdxDBGridMaskColumn;
dxDBGridMaskColumn61: TdxDBGridMaskColumn;
PopupMenu1: TPopupMenu;
MenuItem1: TMenuItem;
RxDBLookupCombo4: TRxDBLookupCombo;
Label4: TLabel;
DBEdit9: TDBEdit;
DBEdit10: TDBEdit;
Label7: TLabel;
Label12: TLabel;
wwDBDateTimePicker5: TwwDBDateTimePicker;
PopupMenu3: TPopupMenu;
MenuItem2: TMenuItem;
dxDBGrid2Column7: TdxDBGridColumn;
Label13: TLabel;
DBEdit1: TDBEdit;
Label14: TLabel;
bsSkinPanel5: TbsSkinPanel;
Panel1: TPanel;
bsSkinButton11: TbsSkinButton;
Label17: TLabel;
wwDBDateTimePicker6: TwwDBDateTimePicker;
Label18: TLabel;
wwDBDateTimePicker7: TwwDBDateTimePicker;
Label19: TLabel;
RxDBLookupCombo1: TRxDBLookupCombo;
Label20: TLabel;
RxDBLookupCombo3: TRxDBLookupCombo;
dxDBGrid2Column8: TdxDBGridColumn;
dxDBGrid2Column9: TdxDBGridColumn;
dxDBGrid3Column12: TdxDBGridColumn;
dxDBGrid3Column13: TdxDBGridColumn;
dxDBGrid3Column14: TdxDBGridColumn;
dxDBGrid3Column15: TdxDBGridColumn;
Label21: TLabel;
Label22: TLabel;
wwDBDateTimePicker8: TwwDBDateTimePicker;
Label23: TLabel;
Label24: TLabel;
RxDBLookupCombo7: TRxDBLookupCombo;
wwDBDateTimePicker9: TwwDBDateTimePicker;
Label15: TLabel;
DBEdit2: TDBEdit;
Label25: TLabel;
DBEdit3: TDBEdit;
Label26: TLabel;
dxDBGrid2Column10: TdxDBGridColumn;
dxDBGrid2Column11: TdxDBGridColumn;
Label27: TLabel;
RxDBLookupCombo9: TRxDBLookupCombo;
bsSkinButton38: TbsSkinButton;
RxDBLookupCombo8: TRxDBLookupCombo;
dxDBGrid2Column12: TdxDBGridColumn;
dxDBGrid2Column13: TdxDBGridColumn;
dxDBGrid2Column14: TdxDBGridColumn;
Label28: TLabel;
DBMemo1: TDBMemo;
dxDBGrid1Column89: TdxDBGridColumn;
Label29: TLabel;
DBMemo2: TDBMemo;
RxDBLookupCombo5: TRxDBLookupCombo;
Label31: TLabel;
Label32: TLabel;
wwDBDateTimePicker10: TwwDBDateTimePicker;
RxDBLookupCombo10: TRxDBLookupCombo;
dxDBGrid2Column15: TdxDBGridColumn;
dxDBGrid2Column16: TdxDBGridColumn;
DBMemo3: TDBMemo;
DBMemo4: TDBMemo;
DBMemo5: TDBMemo;
RxDBLookupCombo11: TRxDBLookupCombo;
Label33: TLabel;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure N16Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure MenuItem2Click(Sender: TObject);
procedure t_op_billAfterInsert(DataSet: TDataSet);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure t_op_seaeselBeforeDelete(DataSet: TDataSet);
procedure t_op_billBeforeEdit(DataSet: TDataSet);
procedure t_op_billBeforeDelete(DataSet: TDataSet);
procedure t_op_seaeselBeforeEdit(DataSet: TDataSet);
procedure bsSkinButton38Click(Sender: TObject);
procedure RxDBLookupCombo8Enter(Sender: TObject);
procedure RxDBLookupCombo8Exit(Sender: TObject);
procedure dxDBGrid2Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure dxDBGrid3DblClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
function InsertBillStatus(BsNo:string):Boolean;
function DeleteBillStatus(BsNo,or_id:string):Boolean;
end;
var
frm_op_seae_teshufandan: Tfrm_op_seae_teshufandan;
implementation
uses my_sys_function, u_main, my_sys_chat;
{$R *.dfm}
function Tfrm_op_seae_teshufandan.InsertBillStatus(BsNo:string):Boolean;
var aAdoQuery:TAdoQuery;
begin
result:=False;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;Sql.Clear;
SQL.Add('select count(<28><><EFBFBD><EFBFBD>) c from t_op_fangdan');
SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=BsNo;
Open;
if aAdoQuery.FieldByName('c').AsInteger=0 then
begin
Close;Sql.Clear;
SQL.Add('Insert into t_op_fangdan (<28><><EFBFBD><EFBFBD>, <20>ŵ<EFBFBD>״̬,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)');
SQL.Add('values (:<3A><><EFBFBD><EFBFBD>,:<3A>ŵ<EFBFBD>״̬,:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=BsNo;
Parameters.ParamByName('<27>ŵ<EFBFBD>״̬').Value:='<27><><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>';
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=employee;
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=date;
ExecSQL;
end;
finally
aAdoQuery.Free;
end;
end;
function Tfrm_op_seae_teshufandan.DeleteBillStatus(BsNo,or_id:string):Boolean;
var aAdoQuery:TAdoQuery;
begin
result:=False;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
if BsNo<>'' then
begin
Close;Sql.Clear;
SQL.Add('delete from t_op_fangdan');
SQL.Add('Where '+BsNo+'');
ExecSQL;
end;
if or_id<>'' then
begin
Close;Sql.Clear;
SQL.Add('delete from t_op_seae_app');
SQL.Add('Where '+or_id+'');
ExecSQL;
end;
finally
aAdoQuery.Free;
end;
end;
procedure Tfrm_op_seae_teshufandan.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
savereggrid(dxdbgrid2,caption+'1');
frm_op_seae_teshufandan.Hide;
frm_op_seae_teshufandan.ManualFloat(frm_op_seae_teshufandan.BoundsRect );
frm_main.freeTabs('frm_op_seae_teshufandan');
action:=cafree;
frm_op_seae_teshufandan:=nil;
end;
procedure Tfrm_op_seae_teshufandan.bsSkinButton10Click(Sender: TObject);
var
str:widestring;
begin
str:='where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><>ͨ<EFBFBD><CDA8>''';
if Edit1.text<>''then
str:=str+' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
if Edit4.text<>''then
str:=str+' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit4.text+'%'+'''';
if Edit2.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit2.text+'%'+'''';
if Edit3.text<>''then
str:=str+' and <20><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD> like '+''''+'%'+Edit3.text+'%'+'''';
if wwDBDateTimePicker1.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
if wwDBDateTimePicker2.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
if wwDBDateTimePicker3.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='+''''+wwDBDateTimePicker3.text+'''';
if wwDBDateTimePicker4.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='+''''+wwDBDateTimePicker4.text+'''';
if RxDBLookupCombo2.DisplayValues[1]<>''then
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
if RxDBLookupCombo11.DisplayValue<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo11.DisplayValue+'''';
// if RxDBLookupCombo6.DisplayValues[1]<>''then
// str:=str+' and <20><><EFBFBD><EFBFBD>Ա='+''''+RxDBLookupCombo6.DisplayValues[1]+'''';
if wwDBLookupCombo49.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+wwDBLookupCombo49.text+'%'+'''';
if Edit7.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit7.text+'%'+'''';
if wwDBLookupCombo52.text<>''then
str:=str+' and ж<><D0B6><EFBFBD><EFBFBD> like '+''''+'%'+wwDBLookupCombo52.text+'%'+'''';
str:=str+'and <20><><EFBFBD><EFBFBD> not in (select <20><><EFBFBD><EFBFBD> from t_op_fangdan)';
str:=str+'and <20><><EFBFBD><EFBFBD> not in (select <20><><EFBFBD><EFBFBD> from t_op_state where ҵ<><D2B5>״̬=''<27>ᵥǩ<E1B5A5><C7A9>'')';
t_op_seae.close;
t_op_seae.sql.clear;
t_op_seae.sql.add('select * from t_op_seae '+str+default_sort(53,'t_op_seae','','desc'));
t_op_seae.open;
end;
procedure Tfrm_op_seae_teshufandan.bsSkinButton6Click(Sender: TObject);
begin
Edit1.text:='';
Edit4.text:='';
Edit2.text:='';
Edit3.text:='';
wwDBDateTimePicker1.text:='';
wwDBDateTimePicker2.text:='';
RxDBLookupCombo2.ClearValue;
wwDBDateTimePicker3.text:='';
wwDBDateTimePicker4.text:='';
wwDBLookupCombo49.text:='';
Edit7.text:='';
wwDBLookupCombo52.text:='';
RxDBLookupCombo6.ClearValue;
wwDBDateTimePicker5.text:='';
end;
procedure Tfrm_op_seae_teshufandan.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_op_seae,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_seae_teshufandan.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid2);
end;
procedure Tfrm_op_seae_teshufandan.FormShow(Sender: TObject);
begin
loadreggrid(dxdbgrid1,true,caption);
loadreggrid(dxdbgrid2,true,caption+'1');
RxDBLookupCombo1.Value:=employee;
wwDBDateTimePicker6.Date:=Date;
wwDBDateTimePicker7.Date:=Date;
t_op_bill.Close;
t_op_bill.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=employee;
t_op_bill.Open;
t_op_seaesel.Open;
end;
procedure Tfrm_op_seae_teshufandan.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('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+''''
else
str:=str+','+''''+t_op_seae.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+'''';
end;
end else begin
str:='('+''''+t_op_seae.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+'''';
end;
str:=str+')';
t_op_seaesel.close;
t_op_seaesel.sql.clear;
t_op_seaesel.sql.add('select * from t_op_seae '
+'where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in '+str
+default_sort(53,'t_op_seae','','desc'));
t_op_seaesel.open;
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>ǩ<EFBFBD><C7A9>',2,nil,nil,nil,nil,ds_op_seaesel1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_seae_teshufandan.N1Click(Sender: TObject);
var
i,StlDay,qty,moduleqty:integer;
aAdoQueryAmt,aAdoQuery,aAdoQuerycurAmt:TAdoQuery;
AEtd:TDateTime;
JFLX,FeeItems:string;
StlMonth:integer;
amt,usd,amt1,usd1:double;
begin
if t_op_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>employee then
begin
ShowMessage(t_op_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2BB><EFBFBD>޸<EFBFBD>');
exit;
end;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
begin
Close;Sql.Clear;
SQL.Add('Select <20><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ģʽ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_crm_client_sales');
SQL.Add('where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>=:aDate and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>''<27>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>''');
end;
if (t_op_bill.FieldByName('״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӣ<EFBFBD><D3A3><EFBFBD>');
exit;
end;
if t_op_bill.FieldByName('ί<>е<EFBFBD>λ').AsString='' then
begin
showmessage('ί<>е<EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>');
exit;
end;
if t_op_seae.IsEmpty then
exit;
if t_op_bill.IsEmpty then
exit;
bsSkinPageControl1.ActivePageIndex:=1;
aAdoQuerycurAmt:=CreateAdoQuery;
with aAdoQuerycurAmt do
begin
Close;SQL.Clear;
SQL.Add('select');
SQL.Add('SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN ''<27><>'' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when ''USD'' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END ) as USD ');
SQL.Add(',');
SQL.Add('SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN ''<27><>'' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when ''RMB'' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as RMB ');
SQL.Add('From t_ch_fee ');
SQL.Add('where t_ch_fee.<2E><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
end;
aAdoQueryAmt:=CreateAdoQuery;
with aAdoQueryAmt do
begin
Close;SQL.Clear;
SQL.Add('select');
SQL.Add('SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN ''<27><>'' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when ''USD'' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END ) as USD ');
SQL.Add(',');
SQL.Add('SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN ''<27><>'' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when ''RMB'' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as RMB ');
SQL.Add('From t_ch_fee ');
SQL.Add('Left Join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> ');
SQL.Add('where t_op_seae.ί<>е<EFBFBD>λ=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and t_ch_fee.<2E><><EFBFBD><EFBFBD>=''<27><>'' and t_ch_fee.<2E><><EFBFBD><EFBFBD><>t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
SQL.Add('and t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><=:ETD');
end;
frm_main.db.BeginTrans;
try
if dxDBGrid1.SelectedCount>=1 then
begin
for i:=0 to dxDBGrid1.SelectedCount-1 do
begin
t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
if (t_op_seae.fieldByName('ί<>е<EFBFBD>λ').AsString=t_op_bill.fieldByName('ί<>е<EFBFBD>λ').AsString)
and (not t_op_seaesel.Locate('<27><><EFBFBD><EFBFBD>',t_op_seae.fieldByName('<27><><EFBFBD><EFBFBD>').AsString,[])) then
begin
t_op_seaesel.Insert;
t_op_seaesel.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger:=t_op_bill.fieldByName('BILL_ID').AsInteger;
t_op_seaesel.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_seaesel.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_op_seaesel.FieldByName('ҵ<><D2B5>״̬').AsString:=t_op_seae.fieldByName('ҵ<><D2B5>״̬').AsString;
t_op_seaesel.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:=t_op_seae.fieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString;
t_op_seaesel.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_op_seaesel.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').Value:=t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'];
t_op_seaesel.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString:=t_op_seae.fieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString;
t_op_seaesel.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString:=t_op_seae.fieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString;
t_op_seaesel.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString:=t_op_seae.fieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString;
t_op_seaesel.FieldByName('ί<>е<EFBFBD>λ').AsString:=t_op_seae.fieldByName('ί<>е<EFBFBD>λ').AsString;
t_op_seaesel.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_seaesel.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_seaesel.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_op_seaesel.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldByName('ж<><D0B6><EFBFBD><EFBFBD>').AsString;
t_op_seaesel.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD>ʽ').AsString:=t_op_seae.fieldByName('ǩ<><C7A9><EFBFBD><EFBFBD>ʽ').AsString;
t_op_seaesel.FieldByName('<27><><EFBFBD><EFBFBD>Ա').AsString:=t_op_seae.fieldByName('<27><><EFBFBD><EFBFBD>Ա').AsString;
t_op_seaesel.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_op_seaesel.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString:=t_op_seae.fieldByName('<27><><EFBFBD><EFBFBD>˾').AsString;
t_op_seaesel.FieldByName('<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>').AsString:=t_op_seae.fieldByName('<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>').AsString;
t_op_seaesel.FieldByName('<27>ᵥǩ<E1B5A5><C7A9>״̬').AsString:=t_op_seae.fieldByName('<27>ᵥǩ<E1B5A5><C7A9>״̬').AsString;
t_op_seaesel.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_op_seaesel.FieldByName('<27><>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD>').Value:=t_op_seae.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>').AsString;
aAdoQuerycurAmt.Close;
aAdoQuerycurAmt.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae.fieldByName('<27><><EFBFBD><EFBFBD>').AsString;
aAdoQuerycurAmt.open;
t_op_seaesel.FieldByName('<27><><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD>RMB').Value:=aAdoQuerycurAmt.FieldByName('RMB').Value;
t_op_seaesel.FieldByName('<27><><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD>USD').Value:=aAdoQuerycurAmt.FieldByName('USD').Value;
t_op_seaesel.Post;
try
InsertBillStatus(t_op_seae.fieldByName('<27><><EFBFBD><EFBFBD>').AsString);
InsertSeaeStatus(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27><><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>',employee,FormatDateTime('YYYY-MM-DD',Now));
except
on e:exception do ShowMessage(e.message);
end;
end
else
begin
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>:'+t_op_bill.fieldByName('ί<>е<EFBFBD>λ').AsString+' ѡ<><D1A1><EFBFBD>ͻ<EFBFBD>:'+t_op_seae.fieldByName('ί<>е<EFBFBD>λ').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>Ȼ<EFBFBD><C8BB><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ܼ<EFBFBD><DCBC><EFBFBD>');
end;
end;
end;
t_op_bill.Edit;
t_op_bill.FieldByName('<27>˿<EFBFBD>RMB').Value:=0;
t_op_bill.FieldByName('<27>˿<EFBFBD>USD').Value:=0;
t_op_bill.Post;
aAdoQuery.Close;
aAdoQuery.Parameters.ParamByName('aDate').Value:=date;
aAdoQuery.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seae.fieldByName('ί<>е<EFBFBD>λ').AsString;
aAdoQuery.open;
if not aAdoQuery.IsEmpty then
JFLX:=aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString
else JFLX:='<27>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>';
if JFLX='<27>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>' then
begin
{
t_op_seaesel.First;
while not t_op_seaesel.Eof do
begin
if GetCrmsales(t_op_seaesel.fieldByName('<27><><EFBFBD><EFBFBD>').AsString,t_op_bill.fieldByName('ί<>е<EFBFBD>λ').AsString,JFLX,amt,usd) then
begin
amt1:=amt1+amt;
usd1:=usd1+usd;
end;
t_op_seaesel.Next;
end;
}
aAdoQueryAmt.Close;
aAdoQueryAmt.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seaesel.FieldByName('ί<>е<EFBFBD>λ').Value;
aAdoQueryAmt.Parameters.ParamByName('ETD').Value:=Date;
aAdoQueryAmt.Open;
t_op_bill.Edit;
t_op_bill.FieldByName('<27>˿<EFBFBD>RMB').Value:=aAdoQueryAmt.FieldByName('RMB').Value;
t_op_bill.FieldByName('<27>˿<EFBFBD>USD').Value:=aAdoQueryAmt.FieldByName('USD').Value;
t_op_bill.Post;
end
else
if GetCrmsales('',t_op_bill.fieldByName('ί<>е<EFBFBD>λ').AsString,'Լ<><D4BC>ʱ<EFBFBD><CAB1>',amt,usd,FeeItems) then
begin
t_op_bill.Edit;
t_op_bill.FieldByName('<27>˿<EFBFBD>RMB').Value:=amt;
t_op_bill.FieldByName('<27>˿<EFBFBD>USD').Value:=usd;
end;
if t_op_bill.state in [dsedit,dsinsert] then
t_op_bill.Post;
frm_main.db.CommitTrans;
finally
if frm_main.db.InTransaction then
frm_main.db.RollbackTrans;
aAdoQueryAmt.Free;
aAdoQuery.Free;
aAdoQuerycurAmt.Free;
// t_op_bill.Requery();
t_op_seae.Requery();
t_op_seaesel.Requery();
end;
end;
procedure Tfrm_op_seae_teshufandan.MenuItem2Click(Sender: TObject);
var
i:integer;
str,or_id:string;
begin
if t_op_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>employee then
begin
ShowMessage(t_op_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2BB><EFBFBD>޸<EFBFBD>');
exit;
end;
if (t_op_bill.FieldByName('״̬').asstring<>'<27>½<EFBFBD>ǩ<EFBFBD><C7A9>')then
begin
showmessage(t_op_bill.FieldByName('״̬').asstring+'ͨ<><CDA8>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if t_op_seaesel.IsEmpty then
exit;
frm_main.db.BeginTrans;
try
if dxDBGrid3.SelectedCount>=1 then
begin
for i:=0 to dxDBGrid3.SelectedCount-1 do
begin
t_op_seaesel.GotoBookmark(pointer(dxDBGrid3.selectedrows[i]));
if str='' then
str:='<27><><EFBFBD><EFBFBD>='+''''+t_op_seaesel.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''''
else
str:=str+' or <20><><EFBFBD><EFBFBD>='+''''+t_op_seaesel.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
if or_id='' then
or_id:='or_id='+t_op_seaesel.fieldbyname('or_id').AsString
else
or_id:=or_id+' or or_id='+t_op_seaesel.fieldbyname('or_id').AsString;
DelteSeaeStatus(t_op_seaesel.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString,'<27><><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>');
end;
end;
if (str<>'') and (or_id<>'') then
begin
str:=' ('+str+')';
or_id:=' ('+or_id+')';
DeleteBillStatus(str,or_id);
end;
frm_main.db.CommitTrans;
finally
t_op_seaesel.Requery();
if frm_main.db.InTransaction then
frm_main.db.RollbackTrans;
end;
end;
procedure Tfrm_op_seae_teshufandan.t_op_billAfterInsert(DataSet: TDataSet);
function GetMaxItems:Integer;
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
CLose;SQL.Clear;
sql.Add('Select Max(BILL_ID) from t_op_bill_fangdan');
open;
if Fields[0].IsNull then
Result:=1
else
Result:=Fields[0].AsInteger+1;
end;
finally
FreeAndNil(aQuery);
end;
end;
begin
DataSet.FieldByName('BILL_ID').AsInteger:=GetMaxItems;
DataSet.FieldByName('״̬').AsString:='<27>½<EFBFBD>ǩ<EFBFBD><C7A9>';
DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=employee;
DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=NOW;
end;
procedure Tfrm_op_seae_teshufandan.bsSkinButton2Click(Sender: TObject);
begin
t_op_bill.Insert;
bsSkinPageControl1.ActivePageIndex:=1;
end;
procedure Tfrm_op_seae_teshufandan.bsSkinButton3Click(Sender: TObject);
begin
if t_op_bill.State in [dsedit,dsinsert] then
t_op_bill.Post;
end;
procedure Tfrm_op_seae_teshufandan.bsSkinButton4Click(Sender: TObject);
begin
if t_op_bill.IsEmpty then
exit;
if t_op_bill.FieldByName('״̬').asstring<>'<27>½<EFBFBD>ǩ<EFBFBD><C7A9>' then
begin
showmessage(t_op_bill.FieldByName('״̬').asstring+'ͨ<><CDA8>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if t_op_seaesel.RecordCount>=1 then
begin
ShowMessage('<27><><EFBFBD>ڷŵ<DAB7><C5B5><EFBFBD>ϸ<EFBFBD><CFB8><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>,<2C><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD>ϸ');
exit;
end;
t_op_bill.Delete;
end;
procedure Tfrm_op_seae_teshufandan.bsSkinButton7Click(Sender: TObject);
begin
if t_op_bill.IsEmpty then
exit;
t_op_bill.Cancel;
end;
procedure Tfrm_op_seae_teshufandan.bsSkinButton8Click(Sender: TObject);
begin
Close;
end;
procedure Tfrm_op_seae_teshufandan.bsSkinButton12Click(Sender: TObject);
begin
sys_print('Ӧ<>շ<EFBFBD><D5B7>ý<EFBFBD><C3BD><EFBFBD>',2,ds_op_bill1,nil,nil,nil,
ds_op_seaesel1,nil,nil,nil,ds_op_bill1,nil,nil);
end;
procedure Tfrm_op_seae_teshufandan.t_op_seaeselBeforeDelete(
DataSet: TDataSet);
begin
if not t_op_bill.IsEmpty then
begin
if t_op_bill.FieldByName('״̬').AsString<>'<27>½<EFBFBD>ǩ<EFBFBD><C7A9>' then
begin
ShowMessage(t_op_bill.FieldByName('״̬').AsString+'<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>');
abort;
end;
end;
if t_op_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>employee then
begin
ShowMessage(t_op_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2BB><EFBFBD>޸<EFBFBD>');
abort;
end;
end;
procedure Tfrm_op_seae_teshufandan.t_op_billBeforeEdit(DataSet: TDataSet);
begin
if t_op_bill.FieldByName('״̬').AsString<>'<27>½<EFBFBD>ǩ<EFBFBD><C7A9>' then
begin
ShowMessage('<27><>ǰ״̬'+t_op_bill.FieldByName('״̬').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>');
abort;
end;
if t_op_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>employee then
begin
ShowMessage(t_op_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2BB><EFBFBD>޸<EFBFBD>');
abort;
end;
end;
procedure Tfrm_op_seae_teshufandan.t_op_billBeforeDelete(
DataSet: TDataSet);
begin
if t_op_bill.FieldByName('״̬').AsString<>'<27>½<EFBFBD>ǩ<EFBFBD><C7A9>' then
begin
ShowMessage('<27><>ǰ״̬'+t_op_bill.FieldByName('״̬').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>');
abort;
end;
if t_op_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>employee then
begin
ShowMessage(t_op_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2BB><EFBFBD>޸<EFBFBD>');
abort;
end;
end;
procedure Tfrm_op_seae_teshufandan.t_op_seaeselBeforeEdit(
DataSet: TDataSet);
begin
if t_op_bill.FieldByName('״̬').AsString<>'<27>½<EFBFBD>ǩ<EFBFBD><C7A9>' then
begin
ShowMessage('<27><>ǰ״̬'+t_op_bill.FieldByName('״̬').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>');
abort;
end;
if t_op_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>employee then
begin
ShowMessage(t_op_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2BB><EFBFBD>޸<EFBFBD>');
abort;
end;
end;
procedure Tfrm_op_seae_teshufandan.bsSkinButton38Click(Sender: TObject);
begin
t_op_bill.Refresh;
end;
procedure Tfrm_op_seae_teshufandan.RxDBLookupCombo8Enter(Sender: TObject);
begin
RxLookupComboEnter(RxDBLookupCombo8);
end;
procedure Tfrm_op_seae_teshufandan.RxDBLookupCombo8Exit(Sender: TObject);
begin
RxLookupComboExit(RxDBLookupCombo8);
end;
procedure Tfrm_op_seae_teshufandan.dxDBGrid2Click(Sender: TObject);
begin
bsSkinPageControl1.ActivePageIndex:=1;
end;
procedure Tfrm_op_seae_teshufandan.bsSkinButton11Click(Sender: TObject);
begin
with t_op_bill do
begin
Close;
sql.Clear;
sql.Add('select * from t_op_bill_fangdan');
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> between :date1 and :date2 and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
sql.Add('order by BILL_ID DESC');
Parameters.ParamByName('date1').Value:=wwDBDateTimePicker6.Date;
Parameters.ParamByName('date2').Value:=wwDBDateTimePicker7.Date;
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=RxDBLookupCombo1.value;
Open;
end;
//
end;
procedure Tfrm_op_seae_teshufandan.dxDBGrid3DblClick(Sender: TObject);
begin
fee_view(t_op_seaesel.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end;
end.