|
|
unit u_rp_ch_feemodify;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, bsSkinCtrls, dxExEdtr, StdCtrls, DBCtrls, dxCntner, dxTL,
|
|
|
dxDBCtrl, dxDBGrid, DB, ADODB, dxDBTLCl, dxGrClms, RxLookup,
|
|
|
wwdbdatetimepicker, ExtCtrls, wwdblook, Menus, Mask, wwdbedit, Wwdotdot,
|
|
|
Wwdbcomb;
|
|
|
|
|
|
type
|
|
|
Tfrm_rp_ch_feemodify = class(TForm)
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
t_op_feemodify: TADOQuery;
|
|
|
t_op_feemodify1: TDataSource;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column10: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridMaskColumn;
|
|
|
Label8: TLabel;
|
|
|
wwDBDateTimePicker3: TwwDBDateTimePicker;
|
|
|
Label11: TLabel;
|
|
|
wwDBDateTimePicker4: TwwDBDateTimePicker;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
dxDBGrid1Column15: TdxDBGridColumn;
|
|
|
dxDBGrid1Column16: TdxDBGridColumn;
|
|
|
dxDBGrid1Column17: TdxDBGridColumn;
|
|
|
dxDBGrid1Column18: TdxDBGridColumn;
|
|
|
dxDBGrid1Column19: TdxDBGridColumn;
|
|
|
lbl1: TLabel;
|
|
|
wwDBLookupCombo49: TwwDBLookupCombo;
|
|
|
lbl2: TLabel;
|
|
|
edt1: TEdit;
|
|
|
lbl3: TLabel;
|
|
|
RxDBLookupCombo6: TRxDBLookupCombo;
|
|
|
lbl4: TLabel;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
lbl5: TLabel;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
lbl6: TLabel;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
lbl7: TLabel;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
lbl8: TLabel;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
RxDBLookupCombo8: TRxDBLookupCombo;
|
|
|
lbl9: TLabel;
|
|
|
lbl10: TLabel;
|
|
|
RxDBLookupCombo20: TRxDBLookupCombo;
|
|
|
dxDBGrid1Column32: TdxDBGridColumn;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N10: TMenuItem;
|
|
|
N11: TMenuItem;
|
|
|
N14: TMenuItem;
|
|
|
N13: TMenuItem;
|
|
|
N12: TMenuItem;
|
|
|
N15: TMenuItem;
|
|
|
N16: TMenuItem;
|
|
|
dxDBGrid1Column20: TdxDBGridColumn;
|
|
|
dxDBGrid1Column21: TdxDBGridColumn;
|
|
|
dxDBGrid1Column22: TdxDBGridColumn;
|
|
|
dxDBGrid1Column23: TdxDBGridColumn;
|
|
|
dxDBGrid1Column24: TdxDBGridColumn;
|
|
|
dxDBGrid1Column25: TdxDBGridColumn;
|
|
|
dxDBGrid1Column26: TdxDBGridColumn;
|
|
|
dxDBGrid1Column27: TdxDBGridColumn;
|
|
|
Label1: TLabel;
|
|
|
wwDBDateTimePicker5: TwwDBDateTimePicker;
|
|
|
Label2: TLabel;
|
|
|
wwDBDateTimePicker6: TwwDBDateTimePicker;
|
|
|
dxDBGrid1Column28: TdxDBGridColumn;
|
|
|
wwDBDateTimePicker7: TwwDBDateTimePicker;
|
|
|
Label3: TLabel;
|
|
|
wwDBDateTimePicker8: TwwDBDateTimePicker;
|
|
|
Label4: TLabel;
|
|
|
dxDBGrid1Column29: TdxDBGridColumn;
|
|
|
dxDBGrid1Column30: TdxDBGridColumn;
|
|
|
dxDBGrid1Column31: TdxDBGridColumn;
|
|
|
Label44: TLabel;
|
|
|
wwDBDateTimePicker9: TwwDBDateTimePicker;
|
|
|
Label45: TLabel;
|
|
|
wwDBDateTimePicker10: TwwDBDateTimePicker;
|
|
|
dxDBGrid1Column33: TdxDBGridColumn;
|
|
|
dxDBGrid1Column34: TdxDBGridColumn;
|
|
|
Label38: TLabel;
|
|
|
wwDBComboBox42: TwwDBComboBox;
|
|
|
RxDBLookupCombo16: TRxDBLookupCombo;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
procedure N12Click(Sender: TObject);
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_rp_ch_feemodify: Tfrm_rp_ch_feemodify;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, my_sys_function;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_rp_ch_feemodify.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_feemodify.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
frm_rp_ch_feemodify.Hide;
|
|
|
frm_rp_ch_feemodify.ManualFloat(frm_rp_ch_feemodify.BoundsRect );
|
|
|
frm_main.freeTabs('frm_rp_ch_feemodify');
|
|
|
action:=cafree;
|
|
|
frm_rp_ch_feemodify:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_feemodify.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
loadreggrid(dxdbgrid1,false,caption);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_feemodify.bsSkinButton10Click(Sender: TObject);
|
|
|
var
|
|
|
str:widestring;
|
|
|
begin
|
|
|
|
|
|
str:='where t_op_seae.<2E><><EFBFBD><EFBFBD>״̬=''<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'' and t_ch_fee.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>=(t_op_seae.<2E><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+1) and t_op_seae.<2E><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> is not null and t_ch_fee.<2E><><EFBFBD><EFBFBD>״̬ in (''<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'',''<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'',''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'') ';
|
|
|
|
|
|
|
|
|
if RxDBLookupCombo6.DisplayValue<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where t_op_seae.<2E><><EFBFBD><EFBFBD>Ա='+''''+RxDBLookupCombo6.DisplayValue+''''
|
|
|
else
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD>Ա='+''''+RxDBLookupCombo6.DisplayValue+'''';
|
|
|
end;
|
|
|
|
|
|
if RxDBLookupCombo1.DisplayValue<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo1.DisplayValue+''''
|
|
|
else
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo1.DisplayValue+'''';
|
|
|
end;
|
|
|
|
|
|
if wwDBLookupCombo49.Text<>'' then begin
|
|
|
if str=''then
|
|
|
str:='where t_op_seae.<2E><><EFBFBD><EFBFBD>='+''''+wwDBLookupCombo49.Text+''''
|
|
|
else
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD>='+''''+wwDBLookupCombo49.Text+'''';
|
|
|
end;
|
|
|
|
|
|
if edt1.Text<>'' then begin
|
|
|
if str=''then
|
|
|
str:='where t_op_seae.<2E><><EFBFBD><EFBFBD>='+''''+edt1.Text+''''
|
|
|
else
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD>='+''''+edt1.Text+'''';
|
|
|
end;
|
|
|
|
|
|
if RxDBLookupCombo2.DisplayValue<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where t_op_seae.ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+''''
|
|
|
else
|
|
|
str:=str+' and t_op_seae.ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
|
|
|
end;
|
|
|
|
|
|
if RxDBLookupCombo4.DisplayValue<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where t_op_seae.<2E><><EFBFBD><EFBFBD>˾='+''''+RxDBLookupCombo4.DisplayValues[1]+''''
|
|
|
else
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD>˾='+''''+RxDBLookupCombo4.DisplayValues[1]+'''';
|
|
|
end;
|
|
|
|
|
|
if RxDBLookupCombo8.DisplayValue<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾='+''''+RxDBLookupCombo8.DisplayValues[1]+''''
|
|
|
else
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾='+''''+RxDBLookupCombo8.DisplayValues[1]+'''';
|
|
|
end;
|
|
|
|
|
|
if RxDBLookupCombo20.DisplayValue<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where t_op_seae.<2E><><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo20.DisplayValues[1]+''''
|
|
|
else
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo20.DisplayValues[1]+'''';
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if wwDBDateTimePicker3.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where t_ch_fee.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker3.text+''''
|
|
|
else
|
|
|
str:=str+' and t_ch_fee.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker3.text+'''';
|
|
|
end;
|
|
|
if wwDBDateTimePicker4.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where t_ch_fee.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker4.text+' 23:59:59'''
|
|
|
else
|
|
|
str:=str+' and t_ch_fee.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker4.text+' 23:59:59''';
|
|
|
end;
|
|
|
|
|
|
if wwDBDateTimePicker8.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker8.text+''''
|
|
|
else
|
|
|
str:=str+' and t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker8.text+'''';
|
|
|
end;
|
|
|
if wwDBDateTimePicker7.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker7.text+' 23:59:59'''
|
|
|
else
|
|
|
str:=str+' and t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker7.text+' 23:59:59''';
|
|
|
end;
|
|
|
|
|
|
if wwDBDateTimePicker1.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+''''
|
|
|
else
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
|
|
|
end;
|
|
|
if wwDBDateTimePicker2.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+''''
|
|
|
else
|
|
|
str:=str+' and t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
|
|
|
end;
|
|
|
|
|
|
if wwDBDateTimePicker5.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker5.text+''''
|
|
|
else
|
|
|
str:=str+' and t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker5.text+'''';
|
|
|
end;
|
|
|
if wwDBDateTimePicker6.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker6.text+''''
|
|
|
else
|
|
|
str:=str+' and t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker6.text+'''';
|
|
|
end;
|
|
|
if wwDBDateTimePicker9.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>>='+''''+wwDBDateTimePicker9.text+''''
|
|
|
else
|
|
|
str:=str+' and t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>>='+''''+wwDBDateTimePicker9.text+'''';
|
|
|
end;
|
|
|
if wwDBDateTimePicker10.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><='+''''+wwDBDateTimePicker10.text+''''
|
|
|
else
|
|
|
str:=str+' and t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><='+''''+wwDBDateTimePicker10.text+'''';
|
|
|
end;
|
|
|
|
|
|
|
|
|
t_op_feemodify.close;
|
|
|
t_op_feemodify.sql.clear;
|
|
|
t_op_feemodify.SQL.add('select t_ch_fee.CH_ID,t_ch_fee.<2E><><EFBFBD><EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD>,t_ch_fee.<2E>ұ<EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD>,t_ch_fee.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.¼<><C2BC><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD>,t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>,t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,');
|
|
|
t_op_feemodify.SQL.add('t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>,t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,t_op_seae.ί<>е<EFBFBD>λ,t_op_seae.<2E><>װ<EFBFBD><D7B0>,t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,');
|
|
|
t_op_feemodify.SQL.add('t_op_seae.<2E>ͷ<EFBFBD>Ա,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD>,');
|
|
|
t_op_feemodify.SQL.add('t_op_seae.<2E><><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD>˾,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,(case when t_ch_fee.<2E><><EFBFBD><EFBFBD>=''<27><>'' then t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> else -t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
|
|
|
t_op_feemodify.SQL.add(' from t_op_seae left join t_ch_fee on (t_ch_fee.<2E><><EFBFBD><EFBFBD>=t_op_seae.<2E><><EFBFBD><EFBFBD>) ');
|
|
|
t_op_feemodify.SQL.add(str+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_op_feemodify.open;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_feemodify.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
sys_print('<27><><EFBFBD>÷<EFBFBD><C3B7>˺<EFBFBD><CBBA><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3>',2,nil,nil,nil,nil,t_op_feemodify1,nil,nil,nil,nil,nil,nil);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_feemodify.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_feemodify.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_feemodify.N12Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid(dxdbgrid1,113);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_feemodify.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
end.
|