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.

899 lines
30 KiB
Plaintext

This file contains ambiguous Unicode characters!

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

unit u_op_seae_order;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, ExtCtrls, DB, ADODB, dxExEdtr, dxCntner, dxTL,
dxDBCtrl, dxDBGrid, ComCtrls, bsSkinTabs, RxLookup, StdCtrls, Mask,
DBCtrls, wwdbdatetimepicker, wwdblook, Menus,
dxDBTLCl, dxGrClms, bsdbctrls, XPMenu, Grids, Wwdbigrd, Wwdbgrid,
wwdbedit, Wwdotdot, Wwdbcomb;
type
Tfrm_op_seae_order = class(TForm)
Panel2: TPanel;
t_op_seae: TADOQuery;
t_op_seae1: TDataSource;
PopupMenu3: TPopupMenu;
N37: TMenuItem;
N38: TMenuItem;
N62: TMenuItem;
N25: TMenuItem;
N64: TMenuItem;
N63: TMenuItem;
N17: TMenuItem;
N18: TMenuItem;
N34: TMenuItem;
N35: TMenuItem;
N36: TMenuItem;
XPMenu1: TXPMenu;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
t_op_ctn: TADOQuery;
t_op_ctn1: TDataSource;
t_op_seae_order1: TDataSource;
t_op_seae_order: TADOQuery;
t_ch_fee: TADOQuery;
t_ch_fee1: TDataSource;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinPanel4: TbsSkinPanel;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column10: TdxDBGridColumn;
dxDBGrid1Column9: TdxDBGridColumn;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column114: TdxDBGridColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridDateColumn;
dxDBGrid1Column6: TdxDBGridColumn;
dxDBGrid1Column7: TdxDBGridColumn;
dxDBGrid1Column8: TdxDBGridColumn;
bsSkinPanel3: TbsSkinPanel;
Label6: TLabel;
Label39: TLabel;
Label14: TLabel;
Label9: TLabel;
Label10: TLabel;
Label5: TLabel;
Label3: TLabel;
Label7: TLabel;
Edit1: TEdit;
wwDBComboBox44: TwwDBComboBox;
RxDBLookupCombo2: TRxDBLookupCombo;
wwDBDateTimePicker1: TwwDBDateTimePicker;
wwDBDateTimePicker3: TwwDBDateTimePicker;
wwDBDateTimePicker5: TwwDBDateTimePicker;
wwDBDateTimePicker6: TwwDBDateTimePicker;
bsSkinButton10: TbsSkinButton;
bsSkinButton15: TbsSkinButton;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinPanel1: TbsSkinPanel;
Label19: TLabel;
Label4: TLabel;
Label2: TLabel;
RxDBLookupCombo12: TRxDBLookupCombo;
RxDBLookupCombo1: TRxDBLookupCombo;
DBEdit2: TDBEdit;
t_op_fee: TADOQuery;
bsSkinPanel2: TbsSkinPanel;
bsSkinButton7: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton38: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
dxDBGrid1Column11: TdxDBGridColumn;
bsSkinPageControl2: TbsSkinPageControl;
tab1: TbsSkinTabSheet;
bsSkinGroupBox1: TbsSkinGroupBox;
Label15: TLabel;
Label13: TLabel;
Label35: TLabel;
Label8: TLabel;
Label12: TLabel;
Label20: TLabel;
Label11: TLabel;
Label1: TLabel;
wwDBDateTimePicker2: TwwDBDateTimePicker;
DBEdit5: TDBEdit;
RxDBLookupCombo28: TRxDBLookupCombo;
bsSkinGroupBox5: TbsSkinGroupBox;
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox3: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox4: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox5: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox9: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox6: TbsSkinDBCheckRadioBox;
bsSkinGroupBox2: TbsSkinGroupBox;
wwDBLookupCombo1: TwwDBLookupCombo;
wwDBLookupCombo3: TwwDBLookupCombo;
wwDBLookupCombo5: TwwDBLookupCombo;
wwDBComboBox3: TwwDBComboBox;
wwDBComboBox4: TwwDBComboBox;
wwDBLookupCombo2: TwwDBLookupCombo;
wwDBLookupCombo4: TwwDBLookupCombo;
wwDBGrid1: TwwDBGrid;
wwDBComboBox1: TwwDBComboBox;
DBMemo1: TDBMemo;
wwDBDateTimePicker7: TwwDBDateTimePicker;
bsSkinDBCheckRadioBox7: TbsSkinDBCheckRadioBox;
RxDBLookupCombo8: TRxDBLookupCombo;
DBEdit1: TDBEdit;
bsSkinGroupBox3: TbsSkinGroupBox;
Label16: TLabel;
Label17: TLabel;
wwDBComboBox2: TwwDBComboBox;
DBEdit3: TDBEdit;
Label122: TLabel;
Label121: TLabel;
Label123: TLabel;
Label21: TLabel;
Label163: TLabel;
Label165: TLabel;
Label166: TLabel;
Label167: TLabel;
Label169: TLabel;
Label170: TLabel;
Label32: TLabel;
Label27: TLabel;
Label30: TLabel;
DBMemo33: TDBMemo;
RxDBLookupCombo4: TRxDBLookupCombo;
wwDBLookupCombo6: TwwDBLookupCombo;
RxDBLookupCombo5: TRxDBLookupCombo;
wwDBLookupCombo7: TwwDBLookupCombo;
DBMemo34: TDBMemo;
DBMemo35: TDBMemo;
RxDBLookupCombo6: TRxDBLookupCombo;
wwDBLookupCombo8: TwwDBLookupCombo;
DBMemo39: TDBMemo;
DBMemo38: TDBMemo;
DBMemo40: TDBMemo;
DBMemo41: TDBMemo;
DBMemo42: TDBMemo;
wwDBLookupCombo61: TwwDBLookupCombo;
DBEdit81: TDBEdit;
DBEdit82: TDBEdit;
DBEdit83: TDBEdit;
wwDBLookupCombo21: TwwDBLookupCombo;
DBEdit25: TDBEdit;
RxDBLookupCombo15: TRxDBLookupCombo;
Label22: TLabel;
wwDBLookupCombo9: TwwDBLookupCombo;
Label124: TLabel;
wwDBLookupCombo52: TwwDBLookupCombo;
bsSkinButton2: TbsSkinButton;
dxDBGrid1Column12: TdxDBGridColumn;
dxDBGrid1Column13: TdxDBGridColumn;
lblsales: TLabel;
Label23: TLabel;
DBEdit4: TDBEdit;
Label26: TLabel;
wwDBDateTimePicker4: TwwDBDateTimePicker;
Label24: TLabel;
DBEdit6: TDBEdit;
dxDBGrid1Column14: TdxDBGridColumn;
dxDBGrid1Column15: TdxDBGridColumn;
dxDBGrid1Column16: TdxDBGridColumn;
Label25: TLabel;
RxDBLookupCombo7: TRxDBLookupCombo;
dxDBGrid1Column17: TdxDBGridColumn;
Label29: TLabel;
wwDBComboBox5: TwwDBComboBox;
dxDBGrid1Column18: TdxDBGridColumn;
Label28: TLabel;
wwDBLookupCombo10: TwwDBLookupCombo;
dxDBGrid1Column19: TdxDBGridColumn;
dxDBGrid1Column20: TdxDBGridColumn;
dxDBGrid1Column21: TdxDBGridColumn;
dxDBGrid1Column22: TdxDBGridColumn;
dxDBGrid1Column23: TdxDBGridColumn;
dxDBGrid1Column24: TdxDBGridColumn;
dxDBGrid1Column25: TdxDBGridColumn;
dxDBGrid1Column26: TdxDBGridColumn;
dxDBGrid1Column27: TdxDBGridColumn;
dxDBGrid1Column28: TdxDBGridColumn;
dxDBGrid1Column29: TdxDBGridColumn;
dxDBGrid1Column30: TdxDBGridColumn;
Label33: TLabel;
RxDBLookupCombo9: TRxDBLookupCombo;
Label119: TLabel;
wwDBComboBox8: TwwDBComboBox;
Label109: TLabel;
DBEdit37: TDBEdit;
Label108: TLabel;
DBEdit38: TDBEdit;
dxDBGrid1Column31: TdxDBGridColumn;
dxDBGrid1Column32: TdxDBGridColumn;
dxDBGrid1Column33: TdxDBGridColumn;
dxDBGrid1Column34: TdxDBGridColumn;
DBEdit8: TDBEdit;
Label34: TLabel;
t_ch_fee_agentdc_detail: TADOQuery;
t_ch_fee_agentdc: TADOQuery;
Label31: TLabel;
DBMemo3: TDBMemo;
bsSkinTabSheet3: TbsSkinTabSheet;
t_ch_accept1: TDataSource;
t_ch_pay1: TDataSource;
t_ch_accept: TADOQuery;
t_ch_pay: TADOQuery;
dxDBGrid3: TdxDBGrid;
dxDBGridColumn2: TdxDBGridColumn;
dxDBGridColumn3: TdxDBGridColumn;
dxDBGridColumn4: TdxDBGridColumn;
dxDBGridColumn5: TdxDBGridColumn;
dxDBGridColumn6: TdxDBGridColumn;
dxDBGridColumn7: TdxDBGridColumn;
dxDBGridColumn8: TdxDBGridColumn;
dxDBGridColumn9: TdxDBGridColumn;
dxDBGridColumn10: TdxDBGridColumn;
dxDBGrid2: TdxDBGrid;
dxDBGridColumn1: TdxDBGridColumn;
dxDBGrid2Column2: TdxDBGridColumn;
dxDBGrid2Column3: TdxDBGridColumn;
dxDBGrid2Column4: TdxDBGridColumn;
dxDBGrid2Column5: TdxDBGridColumn;
dxDBGrid2Column6: TdxDBGridColumn;
dxDBGrid2Column8: TdxDBGridColumn;
dxDBGrid2Column9: TdxDBGridColumn;
dxDBGrid2Column7: TdxDBGridColumn;
Panel1: TPanel;
Memo1: TMemo;
t_op_seae_query: TADOQuery;
bsSkinButton4: TbsSkinButton;
RxDBLookupCombo3: TRxDBLookupCombo;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Panel2Resize(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton38Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure RxDBLookupCombo20KeyPress(Sender: TObject; var Key: Char);
procedure t_op_ctnAfterPost(DataSet: TDataSet);
procedure bsSkinButton15Click(Sender: TObject);
procedure t_op_feeAfterInsert(DataSet: TDataSet);
procedure t_op_ctnAfterInsert(DataSet: TDataSet);
procedure dxDBGrid1DblClick(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure dxDBGrid1Column9CustomDraw(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 dxDBGrid1CustomDraw(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 t_ch_fee_agentdcAfterInsert(DataSet: TDataSet);
procedure t_ch_fee_agentdc_detailAfterInsert(DataSet: TDataSet);
procedure bsSkinPageControl2Change(Sender: TObject);
procedure RxDBLookupCombo12Exit(Sender: TObject);
procedure RxDBLookupCombo12Enter(Sender: TObject);
private
procedure t_billsalescharge(Sender: TField);
procedure OpFeeItem(bsNo:string);
procedure getsumstr;
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_seae_order: Tfrm_op_seae_order;
implementation
uses u_main,u_data_share, my_sys_function, u_sys_progress,
u_op_seae_oder_add;
{$R *.dfm}
procedure Tfrm_op_seae_order.OpFeeItem(bsno:string);
begin
if if_open('293') then
begin
if (strtobool(get_parameters_value(153,'false'))=true) then begin
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
begin
t_ch_accept.close;
t_ch_accept.SQL.Clear;
t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and (¼<><C2BC><EFBFBD><EFBFBD>='
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><>1) ) and '+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+' order by ˳<><CBB3>,CH_ID');
// t_ch_accept.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
t_ch_accept.open;
end else begin
t_ch_accept.close;
t_ch_accept.SQL.Clear;
t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and '
+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+' order by ˳<><CBB3>,CH_ID');
// t_ch_accept.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
t_ch_accept.open;
end;
end else begin
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
begin
t_ch_accept.close;
t_ch_accept.SQL.Clear;
t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and (¼<><C2BC><EFBFBD><EFBFBD>='
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><>1) ) order by ˳<><CBB3>,CH_ID');
t_ch_accept.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
// t_ch_accept.open;
end;
end;
end;
if if_open('294') then
begin
if (strtobool(get_parameters_value(153,'false'))=true) then
begin
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
begin
t_ch_pay.close;
t_ch_pay.SQL.Clear;
t_ch_pay.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and (¼<><C2BC><EFBFBD><EFBFBD>='
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><>1) ) and '+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+' order by ˳<><CBB3>,CH_ID');
// t_ch_pay.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
t_ch_pay.open;
end
else
begin
t_ch_pay.close;
t_ch_pay.SQL.Clear;
t_ch_pay.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and '
+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+' order by ˳<><CBB3>,CH_ID');
// t_ch_pay.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
t_ch_pay.open;
end;
end
else
begin
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
begin
t_ch_pay.close;
t_ch_pay.SQL.Clear;
t_ch_pay.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>='+''''+bsno+''''+ ' and (¼<><C2BC><EFBFBD><EFBFBD>='
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><>1) ) order by ˳<><CBB3>,CH_ID');
// t_ch_pay.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
t_ch_pay.open;
end;
end;
end;
end;
procedure Tfrm_op_seae_order.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_seae_order.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
frm_op_seae_order.Hide;
frm_op_seae_order.ManualFloat(frm_op_seae_order.BoundsRect );
frm_main.freeTabs('frm_op_seae_order');
action:=cafree;
frm_op_seae_order:=nil;
end;
procedure Tfrm_op_seae_order.Panel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel2.Width/11);
bsSkinButton7.Width:=i;
bsSkinButton6.Width:=i;
bsSkinButton9.Width:=i;
bsSkinButton1.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton38.Width:=i;
end;
procedure Tfrm_op_seae_order.bsSkinButton7Click(Sender: TObject);
begin
table_Prior(t_op_seae_order);
end;
procedure Tfrm_op_seae_order.bsSkinButton6Click(Sender: TObject);
begin
table_next(t_op_seae_order);
end;
procedure Tfrm_op_seae_order.bsSkinButton9Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3>ڶ<EFBFBD><DAB6>տ<EFBFBD><D5BF><EFBFBD><EFBFBD><EFBFBD>',2,t_op_seae1,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_seae_order.bsSkinButton3Click(Sender: TObject);
var
str:string;
begin
if (t_op_seae_order['״̬']='<27><><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>') then begin
MessageDlg('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ܶ<EFBFBD><DCB6>ղ<EFBFBD><D5B2>ܲ<EFBFBD><DCB2>أ<EFBFBD>', mtConfirmation, [mbYes],0);
exit;
end;
str:=trim(InputBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2B5>ԭ<EFBFBD><D4AD>', '<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD>', ''));
if str=''then
begin
showmessage('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
exit;
end
else if str=''then
begin
exit;
end;
t_op_seae_order.Edit;
t_op_seae_order['״̬']:='<27><><EFBFBD>ض<EFBFBD><D8B6><EFBFBD>';
t_op_seae_order['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=str;
t_op_seae_order.Post;
{
Send_op_do('<27><><EFBFBD>۶<EFBFBD><DBB6>ղ<EFBFBD><D5B2><EFBFBD><>б<EFBFBD><D0B1><EFBFBD>:'+t_op_seae_order.fieldbyname('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString,'72',
'','',t_op_seae_order.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
}
end;
procedure Tfrm_op_seae_order.bsSkinButton38Click(Sender: TObject);
var
book1:Tbookmark;
begin
book1:=t_op_seae_order.GetBookmark;
t_op_seae_order.Requery;
t_op_seae_order.GotoBookmark(book1);
end;
procedure Tfrm_op_seae_order.FormShow(Sender: TObject);
begin
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ򡣡<C8BA><F2A1A3A1><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=28;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
t_op_seae.Close;
t_op_seae.open;
t_op_seae_order.Close;
t_op_seae_order.SQL.clear;
t_op_seae_order.SQL.Add('select * from t_op_seae_order where ״̬ in (''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'',''<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'',''<27><><EFBFBD><EFBFBD><EFBFBD>ύ'') and '
+open_data('0021','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no')
+' order by ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_op_seae_order.open;
t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_billsalescharge;
t_op_seae_order.FieldByName('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_billsalescharge;
t_billsalescharge(nil);
t_ch_fee.Open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
loadreggrid(dxdbgrid1,false,caption);
if if_open('330') then begin
bsSkinButton1.Visible:=true;
bsSkinButton2.Visible:=false;
end else begin
bsSkinButton1.Visible:=false;
bsSkinButton2.Visible:=true;
end;
{
if frm_data_share.t_code_ctn.locate('<27><><EFBFBD><EFBFBD>',trim(frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>1').asstring),[]) then
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD>1').Caption:=
trim(frm_data_share.t_code_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring);
}
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
procedure Tfrm_op_seae_order.bsSkinButton1Click(Sender: TObject);
begin
if t_op_seae=nil then
exit;
if t_op_seae_order=nil then
exit;
if IsSeaeOrder(t_op_seae_order.fieldbyname('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString) then
begin
MessageDlg('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>,<2C><><EFBFBD><EFBFBD>Ҫȷ<D2AA><C8B7>,<2C><>ˢ<EFBFBD>£<EFBFBD>', mtConfirmation, [mbYes],0);
exit;
end;
if (t_op_seae_order['״̬']<>'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>') and (t_op_seae_order['״̬']<>'<27><><EFBFBD><EFBFBD><EFBFBD>ύ') and (t_op_seae_order['״̬']<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') then begin
MessageDlg('<27><>ǰ״̬:'+t_op_seae_order.FieldByName('״̬').AsString+'<27><><EFBFBD>ܽ<EFBFBD><DCBD>ܶ<EFBFBD><DCB6>գ<EFBFBD>', mtConfirmation, [mbYes],0);
exit;
end;
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit) then
t_op_seae.post;
try
frm_op_seae_order_add:=tfrm_op_seae_order_add.Create (self);
frm_op_seae_order_add.data1.Enabled:=false;
frm_op_seae_order_add.data1.DataSet:=t_op_seae;
frm_op_seae_order_add.data1.Enabled:=true;
frm_op_seae_order_add.data2.Enabled:=false;
frm_op_seae_order_add.data2.DataSet:=t_op_seae_order;
frm_op_seae_order_add.data2.Enabled:=true;
frm_op_seae_order_add.data3.Enabled:=false;
frm_op_seae_order_add.data3.DataSet:=t_op_ctn;
frm_op_seae_order_add.data3.Enabled:=true;
frm_op_seae_order_add.data4.Enabled:=false;
frm_op_seae_order_add.data4.DataSet:=t_op_fee;
frm_op_seae_order_add.data4.Enabled:=true;
frm_op_seae_order_add.data5.Enabled:=false;
frm_op_seae_order_add.data5.DataSet:=t_ch_fee;
frm_op_seae_order_add.data5.Enabled:=true;
frm_op_seae_order_add.ShowModal;
finally
frm_op_seae_order_add.Free;
frm_op_seae_order_add:=nil;
end;
end;
procedure Tfrm_op_seae_order.bsSkinButton10Click(Sender: TObject);
var
str:string;
begin
str:=' and '+open_data('0021','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no');
if Edit1.text<>''then
str:=str+' and <20><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
if wwDBComboBox44.text<>''then
str:=str+' and ״̬='+''''+wwDBComboBox44.text+'''';
if RxDBLookupCombo2.DisplayValues[1]<>''then
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
if RxDBLookupCombo3.DisplayValue<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo3.DisplayValue+'''';
if wwDBDateTimePicker1.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
if wwDBDateTimePicker3.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker3.text+'''';
if wwDBDateTimePicker5.text<>''then
str:=str+' and ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker5.text+'''';
if wwDBDateTimePicker6.text<>''then
str:=str+' and ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker6.text+'''';
t_op_seae_order.Close;
t_op_seae_order.SQL.clear;
t_op_seae_order.SQL.Add('select * from t_op_seae_order where 1=1 '
+str
+' order by ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_op_seae_order.open;
end;
procedure Tfrm_op_seae_order.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_op_seae_order.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_op_seae_order.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,101);
end;
procedure Tfrm_op_seae_order.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_op_seae_order.RxDBLookupCombo20KeyPress(Sender: TObject;
var Key: Char);
begin
// key_wwDBLookupCombo(Key,wwDBLookupCombo1);
end;
procedure Tfrm_op_seae_order.t_op_ctnAfterPost(DataSet: TDataSet);
begin
// update_ctn(t_op_ctn);
end;
procedure Tfrm_op_seae_order.bsSkinButton15Click(Sender: TObject);
begin
Edit1.text:='';
wwDBComboBox44.text:='';
RxDBLookupCombo2.ClearValue;
RxDBLookupCombo3.ClearValue;
wwDBDateTimePicker1.text:='';
wwDBDateTimePicker3.text:='';
wwDBDateTimePicker5.text:='';
wwDBDateTimePicker6.text:='';
end;
procedure Tfrm_op_seae_order.t_op_feeAfterInsert(DataSet: TDataSet);
begin
t_op_fee['<27><><EFBFBD><EFBFBD>']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
end;
procedure Tfrm_op_seae_order.t_op_ctnAfterInsert(DataSet: TDataSet);
begin
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
end;
procedure Tfrm_op_seae_order.dxDBGrid1DblClick(Sender: TObject);
begin
bsSkinPageControl1.ActivePageIndex:=1;
end;
procedure Tfrm_op_seae_order.bsSkinButton2Click(Sender: TObject);
begin
if (t_op_seae_order['״̬']<>'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>') and (t_op_seae_order['״̬']<>'<27><><EFBFBD><EFBFBD><EFBFBD>ύ') then begin
MessageDlg('<27><>ǰ״̬<D7B4><CCAC>:'+t_op_seae_order.fieldByName('״̬').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>', mtConfirmation, [mbYes],0);
exit;
end;
t_op_seae_order.Edit;
t_op_seae_order['״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
t_op_seae_order['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_op_seae_order['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=Now;
t_op_seae_order.Post;
end;
procedure Tfrm_op_seae_order.t_billsalescharge(Sender: TField);
begin
lblsales.Caption:='';
if (t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>'') and (t_op_seae_order.FieldByName('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>'') then
if t_op_seae_order.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>t_op_seae_order.FieldByName('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString then begin
lblsales.Caption:='ע<><EFBFBD><E2A3BA>ί<EFBFBD>е<EFBFBD>λ<EFBFBD><CEBB>Ĭ<EFBFBD><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ'+t_op_seae_order.FieldByName('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
end;
end;
procedure Tfrm_op_seae_order.dxDBGrid1Column9CustomDraw(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[dxDBGrid1Column9.Index]='<27><><EFBFBD>ض<EFBFBD><D8B6><EFBFBD>' then
AColor:=clRed;
if ANode.Strings[dxDBGrid1Column9.Index]='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
AColor:=clYellow;
if ANode.Strings[dxDBGrid1Column9.Index]='<27><><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>' then
AColor:=clGreen;
AFont.Color:=clblack;
end;
procedure Tfrm_op_seae_order.dxDBGrid1CustomDraw(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 trim(ANode.Strings[dxDBGrid1Column9.Index])='<27><><EFBFBD>˲<EFBFBD>' then begin
AFont.Style:=AFont.Style+[fsStrikeOut];
AFont.Color:=clred;
end;
if trim(ANode.Strings[dxDBGrid1Column9.Index])='<27><><EFBFBD>ƺ<EFBFBD><C6BA><EFBFBD>' then begin
// AFont.Style:=AFont.Style+[fsStrikeOut];
AColor:=clFuchsia;
end;
if trim(ANode.Strings[dxDBGrid1Column9.Index])='<27>Ѹĸ<D1B8>' then begin
// AFont.Style:=AFont.Style+[fsStrikeOut];
AColor:=clYellow;
end;
end;
procedure Tfrm_op_seae_order.t_ch_fee_agentdcAfterInsert(
DataSet: TDataSet);
begin
t_ch_fee_agentdc['<27><><EFBFBD><EFBFBD>']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
end;
procedure Tfrm_op_seae_order.t_ch_fee_agentdc_detailAfterInsert(
DataSet: TDataSet);
begin
t_ch_fee_agentdc_detail['ad_id']:=t_ch_fee_agentdc['ad_id']
end;
procedure Tfrm_op_seae_order.getsumstr;
var
aQuery1,aQuery2:TAdoQuery;
str1,str2:string;
acceptstr,paystr:widestring;
accepteof,payeof:boolean;
armb,ausd,aot,atotal,prmb,pusd,pot,ptotal:double;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD><C2B2>ϼ<EFBFBD><CFBC>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
memo1.Lines.Clear;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) and (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then exit;
aQuery1:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
armb:=0;
ausd:=0;
aot:=0;
atotal:=0;
prmb:=0;
pusd:=0;
pot:=0;
ptotal:=0;
try
accepteof:=false;
payeof:=false;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) then
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
acceptstr:=new_query(t_ch_accept);
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+acceptstr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery1.DataSource:=t_ch_accept.DataSource;
end;
aQuery1.Open;
aQuery1.first;
if (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
paystr:=new_query(t_ch_pay);
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+paystr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery2.DataSource:=t_ch_pay.DataSource;
end;
aQuery2.Open;
aQuery2.first;
while (not aQuery1.Eof) or (not aQuery2.Eof) do begin
if aQuery1.Eof then begin
str1:=FixLenStr('',72);
end else begin
str1:=FixLenStr(aQuery1.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
armb:=armb+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
ausd:=ausd+aquery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
aot:=aot+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
atotal:=atotal+aquery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery1.Next;
end;
if aQuery2.Eof then begin
str2:=FixLenStr('',72);
end else begin
str2:=FixLenStr(aQuery2.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
prmb:=prmb+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
pusd:=pusd+aquery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
pot:=pot+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
ptotal:=ptotal+aquery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery2.Next;
end;
memo1.Lines.Add(str1+'|'+str2);
end;
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('Ӧ<>պϼ<D5BA>',20)+' '+FixLenStr(FormatFloat('#,##0.00',armb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal),12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',20)+' '+FixLenStr(FormatFloat('#,##0.00',prmb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',pusd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',pot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ptotal),12,' ',false);
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>:',20)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',armb-prmb),12,' ',false)
+' '+FixLenStr('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd-pusd),12,' ',false);
str2:=FixLenStr('',19)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>:',13,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aot-pot),12,' ',false)
+' '+FixLenStr('<27>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal-ptotal),12,' ',false);
if if_open('226') then
memo1.Lines.Add(str1+'|'+str2);
if if_open('319') then
memo1.Lines.Add(str1+'|'+str2);
finally
freeandnil(aQuery1);
freeandnil(aQuery2);
end;
if memo1.Lines.Count>0 then begin
str1:=FixLenStr('Ӧ<>տͻ<D5BF>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<>պϼ<D5BA>',12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',12,' ',false);
Memo1.Lines.Insert(0,str1+'|'+str2);
end;
end;
procedure Tfrm_op_seae_order.bsSkinPageControl2Change(Sender: TObject);
begin
if bsSkinPageControl2.TabIndex=2 then
begin
if t_op_seae_order.IsEmpty then exit;
t_op_seae_query.Close;
t_op_seae_query.Parameters.ParamByName('ί<>б<EFBFBD><D0B1><EFBFBD>').Value:=t_op_seae_order.fieldbyName('<27><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>').AsString;
t_op_seae_query.Open;
if Trim(t_op_seae_query.fieldbyName('<27><><EFBFBD><EFBFBD>').AsString)<>'' then
OpFeeItem(t_op_seae_query.fieldbyName('<27><><EFBFBD><EFBFBD>').AsString);
getsumstr;
end;
end;
procedure Tfrm_op_seae_order.RxDBLookupCombo12Exit(Sender: TObject);
begin
TRxDBLookupCombo(Sender).LookupDisplay:='<27><><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_order.RxDBLookupCombo12Enter(Sender: TObject);
begin
TRxDBLookupCombo(Sender).LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD>';
end;
end.