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.
DONGSHENG6/财务管理/u_ch_balance_accept_hexiao....

835 lines
31 KiB
Plaintext

11 months ago
unit u_ch_balance_accept_hexiao;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, XPMenu, Menus, DB, ADODB, ComCtrls, bsSkinTabs,
u_ch_add_do, u_ch_delete_do, wwdbedit, Wwdotdot, Wwdbcomb, StdCtrls,
DBCtrls, bsSkinCtrls, bsdbctrls, RxLookup, Mask, dxDBTLCl, dxGrClms,
dxDBGrid, dxTL, dxDBCtrl, dxCntner, wwdbdatetimepicker, ToolEdit,
RXDBCtrl, DBCtrlsEh;
type
Tfrm_ch_balance_accept_hexiao = class(TForm)
bsSkinPanel2: TbsSkinPanel;
bsSkinButton5: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinNotebook1: TbsSkinNotebook;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridColumn;
dxDBGrid1Column7: TdxDBGridColumn;
dxDBGrid1Column8: TdxDBGridColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridDateColumn;
dxDBGrid1Column15: TdxDBGridColumn;
dxDBGrid1Column16: TdxDBGridColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridDateColumn;
bsSkinPanel1: TbsSkinPanel;
bsSkinPanel3: TbsSkinPanel;
Label25: TLabel;
Label17: TLabel;
Label12: TLabel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
DBEdit14: TDBEdit;
DBEdit1: TDBEdit;
DBEdit4: TDBEdit;
DBEdit5: TDBEdit;
DBEdit6: TDBEdit;
DBEdit8: TDBEdit;
DBEdit9: TDBEdit;
DBEdit10: TDBEdit;
DBMemo1: TDBMemo;
RxDBLookupCombo2: TRxDBLookupCombo;
wwDBComboBox1: TwwDBComboBox;
RxDBLookupCombo3: TRxDBLookupCombo;
fra_ch_delete_do1: Tfra_ch_delete_do;
fra_ch_add_do1: Tfra_ch_add_do;
t_ch_balance: TADOQuery;
t_ch_balance1: TDataSource;
t_ch_fee_do: TADOQuery;
XPMenu1: TXPMenu;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
Label11: TLabel;
PopupMenu3: TPopupMenu;
N17: TMenuItem;
N18: TMenuItem;
N34: TMenuItem;
N35: TMenuItem;
N2: TMenuItem;
N1: TMenuItem;
N36: TMenuItem;
bsSkinButton13: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
DBEdit3: TDBEdit;
Label13: TLabel;
DBEdit7: TDBEdit;
bsSkinButton38: TbsSkinButton;
Label14: TLabel;
RxDBLookupCombo1: TRxDBLookupCombo;
dxDBGrid1Column17: TdxDBGridColumn;
DBDateTimeEditEh1: TDBDateTimeEditEh;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinPanel2Resize(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure t_ch_balanceBeforePost(DataSet: TDataSet);
procedure dxDBGrid1Column2CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure t_ch_balanceAfterPost(DataSet: TDataSet);
procedure t_ch_balanceBeforeEdit(DataSet: TDataSet);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton13Click(Sender: TObject);
procedure N17Click(Sender: TObject);
procedure N34Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure N36Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton38Click(Sender: TObject);
procedure bsSkinNotebook1PageChanged(Sender: TObject);
procedure fra_ch_add_do1MenuItem1Click(Sender: TObject);
private
{ Private declarations }
procedure getdetail(balno:string);
public
{ Public declarations }
end;
var
ch_balance_accept_hexiao_open:boolean;
frm_ch_balance_accept_hexiao: Tfrm_ch_balance_accept_hexiao;
implementation
uses u_main, u_data_share, u_ch_balance_query, my_sys_function, my_sys_chat;
{$R *.dfm}
procedure Tfrm_ch_balance_accept_hexiao.getdetail(balno:string);
begin
if StrToBool(get_parameters_value(85,'false')) then
begin
fra_ch_add_do1.bsSkinTabSheet1.TabVisible:=False;
fra_ch_add_do1.bsSkinTabSheet2.TabVisible:=False;
fra_ch_add_do1.bsSkinTabSheet3.TabVisible:=False;
fra_ch_add_do1.bsSkinTabSheet4.TabVisible:=False;
fra_ch_add_do1.bsSkinTabSheet5.TabVisible:=True;
fra_ch_add_do1.bsSkinPageControl1.TabIndex:=0;
fra_ch_delete_do1.bsSkinTabSheet1.TabVisible:=false;
fra_ch_delete_do1.bsSkinTabSheet2.TabVisible:=false;
fra_ch_delete_do1.bsSkinTabSheet3.TabVisible:=false;
fra_ch_delete_do1.bsSkinTabSheet4.TabVisible:=false;
fra_ch_delete_do1.bsSkinTabSheet5.TabVisible:=True;
fra_ch_delete_do1.bsSkinPageControl1.ActivePage:=fra_ch_delete_do1.bsSkinTabSheet5;
end
else
begin
fra_ch_add_do1.bsSkinTabSheet1.TabVisible:=True;
fra_ch_add_do1.bsSkinTabSheet2.TabVisible:=True;
fra_ch_add_do1.bsSkinTabSheet3.TabVisible:=True;
fra_ch_add_do1.bsSkinTabSheet4.TabVisible:=True;
fra_ch_add_do1.bsSkinPageControl1.ActivePage:=fra_ch_add_do1.bsSkinTabSheet1;
fra_ch_add_do1.bsSkinTabSheet5.TabVisible:=False;
fra_ch_delete_do1.bsSkinTabSheet1.TabVisible:=True;
fra_ch_delete_do1.bsSkinTabSheet2.TabVisible:=True;
fra_ch_delete_do1.bsSkinTabSheet3.TabVisible:=True;
fra_ch_delete_do1.bsSkinTabSheet4.TabVisible:=True;
fra_ch_delete_do1.bsSkinTabSheet5.TabVisible:=false;
fra_ch_delete_do1.bsSkinPageControl1.ActivePage:=fra_ch_delete_do1.bsSkinTabSheet1;
end;
if StrToBool(get_parameters_value(85,'false')) then
begin
fra_ch_delete_do1.v_fee_do_bscard.close;
fra_ch_delete_do1.v_fee_do_bscard.SQL.clear;
fra_ch_delete_do1.v_fee_do_bscard.sql.add('select * from v_fee_do_bscard '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_bscard.Open;
fra_ch_delete_do1.v_fee_do_bscard_sum.close;
fra_ch_delete_do1.v_fee_do_bscard_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_bscard_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_bscard '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_bscard_sum.Open;
end
else
begin
fra_ch_delete_do1.v_fee_do_seae.close;
fra_ch_delete_do1.v_fee_do_seae.SQL.clear;
fra_ch_delete_do1.v_fee_do_seae.sql.add('select * from v_fee_do_seae '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_seae.Open;
fra_ch_delete_do1.v_fee_do_seai.close;
fra_ch_delete_do1.v_fee_do_seai.SQL.clear;
fra_ch_delete_do1.v_fee_do_seai.sql.add('select * from v_fee_do_seai '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_seai.Open;
fra_ch_delete_do1.v_fee_do_aire.close;
fra_ch_delete_do1.v_fee_do_aire.SQL.clear;
fra_ch_delete_do1.v_fee_do_aire.sql.add('select * from v_fee_do_aire '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_aire.Open;
fra_ch_delete_do1.v_fee_do_airi.close;
fra_ch_delete_do1.v_fee_do_airi.SQL.clear;
fra_ch_delete_do1.v_fee_do_airi.sql.add('select * from v_fee_do_airi '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_airi.Open;
fra_ch_delete_do1.v_fee_do_seae_sum.close;
fra_ch_delete_do1.v_fee_do_seae_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_seae_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_seae '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_seae_sum.Open;
fra_ch_delete_do1.v_fee_do_seai_sum.close;
fra_ch_delete_do1.v_fee_do_seai_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_seai_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_seai '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_seai_sum.Open;
fra_ch_delete_do1.v_fee_do_aire_sum.close;
fra_ch_delete_do1.v_fee_do_aire_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_aire_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_aire '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_aire_sum.Open;
fra_ch_delete_do1.v_fee_do_airi_sum.close;
fra_ch_delete_do1.v_fee_do_airi_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_airi_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_airi '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_airi_sum.Open;
end;
end;
procedure Tfrm_ch_balance_accept_hexiao.bsSkinButton5Click(
Sender: TObject);
begin
close;
end;
procedure Tfrm_ch_balance_accept_hexiao.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
ch_balance_accept_hexiao_open:=false;
frm_ch_balance_accept_hexiao.Hide;
frm_ch_balance_accept_hexiao.ManualFloat(frm_ch_balance_accept_hexiao.BoundsRect );
frm_main.freeTabs('frm_ch_balance_accept_hexiao');
action:=cafree;
frm_ch_balance_accept_hexiao:=nil;
end;
procedure Tfrm_ch_balance_accept_hexiao.bsSkinPanel2Resize(
Sender: TObject);
var
i:integer;
begin
i:=round(bsSkinPanel2.Width/10);
bsSkinButton9.Width:=i;
bsSkinButton10.Width:=i;
bsSkinButton11.Width:=i;
bsSkinButton6.Width:=i;
bsSkinButton8.Width:=i;
bsSkinButton1.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton38.Width:=i;
bsSkinButton13.Left:=bsSkinPanel2.Width-bsSkinButton13.Width-20;
end;
procedure Tfrm_ch_balance_accept_hexiao.FormShow(Sender: TObject);
begin
bsSkinNotebook1.PageIndex:=0;
t_ch_balance.Close;
t_ch_balance.SQL.clear;
t_ch_balance.SQL.Add('select * from t_ch_balance where <20>ʵ<EFBFBD>״̬<>'+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''
+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' and '+open_data('1003','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no')
+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD><EFBFBD>'+''''+' order by <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> desc');
t_ch_balance.open;
ch_balance_accept_hexiao_open:=true;
if StrToBool(get_parameters_value(85,'false')) then
begin
fra_ch_add_do1.bsSkinTabSheet1.TabVisible:=False;
fra_ch_add_do1.bsSkinTabSheet2.TabVisible:=False;
fra_ch_add_do1.bsSkinTabSheet3.TabVisible:=False;
fra_ch_add_do1.bsSkinTabSheet4.TabVisible:=False;
fra_ch_add_do1.bsSkinTabSheet5.TabVisible:=True;
fra_ch_add_do1.bsSkinPageControl1.TabIndex:=0;
fra_ch_delete_do1.bsSkinTabSheet1.TabVisible:=false;
fra_ch_delete_do1.bsSkinTabSheet2.TabVisible:=false;
fra_ch_delete_do1.bsSkinTabSheet3.TabVisible:=false;
fra_ch_delete_do1.bsSkinTabSheet4.TabVisible:=false;
fra_ch_delete_do1.bsSkinTabSheet5.TabVisible:=True;
fra_ch_delete_do1.bsSkinPageControl1.ActivePage:=fra_ch_delete_do1.bsSkinTabSheet5;
end
else
begin
fra_ch_add_do1.bsSkinTabSheet1.TabVisible:=True;
fra_ch_add_do1.bsSkinTabSheet2.TabVisible:=True;
fra_ch_add_do1.bsSkinTabSheet3.TabVisible:=True;
fra_ch_add_do1.bsSkinTabSheet4.TabVisible:=True;
fra_ch_add_do1.bsSkinPageControl1.ActivePage:=fra_ch_add_do1.bsSkinTabSheet1;
fra_ch_add_do1.bsSkinTabSheet5.TabVisible:=False;
fra_ch_delete_do1.bsSkinTabSheet1.TabVisible:=True;
fra_ch_delete_do1.bsSkinTabSheet2.TabVisible:=True;
fra_ch_delete_do1.bsSkinTabSheet3.TabVisible:=True;
fra_ch_delete_do1.bsSkinTabSheet4.TabVisible:=True;
fra_ch_delete_do1.bsSkinTabSheet5.TabVisible:=false;
fra_ch_delete_do1.bsSkinPageControl1.ActivePage:=fra_ch_delete_do1.bsSkinTabSheet1;
end;
if StrToBool(get_parameters_value(85,'false')) then
begin
fra_ch_delete_do1.v_fee_do_bscard.close;
fra_ch_delete_do1.v_fee_do_bscard.SQL.clear;
fra_ch_delete_do1.v_fee_do_bscard.sql.add('select * from v_fee_do_bscard '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_bscard.Open;
fra_ch_delete_do1.v_fee_do_bscard_sum.close;
fra_ch_delete_do1.v_fee_do_bscard_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_bscard_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_bscard '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_bscard_sum.Open;
end
else
begin
fra_ch_delete_do1.v_fee_do_seae.close;
fra_ch_delete_do1.v_fee_do_seae.SQL.clear;
fra_ch_delete_do1.v_fee_do_seae.sql.add('select * from v_fee_do_seae '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_seae.Open;
fra_ch_delete_do1.v_fee_do_seai.close;
fra_ch_delete_do1.v_fee_do_seai.SQL.clear;
fra_ch_delete_do1.v_fee_do_seai.sql.add('select * from v_fee_do_seai '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_seai.Open;
fra_ch_delete_do1.v_fee_do_aire.close;
fra_ch_delete_do1.v_fee_do_aire.SQL.clear;
fra_ch_delete_do1.v_fee_do_aire.sql.add('select * from v_fee_do_aire '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_aire.Open;
fra_ch_delete_do1.v_fee_do_airi.close;
fra_ch_delete_do1.v_fee_do_airi.SQL.clear;
fra_ch_delete_do1.v_fee_do_airi.sql.add('select * from v_fee_do_airi '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_airi.Open;
fra_ch_delete_do1.v_fee_do_seae_sum.close;
fra_ch_delete_do1.v_fee_do_seae_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_seae_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_seae '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_seae_sum.Open;
fra_ch_delete_do1.v_fee_do_seai_sum.close;
fra_ch_delete_do1.v_fee_do_seai_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_seai_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_seai '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_seai_sum.Open;
fra_ch_delete_do1.v_fee_do_aire_sum.close;
fra_ch_delete_do1.v_fee_do_aire_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_aire_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_aire '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_aire_sum.Open;
fra_ch_delete_do1.v_fee_do_airi_sum.close;
fra_ch_delete_do1.v_fee_do_airi_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_airi_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_airi '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''' group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_airi_sum.Open;
end;
fra_ch_add_do1.do_ban1.DataSet:=t_ch_balance;
fra_ch_add_do1.bs_text.text:='3';
fra_ch_add_do1.t_ch_fee_do.open;
if StrToBool(get_parameters_value(83,'false')) then begin
RxDBLookupCombo1.Visible:=TRUE;
Label14.Visible:=true;
end else begin
RxDBLookupCombo1.Visible:=false;
Label14.Visible:=false;
Label6.Caption:='<27><> <20><>';
end;
fra_ch_delete_do1.bs_text.Text:='3';
fra_ch_delete_do1.do_ban1.DataSet:=t_ch_balance;
end;
procedure Tfrm_ch_balance_accept_hexiao.bsSkinButton11Click(
Sender: TObject);
var
answer:TModalResult;
begin
if bsSkinButton11.Caption='<27><EFBFBD>޸<EFBFBD>' then
begin
if t_ch_balance.IsEmpty then
exit;
bsSkinNotebook1.PageIndex:=1;
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
end
else
begin
if (t_ch_balance.State=dsinsert)or(t_ch_balance.State=dsedit) then
BEGIN
answer:=messagedlg( '<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>޸ģ<DEB8><C4A3>Ƿ񱣴棿',mtWarning,mbYesNoCancel,0);
if answer=mrYes then
begin
t_ch_balance.post;
end;
if answer=mrNo then
begin
t_ch_balance.cancel;
end;
if answer=mrCancel then
begin
exit;
end;
END;
bsSkinNotebook1.PageIndex:=0;
bsSkinButton11.Caption:='<27><EFBFBD>޸<EFBFBD>';
end;
end;
procedure Tfrm_ch_balance_accept_hexiao.t_ch_balanceBeforePost(
DataSet: TDataSet);
begin
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
t_ch_balance['ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),t_ch_balance['ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
t_ch_balance['<27>ʵ<EFBFBD>״̬']:=t_ch_balance['<27>ʵ<EFBFBD>״̬'];
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']-t_ch_balance['ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
procedure Tfrm_ch_balance_accept_hexiao.dxDBGrid1Column2CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
if (ANode.strings[dxDBGrid1Column2.Index]='¼<><C2BC>״̬') then
AColor :=clwhite
else if (ANode.strings[dxDBGrid1Column2.Index]='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>') then
AColor :=$0080FFFF
else if (ANode.strings[dxDBGrid1Column2.Index]='ȷ<>Ϻ<EFBFBD><CFBA><EFBFBD>') then
AColor :=$0080FF80
else if (ANode.strings[dxDBGrid1Column2.Index]='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>') then
AColor :=$0000FF80
else if (ANode.strings[dxDBGrid1Column2.Index]='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') then
AColor :=clLime;
AFont.Color:=clblack;
end;
procedure Tfrm_ch_balance_accept_hexiao.bsSkinButton6Click(
Sender: TObject);
begin
if t_ch_balance.IsEmpty then
exit;
if t_ch_balance.FieldByName('<27>ʵ<EFBFBD>״̬').asstring<>'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'then
begin
showmessage('<27>ʵ<EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>ȷ<EFBFBD>Ϻ<EFBFBD><CFBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end
else
begin
try
modify_all:=true;
t_ch_balance.edit;
t_ch_balance['<27>ʵ<EFBFBD>״̬']:='ȷ<>Ϻ<EFBFBD><CFBA><EFBFBD>';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_ch_balance.post;
modify_all:=false;
except
modify_all:=false;
t_ch_balance.cancel;
showmessage('ȷ<>Ϻ<EFBFBD><CFBA><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
end;
end;
end;
procedure Tfrm_ch_balance_accept_hexiao.bsSkinButton8Click(
Sender: TObject);
begin
if t_ch_balance.IsEmpty then
exit;
if t_ch_balance.FieldByName('<27>ʵ<EFBFBD>״̬').asstring<>'ȷ<>Ϻ<EFBFBD><CFBA><EFBFBD>'then
begin
showmessage('<27>ʵ<EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1>ȷ<EFBFBD>Ϻ<EFBFBD><CFBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end
else
begin
if t_ch_balance.fieldbyname('ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0 then
begin
showmessage('<27><>ǰ<EFBFBD>ʵ<EFBFBD><CAB5>Ѿ<EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>˺<EFBFBD><CBBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1>ȷ<EFBFBD>Ϻ<EFBFBD><CFBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
try
modify_all:=true;
t_ch_balance.edit;
t_ch_balance['<27>ʵ<EFBFBD>״̬']:='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
t_ch_balance.post;
modify_all:=false;
except
modify_all:=false;
t_ch_balance.cancel;
showmessage('ȡ<><C8A1>ȷ<EFBFBD>Ϻ<EFBFBD><CFBA><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
end;
end;
end;
procedure Tfrm_ch_balance_accept_hexiao.bsSkinButton10Click(
Sender: TObject);
begin
try
frm_ch_balance_query:=tfrm_ch_balance_query.Create (self);
balance_query_type:=2;
frm_ch_balance_query.ShowModal;
bsSkinNotebook1.PageIndex:=0;
finally
frm_ch_balance_query.Free;
end;
end;
procedure Tfrm_ch_balance_accept_hexiao.t_ch_balanceAfterPost(
DataSet: TDataSet);
begin
if StrToBool(get_parameters_value(85,'false')) then begin
fra_ch_delete_do1.v_fee_do_bscard.DisableControls;
fra_ch_delete_do1.v_fee_do_bscard_sum.DisableControls;
fra_ch_delete_do1.v_fee_do_bscard.Requery;
fra_ch_delete_do1.v_fee_do_bscard_sum.Requery;
fra_ch_delete_do1.v_fee_do_bscard.EnableControls;
fra_ch_delete_do1.v_fee_do_bscard_sum.EnableControls;
if fra_ch_add_do1.V_op_BSCARD.Active then
begin
fra_ch_add_do1.t_ch_fee.Requery();
fra_ch_add_do1.t_ch_fee_sum.Requery();
end;
end else begin
case delete_do_type_num of
1:
begin
fra_ch_delete_do1.v_fee_do_seae.Requery;
fra_ch_delete_do1.v_fee_do_seae_sum.Requery;
end;
2:
begin
fra_ch_delete_do1.v_fee_do_seai.Requery;
fra_ch_delete_do1.v_fee_do_seai_sum.Requery;
end;
3:
begin
fra_ch_delete_do1.v_fee_do_aire.Requery;
fra_ch_delete_do1.v_fee_do_aire_sum.Requery;
end;
4:
begin
fra_ch_delete_do1.v_fee_do_airi.Requery;
fra_ch_delete_do1.v_fee_do_airi_sum.Requery;
end;
5:
begin
fra_ch_delete_do1.v_fee_do_seae.Requery;
fra_ch_delete_do1.v_fee_do_seae_sum.Requery;
fra_ch_delete_do1.v_fee_do_seai.Requery;
fra_ch_delete_do1.v_fee_do_seai_sum.Requery;
fra_ch_delete_do1.v_fee_do_aire.Requery;
fra_ch_delete_do1.v_fee_do_aire_sum.Requery;
fra_ch_delete_do1.v_fee_do_airi.Requery;
fra_ch_delete_do1.v_fee_do_airi_sum.Requery;
end;
end;
case delete_do_type_num of
1,2,3,4,5:
begin
check_do_sum(3,t_ch_balance,
fra_ch_delete_do1.v_fee_do_seae_sum,fra_ch_delete_do1.v_fee_do_seai_sum,
fra_ch_delete_do1.v_fee_do_aire_sum,fra_ch_delete_do1.v_fee_do_airi_sum);
end;
end;
if if_ch_delete_do then
begin
case delete_do_type_num of
1,2,3,4:
begin
if fra_ch_add_do1.t_op_seae.Active then
begin
fra_ch_add_do1.t_ch_fee.Requery();
fra_ch_add_do1.t_ch_fee_sum.Requery();
end;
end;
end;
end;
end;
delete_do_type_num:=0;
if_ch_delete_do:=false;
end;
procedure Tfrm_ch_balance_accept_hexiao.t_ch_balanceBeforeEdit(
DataSet: TDataSet);
var
sdate:tdate;
begin
if not modify_all then
begin
if (t_ch_balance.FieldByName('<27>ʵ<EFBFBD>״̬').asstring<>'ȷ<>Ϻ<EFBFBD><CFBA><EFBFBD>')then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
end;
sdate:=EncodeDate(Logininfo.offyear,Logininfo.offmonth,1);
if not t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then
if sdate>t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'] then begin
MessageDlg('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><E3B5A5><EFBFBD><EFBFBD>ĩ<EFBFBD><C4A9><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD>ˣ<EFBFBD>',mtError,[mbok],0);
abort;
end;
end;
procedure Tfrm_ch_balance_accept_hexiao.bsSkinButton1Click(
Sender: TObject);
begin
if t_ch_balance.IsEmpty then
exit;
if t_ch_balance.FieldByName('<27>ʵ<EFBFBD>״̬').asstring<>'ȷ<>Ϻ<EFBFBD><CFBA><EFBFBD>'then
begin
showmessage('<27>ʵ<EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1BDBB><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD>');
end
else
begin
try
modify_all:=true;
t_ch_balance.edit;
t_ch_balance['<27>ʵ<EFBFBD>״̬']:='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
if t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']=null then
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
if t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']<>null then
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_balance.post;
Send_invocie_check_check('<27>շѺ<D5B7><D1BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>:'+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring
+',<2C>ͻ<EFBFBD>:'+t_ch_balance.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_balance.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'32');
modify_all:=false;
except
modify_all:=false;
t_ch_balance.cancel;
showmessage('<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
end;
end;
end;
procedure Tfrm_ch_balance_accept_hexiao.bsSkinButton2Click(
Sender: TObject);
begin
if t_ch_balance.IsEmpty then
exit;
if t_ch_balance.FieldByName('<27>ʵ<EFBFBD>״̬').asstring<>'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'then
begin
showmessage('<27>ʵ<EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><E1BDBB><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD>');
end
else
begin
try
if t_ch_balance.State in [dsEdit,dsinsert] then
t_ch_balance.Post;
modify_all:=true;
t_ch_balance.edit;
t_ch_balance['<27>ʵ<EFBFBD>״̬']:='ȷ<>Ϻ<EFBFBD><CFBA><EFBFBD>';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_balance.post;
modify_all:=false;
except
on e : exception do
begin
modify_all:=false;
t_ch_balance.cancel;
showmessage('ȡ<><C8A1><EFBFBD><EFBFBD><E1BDBB><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>'+e.Message);
end;
end;
end;
end;
procedure Tfrm_ch_balance_accept_hexiao.bsSkinButton13Click(
Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton13.ClientToScreen(Point(0,bsSkinButton13.Height));
PopupMenu3.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_ch_balance_accept_hexiao.N17Click(Sender: TObject);
begin
t_ch_balance.Close;
t_ch_balance.SQL.clear;
t_ch_balance.SQL.Add('select * from t_ch_balance where <20>ʵ<EFBFBD>״̬='+''''+'¼<><C2BC>״̬'+''''
+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD><EFBFBD>'+''''
+' order by <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> desc');
t_ch_balance.open;
end;
procedure Tfrm_ch_balance_accept_hexiao.N34Click(Sender: TObject);
begin
t_ch_balance.Close;
t_ch_balance.SQL.clear;
t_ch_balance.SQL.Add('select * from t_ch_balance where <20>ʵ<EFBFBD>״̬='+''''+'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'+''''
+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD><EFBFBD>'+''''
+' order by <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> desc');
t_ch_balance.open;
end;
procedure Tfrm_ch_balance_accept_hexiao.N2Click(Sender: TObject);
begin
t_ch_balance.Close;
t_ch_balance.SQL.clear;
t_ch_balance.SQL.Add('select * from t_ch_balance where <20>ʵ<EFBFBD>״̬='+''''+'ȷ<>Ϻ<EFBFBD><CFBA><EFBFBD>'+''''
+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD><EFBFBD>'+''''
+' order by <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> desc');
t_ch_balance.open;
end;
procedure Tfrm_ch_balance_accept_hexiao.N36Click(Sender: TObject);
begin
t_ch_balance.Close;
t_ch_balance.SQL.clear;
t_ch_balance.SQL.Add('select * from t_ch_balance where <20>ʵ<EFBFBD>״̬='+''''+'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'+''''
+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD><EFBFBD>'+''''
+' order by <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> desc');
t_ch_balance.open;
end;
procedure Tfrm_ch_balance_accept_hexiao.bsSkinButton3Click(
Sender: TObject);
begin
table_post(t_ch_balance);
end;
procedure Tfrm_ch_balance_accept_hexiao.bsSkinButton9Click(
Sender: TObject);
begin
if StrToBool(get_parameters_value(85,'false')) then
begin
sys_print('Ӧ<>շ<EFBFBD><D5B7>ý<EFBFBD><C3BD><EFBFBD>',2,t_ch_balance1,nil,nil,nil,
fra_ch_delete_do1.v_fee_do_bscard1,nil,
nil,nil,
t_ch_balance1,fra_ch_delete_do1.v_fee_do_bscard_sum1,nil);
end
else
begin
sys_print('Ӧ<>շ<EFBFBD><D5B7>ý<EFBFBD><C3BD><EFBFBD>',2,t_ch_balance1,nil,nil,nil,
fra_ch_delete_do1.v_fee_do_seae1,fra_ch_delete_do1.v_fee_do_seai1,
fra_ch_delete_do1.v_fee_do_aire1,fra_ch_delete_do1.v_fee_do_airi1,
t_ch_balance1,fra_ch_delete_do1.v_fee_do_seae_sum1,fra_ch_delete_do1.v_fee_do_seai_sum1);
end;
end;
procedure Tfrm_ch_balance_accept_hexiao.bsSkinButton38Click(
Sender: TObject);
var
book1:Tbookmark;
begin
bsSkinNotebook1.PageIndex:=0;
book1:=t_ch_balance.GetBookmark;
t_ch_balance.Requery;
t_ch_balance.GotoBookmark(book1);
end;
procedure Tfrm_ch_balance_accept_hexiao.bsSkinNotebook1PageChanged(
Sender: TObject);
begin
if not ch_balance_accept_hexiao_open then exit;
if bsSkinNotebook1.PageIndex<>1 then exit;
getdetail('');
end;
procedure Tfrm_ch_balance_accept_hexiao.fra_ch_add_do1MenuItem1Click(
Sender: TObject);
begin
fra_ch_add_do1.MenuItem1Click(Sender);
end;
end.