|
|
unit u_ch_invoice_hexiao;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, bsSkinCtrls, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, DB,
|
|
|
ADODB, dxDBTLCl, dxGrClms, StdCtrls, DBCtrls, Mask, wwdblook, ComCtrls,
|
|
|
bsSkinTabs, bsdbctrls, RxLookup, u_ch_add_do, u_ch_delete_do,
|
|
|
wwdbdatetimepicker, Menus, XPMenu, wwdbedit, Wwdotdot, Wwdbcomb,
|
|
|
DBCtrlsEh;
|
|
|
|
|
|
type
|
|
|
Tfrm_ch_invoice_hexiao = class(TForm)
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton11: TbsSkinButton;
|
|
|
bsSkinNotebook1: TbsSkinNotebook;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
t_ch_invoice_hexiao: TADOQuery;
|
|
|
t_ch_invoice_hexiao1: TDataSource;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column10: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column18: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column23: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column24: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column15: TdxDBGridColumn;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
Label25: TLabel;
|
|
|
DBEdit14: TDBEdit;
|
|
|
Label18: TLabel;
|
|
|
DBEdit5: TDBEdit;
|
|
|
bsSkinPageControl2: TbsSkinPageControl;
|
|
|
Label1: TLabel;
|
|
|
Label4: TLabel;
|
|
|
DBEdit4: TDBEdit;
|
|
|
Label7: TLabel;
|
|
|
wwDBLookupCombo1: TwwDBLookupCombo;
|
|
|
Label13: TLabel;
|
|
|
DBMemo1: TDBMemo;
|
|
|
Label2: TLabel;
|
|
|
DBEdit2: TDBEdit;
|
|
|
Label5: TLabel;
|
|
|
wwDBLookupCombo3: TwwDBLookupCombo;
|
|
|
Label8: TLabel;
|
|
|
Label14: TLabel;
|
|
|
DBMemo2: TDBMemo;
|
|
|
Label3: TLabel;
|
|
|
Label6: TLabel;
|
|
|
wwDBLookupCombo2: TwwDBLookupCombo;
|
|
|
Label10: TLabel;
|
|
|
DBEdit10: TDBEdit;
|
|
|
Label16: TLabel;
|
|
|
DBMemo3: TDBMemo;
|
|
|
bsSkinTabSheet11: TbsSkinTabSheet;
|
|
|
bsSkinTabSheet22: TbsSkinTabSheet;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
Label12: TLabel;
|
|
|
wwDBLookupCombo4: TwwDBLookupCombo;
|
|
|
t_ch_fee_do: TADOQuery;
|
|
|
fra_ch_delete_do1: Tfra_ch_delete_do;
|
|
|
fra_ch_add_do1: Tfra_ch_add_do;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
XPMenu1: TXPMenu;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N10: TMenuItem;
|
|
|
N11: TMenuItem;
|
|
|
N14: TMenuItem;
|
|
|
N13: TMenuItem;
|
|
|
N12: TMenuItem;
|
|
|
N15: TMenuItem;
|
|
|
N16: TMenuItem;
|
|
|
PopupMenu3: TPopupMenu;
|
|
|
N17: TMenuItem;
|
|
|
N18: TMenuItem;
|
|
|
N34: TMenuItem;
|
|
|
N35: TMenuItem;
|
|
|
N36: TMenuItem;
|
|
|
N1: TMenuItem;
|
|
|
N6: TMenuItem;
|
|
|
N4: TMenuItem;
|
|
|
N5: TMenuItem;
|
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
|
Label20: TLabel;
|
|
|
Label19: TLabel;
|
|
|
DBEdit7: TDBEdit;
|
|
|
Label22: TLabel;
|
|
|
DBEdit3: TDBEdit;
|
|
|
dxDBGrid1Column25: TdxDBGridColumn;
|
|
|
bsSkinButton12: TbsSkinButton;
|
|
|
t_ch_invoice_head: TADOQuery;
|
|
|
t_ch_invoice_head1: TDataSource;
|
|
|
wwDBLookupCombo5: TwwDBLookupCombo;
|
|
|
bsSkinButton38: TbsSkinButton;
|
|
|
Label9: TLabel;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
dxDBGrid1Column19: TdxDBGridColumn;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
t_msg_mold: TADOQuery;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
dxDBGrid1Column20: TdxDBGridColumn;
|
|
|
N2: TMenuItem;
|
|
|
N3: TMenuItem;
|
|
|
Label74: TLabel;
|
|
|
DBNumberEditEh1: TDBNumberEditEh;
|
|
|
Label11: TLabel;
|
|
|
DBEdit1: TDBEdit;
|
|
|
dxDBGrid1Column21: TdxDBGridColumn;
|
|
|
dxDBGrid1Column22: TdxDBGridColumn;
|
|
|
dxDBGrid1Column26: TdxDBGridColumn;
|
|
|
Label15: TLabel;
|
|
|
DBEdit6: TDBEdit;
|
|
|
Label17: TLabel;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
Label21: TLabel;
|
|
|
DBEdit8: TDBEdit;
|
|
|
dxDBGrid1Column27: TdxDBGridColumn;
|
|
|
dxDBGrid1Column28: TdxDBGridColumn;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton11Click(Sender: TObject);
|
|
|
procedure t_ch_invoice_hexiaoAfterInsert(DataSet: TDataSet);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure t_ch_invoice_hexiaoBeforePost(DataSet: TDataSet);
|
|
|
procedure t_ch_invoice_hexiaoAfterPost(DataSet: TDataSet);
|
|
|
procedure RxDBLookupCombo1Enter(Sender: TObject);
|
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure t_ch_invoice_hexiaoAfterDelete(DataSet: TDataSet);
|
|
|
procedure DBEdit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure DBEdit2KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit4KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBLookupCombo3KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBLookupCombo2KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit9KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit11KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo1Change(Sender: TObject);
|
|
|
procedure wwDBDateTimePicker1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
procedure N12Click(Sender: TObject);
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
procedure dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
procedure bsSkinPanel2Resize(Sender: TObject);
|
|
|
procedure DBEdit7KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit5KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBComboBox1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit3KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure bsSkinButton12Click(Sender: TObject);
|
|
|
procedure wwDBLookupCombo5KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure bsSkinButton38Click(Sender: TObject);
|
|
|
procedure bsSkinPageControl2Change(Sender: TObject);
|
|
|
procedure fra_ch_add_do1bsSkinButton8Click(Sender: TObject);
|
|
|
procedure fra_ch_add_do1MenuItem1Click(Sender: TObject);
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
procedure t_msg_moldAfterInsert(DataSet: TDataSet);
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
procedure N3Click(Sender: TObject);
|
|
|
procedure t_ch_invoice_hexiaoBeforeEdit(DataSet: TDataSet);
|
|
|
procedure fra_ch_add_do1N1Click(Sender: TObject);
|
|
|
procedure fra_ch_delete_do1N1Click(Sender: TObject);
|
|
|
private
|
|
|
notdetail:boolean;
|
|
|
procedure t_ch_invoice_shenFieldChange(Sender: TField);
|
|
|
procedure t_ch_invoice_shenKHFieldChange(Sender: TField);
|
|
|
procedure getdetail(balno:string);
|
|
|
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
ch_invoice_hexiao_open:boolean;
|
|
|
frm_ch_invoice_hexiao: Tfrm_ch_invoice_hexiao;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, my_sys_function, u_ch_shen_query, u_data_share, my_sys_chat,
|
|
|
u_ch_invhexiao_query, u_msg_mold;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
ch_invoice_hexiao_open:=false;
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
frm_ch_invoice_hexiao.Hide;
|
|
|
frm_ch_invoice_hexiao.ManualFloat(frm_ch_invoice_hexiao.BoundsRect );
|
|
|
frm_main.freeTabs('frm_ch_invoice_hexiao');
|
|
|
action:=cafree;
|
|
|
frm_ch_invoice_hexiao:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
bsSkinNotebook1.PageIndex:=0;
|
|
|
t_ch_invoice_hexiao.Close;
|
|
|
t_ch_invoice_hexiao.SQL.clear;
|
|
|
t_ch_invoice_hexiao.SQL.Add('select top 100 * from t_ch_invoice_hexiao where 1=1 '
|
|
|
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
|
|
|
t_ch_invoice_hexiao.open;
|
|
|
t_ch_fee_do.open;
|
|
|
t_ch_invoice_head.open;
|
|
|
ch_invoice_hexiao_open:=true;
|
|
|
notdetail:=true;
|
|
|
|
|
|
|
|
|
|
|
|
fra_ch_add_do1.do_ban1.DataSet:=t_ch_invoice_hexiao;
|
|
|
fra_ch_add_do1.bs_text.text:='1';
|
|
|
fra_ch_add_do1.wwDBComboBox31.text:='<27><>';
|
|
|
fra_ch_add_do1.t_ch_fee_do.open;
|
|
|
fra_ch_add_do1.bsSkinCheckRadioBox4.Checked:=False;
|
|
|
fra_ch_add_do1.bsSkinPanel9.Visible:=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_add_do1.do_ban_fee1.DataSet:=fra_ch_delete_do1.v_fee_do_bscard;
|
|
|
|
|
|
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_add_do1.do_ban_fee1.DataSet:=fra_ch_delete_do1.v_fee_do_seae;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
fra_ch_delete_do1.bs_text.Text:='1';
|
|
|
fra_ch_delete_do1.do_ban1.DataSet:=t_ch_invoice_hexiao;
|
|
|
|
|
|
getdetail(t_ch_invoice_hexiao.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
|
|
|
|
|
|
t_ch_invoice_hexiao.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_invoice_shenKHFieldChange;
|
|
|
|
|
|
loadreggrid(dxdbgrid1,false,caption);
|
|
|
frm_data_share.t_crm_client_all.requery;
|
|
|
frm_data_share.t_code_currency.requery;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.bsSkinButton11Click(Sender: TObject);
|
|
|
var
|
|
|
answer:TModalResult;
|
|
|
begin
|
|
|
if bsSkinButton11.Caption='<27>༭<EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
if t_ch_invoice_hexiao.IsEmpty then
|
|
|
exit;
|
|
|
bsSkinNotebook1.PageIndex:=1;
|
|
|
if bsSkinPageControl2.ActivePage<>bsSkinTabSheet11 then
|
|
|
bsSkinPageControl2.ActivePage:=bsSkinTabSheet11;
|
|
|
|
|
|
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if (t_ch_invoice_hexiao.State=dsinsert)or(t_ch_invoice_hexiao.State=dsedit) then
|
|
|
BEGIN
|
|
|
answer:=messagedlg( '<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>ģ<DEB8><C4A3>Ƿ棿',mtWarning,mbYesNoCancel,0);
|
|
|
if answer=mrYes then
|
|
|
begin
|
|
|
t_ch_invoice_hexiao.post;
|
|
|
end;
|
|
|
if answer=mrNo then
|
|
|
begin
|
|
|
t_ch_invoice_hexiao.cancel;
|
|
|
end;
|
|
|
if answer=mrCancel then
|
|
|
begin
|
|
|
exit;
|
|
|
end;
|
|
|
END;
|
|
|
bsSkinNotebook1.PageIndex:=0;
|
|
|
bsSkinButton11.Caption:='<27>༭<EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.t_ch_invoice_hexiaoAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
var
|
|
|
balno:string;
|
|
|
begin
|
|
|
t_ch_invoice_hexiao['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>']:=0;
|
|
|
t_ch_invoice_hexiao['<27>Զ<EFBFBD>']:=1;
|
|
|
t_ch_invoice_hexiao['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='ʵ<>ʿ<EFBFBD>Ʊ';
|
|
|
t_ch_invoice_hexiao['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ɷ<EFBFBD>Ʊ';
|
|
|
t_ch_invoice_hexiao['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_ch_invoice_hexiao['<27>ұ<EFBFBD>']:='RMB';
|
|
|
t_ch_invoice_hexiao['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
t_ch_invoice_hexiao['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
balno:=get_no(date,'HA');
|
|
|
t_ch_invoice_hexiao['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=balno;
|
|
|
getdetail(balno);
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
t_ch_invoice_hexiao.insert;
|
|
|
notdetail:=false;
|
|
|
bsSkinNotebook1.PageIndex:=1;
|
|
|
if bsSkinPageControl2.ActivePage<>bsSkinTabSheet11 then
|
|
|
bsSkinPageControl2.ActivePage:=bsSkinTabSheet11;
|
|
|
notdetail:=true;
|
|
|
|
|
|
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_ch_invoice_hexiao);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
|
|
|
if t_ch_invoice_hexiao.FieldByName('<27><><EFBFBD><EFBFBD>').asboolean then
|
|
|
begin
|
|
|
showmessage('<27><>Ʊ<EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><>ɾ<EFBFBD><C9BE>ƾ֤,<2C><>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>');
|
|
|
Exit;
|
|
|
end;
|
|
|
|
|
|
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
|
|
|
begin
|
|
|
t_ch_fee_do.requery;
|
|
|
while not t_ch_fee_do.eof do
|
|
|
begin
|
|
|
UpdateCostAmt(1,t_ch_fee_do.fieldbyname('CH_ID').AsInteger,t_ch_fee_do.fieldbyname('ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>').AsCurrency);
|
|
|
t_ch_fee_do.delete;
|
|
|
end;
|
|
|
t_ch_invoice_hexiao.Delete;
|
|
|
if bsSkinNotebook1.PageIndex<>0 then
|
|
|
getdetail(t_ch_invoice_hexiao.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.bsSkinButton3Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_ch_invoice_hexiao);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.t_ch_invoice_hexiaoBeforePost(
|
|
|
DataSet: TDataSet);
|
|
|
var aAdoQueryCheck:TAdoQuery;
|
|
|
begin
|
|
|
table_before_post(t_ch_invoice_hexiao,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_ch_invoice_hexiao,'<27>ұ<EFBFBD>');
|
|
|
table_before_post(t_ch_invoice_hexiao,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
aAdoQueryCheck:=CreateAdoQuery;
|
|
|
with aAdoQueryCheck do
|
|
|
try
|
|
|
|
|
|
close;SQL.clear;
|
|
|
sql.add('select ');
|
|
|
sql.Add('sum(case when <20><><EFBFBD><EFBFBD>=''<27><>'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>');
|
|
|
sql.Add(',sum(case when <20><><EFBFBD><EFBFBD>=''<27><>'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>');
|
|
|
sql.Add('from v_fee_do_bscard ');
|
|
|
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=t_ch_invoice_hexiao.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value;
|
|
|
Open;First;
|
|
|
t_ch_invoice_hexiao['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>']:=s_w(2,FieldByName('<27><>').AsFloat-FieldByName('<27><>').AsFloat);
|
|
|
|
|
|
|
|
|
{
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('select ');
|
|
|
sql.Add('sum(<28><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD>');
|
|
|
sql.Add('From t_ch_fee_do');
|
|
|
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:bsno and <20><><EFBFBD><EFBFBD>=1');
|
|
|
Parameters.ParamByName('bsno').Value:=t_ch_invoice_hexiao.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value;
|
|
|
open;First;
|
|
|
if not IsEmpty then
|
|
|
begin
|
|
|
t_ch_invoice_hexiao['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>']:=s_w(2,FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
|
|
|
end;
|
|
|
}
|
|
|
finally
|
|
|
free;
|
|
|
end;
|
|
|
|
|
|
if t_ch_invoice_hexiao.FieldByName('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').AsFloat<>0 then
|
|
|
t_ch_invoice_hexiao.FieldByName('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').AsFloat:=t_ch_invoice_hexiao.FieldByName('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').AsFloat-t_ch_invoice_hexiao.FieldByName('ʵ<>ʽ<EFBFBD><CABD><EFBFBD>').AsFloat;
|
|
|
|
|
|
add_zero(DBMemo2);
|
|
|
t_ch_invoice_hexiao['<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>']:=DBMemo2.text;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.t_ch_invoice_hexiaoAfterPost(
|
|
|
DataSet: TDataSet);
|
|
|
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;
|
|
|
if fra_ch_delete_do1.v_fee_do_bscard.active then begin
|
|
|
fra_ch_delete_do1.v_fee_do_bscard.Requery;
|
|
|
fra_ch_delete_do1.v_fee_do_bscard_sum.Requery;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
{
|
|
|
case delete_do_type_num of
|
|
|
1,2,3,4,5:
|
|
|
begin
|
|
|
check_do_sum(2,t_ch_invoice_shen,
|
|
|
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,5:
|
|
|
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;
|
|
|
delete_do_type_num:=0;
|
|
|
if_ch_delete_do:=false;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.RxDBLookupCombo1Enter(Sender: TObject);
|
|
|
begin
|
|
|
if fra_ch_delete_do1.v_fee_do_seae.IsEmpty and fra_ch_delete_do1.v_fee_do_seai.IsEmpty
|
|
|
and fra_ch_delete_do1.v_fee_do_aire.IsEmpty and fra_ch_delete_do1.v_fee_do_airi.IsEmpty then
|
|
|
begin
|
|
|
RxDBLookupCombo1.ReadOnly:=false;
|
|
|
wwDBLookupCombo4.ReadOnly:=false;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
RxDBLookupCombo1.ReadOnly:=true;
|
|
|
wwDBLookupCombo4.ReadOnly:=true;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.FormCloseQuery(Sender: TObject;
|
|
|
var CanClose: Boolean);
|
|
|
begin
|
|
|
CanClose:=frm_close_query(t_ch_invoice_hexiao);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
if bsSkinNotebook1.PageIndex=0 then
|
|
|
getdetail(t_ch_invoice_hexiao.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
sys_print('ҵ<><D2B5><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>',2,t_ch_invoice_hexiao1,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,fra_ch_delete_do1.v_fee_do_bscard1,t_ch_invoice_hexiao1,nil);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
try
|
|
|
frm_ch_invhexiao_query:=tfrm_ch_invhexiao_query.Create (self);
|
|
|
frm_ch_invhexiao_query.shen_query_type:=1;
|
|
|
frm_ch_invhexiao_query.shen_query_limited:='';
|
|
|
frm_ch_invhexiao_query.shen_query_op_limited:='';
|
|
|
frm_ch_invhexiao_query.ShowModal;
|
|
|
if bsSkinPageControl2.ActivePage<>bsSkinTabSheet11 then
|
|
|
bsSkinPageControl2.ActivePage:=bsSkinTabSheet11;
|
|
|
finally
|
|
|
frm_ch_invhexiao_query.Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.t_ch_invoice_hexiaoAfterDelete(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if fra_ch_add_do1.t_op_seae.Active then
|
|
|
fra_ch_add_do1.t_op_seae.Requery();
|
|
|
if fra_ch_add_do1.t_op_seai.Active then
|
|
|
fra_ch_add_do1.t_op_seai.Requery();
|
|
|
if fra_ch_add_do1.t_op_aire.Active then
|
|
|
fra_ch_add_do1.t_op_aire.Requery();
|
|
|
if fra_ch_add_do1.t_op_airi.Active then
|
|
|
fra_ch_add_do1.t_op_airi.Requery();
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.DBEdit1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit5);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.bsSkinDBCheckRadioBox1KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit3);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.DBEdit2KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBDateTimePicker(Key,wwDBDateTimePicker1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.DBEdit4KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo3);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.wwDBLookupCombo3KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.wwDBLookupCombo2KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.wwDBLookupCombo1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo4);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.DBEdit9KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit10);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.DBEdit11KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBMemo(Key,DBMemo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.RxDBLookupCombo1Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_ch_invoice_hexiao.state=dsinsert)or(t_ch_invoice_hexiao.state=dsedit)then
|
|
|
begin
|
|
|
if not frm_data_share.t_crm_client_all.IsEmpty then
|
|
|
if frm_data_share.t_crm_client_all.locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',RxDBLookupCombo1.DisplayValues[1],[]) then
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client_all.fieldbyname('<27><>Ʊ̧ͷ').asstring<>'' then
|
|
|
t_ch_invoice_hexiao['<27><>Ʊ̧ͷ']:=frm_data_share.t_crm_client_all.fieldbyname('<27><>Ʊ̧ͷ').asstring
|
|
|
else
|
|
|
t_ch_invoice_hexiao['<27><>Ʊ̧ͷ']:=frm_data_share.t_crm_client_all.fieldbyname('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').asstring;
|
|
|
|
|
|
t_ch_invoice_hexiao.FieldByName('˰<><CBB0>').AsFloat:=frm_data_share.t_crm_client_all.FieldByName('˰<><CBB0>').AsFloat;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.wwDBDateTimePicker1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit4);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.N12Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid(dxdbgrid1,10);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
begin
|
|
|
Column_sort(Column,t_ch_invoice_hexiao,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.bsSkinPanel2Resize(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
i:=round(bsSkinPanel2.Width/10);
|
|
|
bsSkinButton10.Width:=i;
|
|
|
bsSkinButton9.Width:=i;
|
|
|
bsSkinButton2.Width:=i;
|
|
|
bsSkinButton3.Width:=i;
|
|
|
bsSkinButton4.Width:=i;
|
|
|
bsSkinButton1.Width:=i;
|
|
|
bsSkinButton11.Width:=i;
|
|
|
bsSkinButton12.Width:=i;
|
|
|
bsSkinButton38.Width:=i;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.DBEdit7KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.DBEdit5KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBComboBox(Key,wwDBComboBox1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.wwDBComboBox1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit7);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.DBEdit3KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo5);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.bsSkinButton12Click(Sender: TObject);
|
|
|
var
|
|
|
afield : variant;
|
|
|
i: Integer;
|
|
|
begin
|
|
|
if t_ch_invoice_hexiao.IsEmpty then
|
|
|
exit;
|
|
|
try
|
|
|
afield := vararraycreate([0,t_ch_invoice_hexiao.fieldcount-1],varvariant);
|
|
|
for i := 0 to (t_ch_invoice_hexiao.fieldcount-1) do
|
|
|
begin
|
|
|
afield[i] :=t_ch_invoice_hexiao.fields[i].value ;
|
|
|
end;
|
|
|
t_ch_invoice_hexiao.insert;
|
|
|
for i := 0 to (t_ch_invoice_hexiao.fieldcount-1) do
|
|
|
begin
|
|
|
if t_ch_invoice_hexiao.fields[i].FieldName<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'then
|
|
|
t_ch_invoice_hexiao.fields[i].value := afield[i] ;
|
|
|
end;
|
|
|
t_ch_invoice_hexiao['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:='';
|
|
|
t_ch_invoice_hexiao['<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>']:='';
|
|
|
t_ch_invoice_hexiao['<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>']:='';
|
|
|
t_ch_invoice_hexiao['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>']:=0;
|
|
|
t_ch_invoice_hexiao['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_ch_invoice_hexiao['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_ch_invoice_hexiao['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
|
|
|
notdetail:=false;
|
|
|
bsSkinNotebook1.PageIndex:=1;
|
|
|
if bsSkinPageControl2.ActivePage<>bsSkinTabSheet11 then
|
|
|
bsSkinPageControl2.ActivePage:=bsSkinTabSheet11;
|
|
|
|
|
|
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
notdetail:=true;
|
|
|
|
|
|
except
|
|
|
if t_ch_invoice_hexiao.state=dsinsert then
|
|
|
t_ch_invoice_hexiao.cancel;
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.wwDBLookupCombo5KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.t_ch_invoice_shenFieldChange(
|
|
|
Sender: TField);
|
|
|
begin
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.bsSkinButton38Click(Sender: TObject);
|
|
|
var
|
|
|
book1:Tbookmark;
|
|
|
begin
|
|
|
book1:=t_ch_invoice_hexiao.GetBookmark;
|
|
|
t_ch_invoice_hexiao.Requery;
|
|
|
t_ch_invoice_hexiao.GotoBookmark(book1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.t_ch_invoice_shenKHFieldChange(
|
|
|
Sender: TField);
|
|
|
begin
|
|
|
if not frm_data_share.t_crm_client_all.IsEmpty then
|
|
|
if frm_data_share.t_crm_client_all.locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_ch_invoice_hexiao['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'],[]) then
|
|
|
begin
|
|
|
if frm_data_share.t_crm_client_all.fieldbyname('<27><>Ʊ̧ͷ').asstring<>'' then
|
|
|
t_ch_invoice_hexiao['<27><>Ʊ̧ͷ']:=frm_data_share.t_crm_client_all.fieldbyname('<27><>Ʊ̧ͷ').asstring
|
|
|
else
|
|
|
t_ch_invoice_hexiao['<27><>Ʊ̧ͷ']:=frm_data_share.t_crm_client_all.fieldbyname('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').asstring;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.bsSkinPageControl2Change(Sender: TObject);
|
|
|
begin
|
|
|
if not ch_invoice_hexiao_open then exit;
|
|
|
if not (bsSkinPageControl2.ActivePage=bsSkinTabSheet22) then exit;
|
|
|
if not notdetail then exit;
|
|
|
|
|
|
getdetail(t_ch_invoice_hexiao.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.getdetail(balno: string);
|
|
|
begin
|
|
|
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>='''+balno+''' order by <20><><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 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>='''+balno+''' group by 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><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>='''+balno+''' order by <20><><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>='''+balno+''' order by <20><><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>='''+balno+''' order by <20><><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>='''+balno+''' order by <20><><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 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>='''+balno+''' group by 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><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 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>='''+balno+''' group by 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><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 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>='''+balno+''' group by 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><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 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>='''+balno+''' group by 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><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_invoice_hexiao.fra_ch_add_do1bsSkinButton8Click(
|
|
|
Sender: TObject);
|
|
|
begin
|
|
|
fra_ch_add_do1.bsSkinButton8Click(Sender);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.fra_ch_add_do1MenuItem1Click(
|
|
|
Sender: TObject);
|
|
|
begin
|
|
|
fra_ch_add_do1.MenuItem1Click(Sender);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
t_msg_mold.Close;
|
|
|
t_msg_mold.sql.text:='select * from t_sys_msgmold where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><>Ʊģ<C6B1><C4A3>'' ';
|
|
|
t_msg_mold.open;
|
|
|
if t_msg_mold.IsEmpty then t_msg_mold.Insert;
|
|
|
frm_msg_mold:=Tfrm_msg_mold.create(self);
|
|
|
try
|
|
|
frm_msg_mold.transtype:=5;
|
|
|
frm_msg_mold.t_msg_mold1.DataSet:=t_msg_mold;
|
|
|
frm_msg_mold.ShowModal;
|
|
|
finally
|
|
|
FreeAndNil(frm_msg_mold);
|
|
|
end;
|
|
|
|
|
|
|
|
|
{
|
|
|
frm_send_msg:=Tfrm_send_msg.Create(self);
|
|
|
frm_send_msg.transtype:=5;
|
|
|
|
|
|
case frm_send_msg.transtype of
|
|
|
5:
|
|
|
begin
|
|
|
frm_send_msg.t_msg_mold.Close;
|
|
|
frm_send_msg.t_msg_mold.sql.text:='select * from t_sys_msgmold where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><>Ʊģ<C6B1><C4A3>'' ';
|
|
|
frm_send_msg.t_msg_mold.open;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
try
|
|
|
// frm_send_msg.memmsg.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=getstrfromdataset(t_op_state.DataSource.DataSet,frm_send_msg.t_msg_mold.fieldbyname('ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
|
|
|
frm_send_msg.ShowModal;
|
|
|
finally
|
|
|
FreeAndNil(frm_send_msg);
|
|
|
end;
|
|
|
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.t_msg_moldAfterInsert(DataSet: TDataSet);
|
|
|
begin
|
|
|
dataset.FieldByName('<27><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>').AsString:='<27><>Ʊģ<C6B1><C4A3>';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.bsSkinButton7Click(Sender: TObject);
|
|
|
var s:string;
|
|
|
aAdoQuery:TADOQuery;
|
|
|
begin
|
|
|
s:='';
|
|
|
t_msg_mold.Close;
|
|
|
t_msg_mold.sql.text:='select * from t_sys_msgmold where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><>Ʊģ<C6B1><C4A3>'' ';
|
|
|
t_msg_mold.open;
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
try
|
|
|
close;
|
|
|
SQL.clear;
|
|
|
sql.add('select <20><><EFBFBD><EFBFBD>,ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,ί<>б<EFBFBD><D0B1><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
sql.Add(',sum(case when <20>ұ<EFBFBD>=''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
sql.Add(',sum(case when <20>ұ<EFBFBD><>''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD>');
|
|
|
sql.Add('from v_fee_do_bscard ');
|
|
|
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
|
|
|
sql.Add('Group by <20><><EFBFBD><EFBFBD>,ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,ί<>б<EFBFBD><D0B1><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
sql.Add('order by <20><><EFBFBD><EFBFBD>,ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,ί<>б<EFBFBD><D0B1><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=t_ch_invoice_hexiao.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
Open;First;
|
|
|
while not eof do
|
|
|
begin
|
|
|
if Trim(s)='' then
|
|
|
s:=getstrfromdataset(aAdoQuery,t_msg_mold.fieldbyname('ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
|
|
|
else
|
|
|
s:=s+#13#10+getstrfromdataset(aAdoQuery,t_msg_mold.fieldbyname('ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)+' ';
|
|
|
Next;
|
|
|
end;
|
|
|
t_ch_invoice_hexiao.Edit;
|
|
|
t_ch_invoice_hexiao.FieldByName('<27><>ע').AsString:=s;
|
|
|
t_ch_invoice_hexiao.Post;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.N3Click(Sender: TObject);
|
|
|
var i:Integer;
|
|
|
s:string;
|
|
|
aAdoQuery:TADOQuery;
|
|
|
begin
|
|
|
s:='';
|
|
|
t_msg_mold.Close;
|
|
|
t_msg_mold.sql.text:='select * from t_sys_msgmold where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><>Ʊģ<C6B1><C4A3>'' ';
|
|
|
t_msg_mold.open;
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
try
|
|
|
close;
|
|
|
SQL.clear;
|
|
|
sql.add('select <20><><EFBFBD><EFBFBD>,ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,ί<>б<EFBFBD><D0B1><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
sql.Add(',sum(case when <20>ұ<EFBFBD>=''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
sql.Add(',sum(case when <20>ұ<EFBFBD><>''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD>');
|
|
|
sql.Add('from v_fee_do_bscard ');
|
|
|
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
|
|
|
sql.Add('Group by <20><><EFBFBD><EFBFBD>,ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,ί<>б<EFBFBD><D0B1><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
sql.Add('order by <20><><EFBFBD><EFBFBD>,ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,ί<>б<EFBFBD><D0B1><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
if dxDBGrid1.SelectedCount>=1 then
|
|
|
for i:=0 to dxDBGrid1.SelectedCount-1 do
|
|
|
begin
|
|
|
t_ch_invoice_hexiao1.DataSet.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
|
|
|
s:='';
|
|
|
Close;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=t_ch_invoice_hexiao.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
Open;First;
|
|
|
while not eof do
|
|
|
begin
|
|
|
if Trim(s)='' then
|
|
|
s:=getstrfromdataset(aAdoQuery,t_msg_mold.fieldbyname('ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
|
|
|
else
|
|
|
s:=s+#13#10+getstrfromdataset(aAdoQuery,t_msg_mold.fieldbyname('ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)+' ';
|
|
|
Next;
|
|
|
end;
|
|
|
t_ch_invoice_hexiao.Edit;
|
|
|
t_ch_invoice_hexiao.FieldByName('<27><>ע').AsString:=s;
|
|
|
t_ch_invoice_hexiao.Post;
|
|
|
////
|
|
|
end;
|
|
|
finally
|
|
|
showmessage('<27><><EFBFBD><EFBFBD>'+IntTostr(dxDBGrid1.SelectedCount));
|
|
|
Free;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.t_ch_invoice_hexiaoBeforeEdit(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if t_ch_invoice_hexiao.FieldByName('<27><><EFBFBD><EFBFBD>').asboolean then
|
|
|
begin
|
|
|
showmessage('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.fra_ch_add_do1N1Click(Sender: TObject);
|
|
|
begin
|
|
|
fra_ch_add_do1.N1Click(Sender);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_ch_invoice_hexiao.fra_ch_delete_do1N1Click(Sender: TObject);
|
|
|
begin
|
|
|
fra_ch_delete_do1.N1Click(Sender);
|
|
|
|
|
|
end;
|
|
|
|
|
|
end.
|