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.

1366 lines
46 KiB
Plaintext

11 months ago
unit u_op_truck;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, XPMenu, Menus, DB, ADODB, dxDBTLCl, dxGrClms,
dxDBCtrl, dxDBGrid, dxTL, dxCntner, Mask, wwdbedit, Wwdotdot, Wwdbcomb,
wwdblook, RxLookup, wwdbdatetimepicker, StdCtrls, bsSkinCtrls, ExtCtrls,
DBCtrls, ComCtrls, bsSkinTabs, u_fee, cxControls, cxContainer, cxEdit,
cxTextEdit, cxMemo, cxDBEdit, bsSkinBoxCtrls;
type
Tfrm_op_truck = class(TForm)
Panel2: TPanel;
XPMenu1: TXPMenu;
t_op_letter_pc: TADOQuery;
t_op_letter_pc1: TDataSource;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridDateColumn;
dxDBGrid1Column63: TdxDBGridMaskColumn;
dxDBGrid1Column64: TdxDBGridMaskColumn;
dxDBGrid1Column65: TdxDBGridDateColumn;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinPanel5: TbsSkinPanel;
Label19: TLabel;
Label22: TLabel;
DBEdit10: TDBEdit;
DBEdit12: TDBEdit;
bsSkinPanel1: TbsSkinPanel;
Label1: TLabel;
bsSkinButton10: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton15: TbsSkinButton;
bsSkinButton16: TbsSkinButton;
Label26: TLabel;
DBEdit3: TDBEdit;
Label27: TLabel;
DBEdit4: TDBEdit;
DBText1: TDBText;
Edit1: TEdit;
Label2: TLabel;
DBEdit1: TDBEdit;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
dxDBGrid1Column10: TdxDBGridColumn;
Label8: TLabel;
bsSkinPanel2: TbsSkinPanel;
bsSkinSpeedButton1: TbsSkinSpeedButton;
wwDBComboBox31: TwwDBComboBox;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
DBEdit13: TDBEdit;
Label16: TLabel;
DBEdit14: TDBEdit;
Label14: TLabel;
bsSkinGroupBox1: TbsSkinGroupBox;
Label9: TLabel;
DBEdit9: TDBEdit;
Label10: TLabel;
DBEdit11: TDBEdit;
bsSkinSpeedButton2: TbsSkinSpeedButton;
bsSkinSpeedButton3: TbsSkinSpeedButton;
bsSkinSpeedButton4: TbsSkinSpeedButton;
bsSkinSpeedButton5: TbsSkinSpeedButton;
Label6: TLabel;
DBEdit7: TDBEdit;
t_op_seae: TADOQuery;
t_op_seaeAmend: TADOQuery;
Label7: TLabel;
DBEdit8: TDBEdit;
bsSkinMemo1: TbsSkinMemo;
t_ch_fee: TADOQuery;
dxDBGrid1Column11: TdxDBGridColumn;
dxDBGrid1Column12: TdxDBGridColumn;
dxDBGrid1Column13: TdxDBGridColumn;
dxDBGrid1Column17: TdxDBGridColumn;
dxDBGrid1Column18: TdxDBGridColumn;
fra_fee1: Tfra_fee;
t_op_seae2: TDataSource;
Label5: TLabel;
Edit2: TEdit;
wwDBComboBox44: TwwDBComboBox;
Label15: TLabel;
DBMemo1: TDBMemo;
RxDBLookupCombo14: TRxDBLookupCombo;
t_sys_employee1: TDataSource;
t_sys_employee: TADOQuery;
Label3: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
Label4: TLabel;
wwDBDateTimePicker2: TwwDBDateTimePicker;
Label17: TLabel;
DBEdit2: TDBEdit;
dxDBGrid1Column20: TdxDBGridColumn;
dxDBGrid1Column21: TdxDBGridColumn;
bsSkinButton3: TbsSkinButton;
dxDBGrid1Column22: TdxDBGridColumn;
dxDBGrid1Column23: TdxDBGridColumn;
dxDBGrid1Column24: TdxDBGridColumn;
dxDBGrid1Column25: TdxDBGridColumn;
dxDBGrid1Column26: TdxDBGridColumn;
dxDBGrid1Column27: TdxDBGridColumn;
dxDBGrid1Column28: TdxDBGridColumn;
dxDBGrid1Column29: TdxDBGridColumn;
Label18: TLabel;
wwDBDateTimePicker3: TwwDBDateTimePicker;
Label20: TLabel;
wwDBDateTimePicker4: TwwDBDateTimePicker;
Label21: TLabel;
wwDBComboBox7: TwwDBComboBox;
Edit4: TEdit;
7 months ago
dxDBGrid1Column30: TdxDBGridColumn;
aAdoQuery2: TADOQuery;
11 months ago
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure FormShow(Sender: TObject);
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
procedure Button1Click(Sender: TObject);
procedure dxDBGrid1DblClick(Sender: TObject);
procedure bsSkinButton15Click(Sender: TObject);
procedure t_op_letter_pcBeforeEdit(DataSet: TDataSet);
procedure t_op_letter_pcBeforeDelete(DataSet: TDataSet);
procedure bsSkinButton16Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure DBEdit10KeyPress(Sender: TObject; var Key: Char);
procedure bsSkinButton2Click(Sender: TObject);
procedure t_op_letter_pcAfterInsert(DataSet: TDataSet);
procedure bsSkinSpeedButton1Click(Sender: TObject);
procedure bsSkinSpeedButton2Click(Sender: TObject);
procedure bsSkinSpeedButton3Click(Sender: TObject);
procedure bsSkinSpeedButton4Click(Sender: TObject);
procedure bsSkinSpeedButton5Click(Sender: TObject);
procedure bsSkinPageControl1Change(Sender: TObject);
procedure dxDBGrid1Column11CustomDraw(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 DBEdit13Change(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure dxDBGrid1Column25CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
private
procedure LoadFee();
procedure UnLoadFee();
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_truck: Tfrm_op_truck;
frm_op_truck_insert:boolean=false;
implementation
uses u_main, u_data_share, u_code_send_head, u_code_truck_client,
u_code_truck_changzhan, my_sys_function,u_ch_fee_se_truck,
u_sys_progress;
{$R *.dfm}
procedure Tfrm_op_truck.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
frm_op_truck.Hide;
frm_op_truck.ManualFloat(frm_op_truck.BoundsRect );
frm_main.freeTabs('frm_op_truck');
action:=cafree;
frm_op_truck:=nil;
end;
procedure Tfrm_op_truck.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_truck.bsSkinButton10Click(Sender: TObject);
var
str:widestring;
begin
str:=str+' where 1=1 ';
if Edit1.text<>''then
str:=str+' and t.<2E><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit1.text+'%'+'''';
if if_open('422') then begin
end else if if_open('420') then begin
str:=str+' and (t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from t_sys_employee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+department+''')';
str:=str+' or t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from t_sys_employee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_sys_department where <20><><EFBFBD>ž<EFBFBD><C5BE><EFBFBD>='+''''+employee+'''))) ';
end else if if_open('421') then begin
str:=str+' and t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' ';
end else begin
str:=str+' and t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+employee+'''';
end;
if Edit2.text<>''then
str:=str+' and t.<2E><><EFBFBD>ĵ<EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit2.text+'%'+'''';
if wwDBComboBox44.text<>'' then
str:=str+' and t.״̬='+''''+wwDBComboBox44.Text+'''';
if wwDBDateTimePicker1.text<>''then
begin
str:=str+' and t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
end;
if wwDBDateTimePicker2.text<>''then
begin
str:=str+' and t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
end;
if wwDBDateTimePicker3.text<>''then
begin
str:=str+' and a.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='+''''+wwDBDateTimePicker3.text+'''';
end;
if wwDBDateTimePicker4.text<>''then
begin
str:=str+' and a.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='+''''+wwDBDateTimePicker4.text+'''';
end;
if (Edit4.Text<>'') and (wwDBComboBox7.Text<>'') then begin
if (wwDBComboBox7.Text='<27><><EFBFBD><EFBFBD>') then begin
str:=str+' and g.ë<><C3AB><EFBFBD><EFBFBD>>'+floattostr(strtofloatdef(Edit4.Text,0));
end;
if (wwDBComboBox7.Text='С<><D0A1>') then begin
str:=str+' and g.ë<><C3AB><EFBFBD><EFBFBD><'+floattostr(strtofloatdef(Edit4.Text,0));
end;
if (wwDBComboBox7.Text='<27><><EFBFBD><EFBFBD>') then begin
str:=str+' and g.ë<><C3AB><EFBFBD><EFBFBD>='+floattostr(strtofloatdef(Edit4.Text,0));
end;
if (wwDBComboBox7.Text='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') then begin
str:=str+' and g.ë<><C3AB><EFBFBD><EFBFBD><>'+floattostr(strtofloatdef(Edit4.Text,0));
end;
end;
t_op_letter_pc.close;
t_op_letter_pc.sql.clear;
t_op_letter_pc.sql.add('select t.*,g.<2E><><EFBFBD><EFBFBD>RMB <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>RMB,g.<2E><><EFBFBD><EFBFBD>USD <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>USD,g.ë<><C3AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>,a.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>,a.ί<>е<EFBFBD>λ,(SELECT <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_sys_employee where <20><><EFBFBD><EFBFBD>=t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,tt.<2E><><EFBFBD><EFBFBD>RMB <20>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>RMB,tt.<2E><><EFBFBD><EFBFBD>USD <20>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>USD,tt.ë<><C3AB><EFBFBD><EFBFBD> <20>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD> ');
t_op_letter_pc.sql.add('from t_op_gain_cx t left join t_op_gain g on (g.<2E><><EFBFBD><EFBFBD>=t.<2E><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>) ');
t_op_letter_pc.sql.add('left join t_op_seae a on (a.<2E><><EFBFBD><EFBFBD>=t.<2E><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>) ');
t_op_letter_pc.sql.add('left join (select <20><><EFBFBD><EFBFBD><E1B5A5>,sum(<28><><EFBFBD><EFBFBD>RMB) <20><><EFBFBD><EFBFBD>RMB,sum(<28><><EFBFBD><EFBFBD>USD) <20><><EFBFBD><EFBFBD>USD,sum(ë<><C3AB><EFBFBD><EFBFBD>) ë<><C3AB><EFBFBD><EFBFBD> from v_op_bscard group by <20><><EFBFBD><EFBFBD><E1B5A5>)tt on (tt.<2E><><EFBFBD><EFBFBD><E1B5A5>=t.<2E><><EFBFBD><EFBFBD><E1B5A5>) ');
t_op_letter_pc.sql.add(str);
t_op_letter_pc.sql.add(' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
t_op_letter_pc.open;
{
t_op_letter_pc.close;
t_op_letter_pc.sql.clear;
t_op_letter_pc.sql.add('select t.*,''RMB:''+CONVERT(VARCHAR(19),g.<2E><><EFBFBD><EFBFBD>RMB)+'' USD:''+CONVERT(VARCHAR(19),g.<2E><><EFBFBD><EFBFBD>USD) <20><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD> from t_op_gain_cx t left join t_op_gain g on (g.<2E><><EFBFBD><EFBFBD>=t.<2E><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>) '+str);
t_op_letter_pc.sql.add(' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
t_op_letter_pc.open;
}
t_op_seaeAmend.Close;
t_op_seaeAmend.SQL.Text:='select top 1 * from t_op_seae where <20><><EFBFBD><EFBFBD>='''+t_op_letter_pc.fieldbyname('<27><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>').AsString+'''';
t_op_seaeAmend.Open;
end;
procedure Tfrm_op_truck.bsSkinButton6Click(Sender: TObject);
begin
Edit1.text:='';
Edit2.text:='';
wwDBComboBox44.text:='';
end;
procedure Tfrm_op_truck.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
// Column_sort(Column,t_op_seae,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_truck.FormShow(Sender: TObject);
var
str:string;
begin
if if_open('420') or if_open('421') then begin
bsSkinSpeedButton4.Visible:=true;
bsSkinSpeedButton5.Visible:=True;
Label16.Visible:=true;
RxDBLookupCombo14.Visible:=true;
end else begin
bsSkinSpeedButton4.Visible:=false;
bsSkinSpeedButton5.Visible:=false;
Label16.Visible:=false;
RxDBLookupCombo14.Visible:=false;
end;
bsSkinPageControl1.ActivePageIndex:=0;
frm_op_truck_insert:=true;
str:=str+' where t.״̬<>''<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'' ';
if if_open('422') then begin
end else if if_open('420') then begin
str:=str+' and (t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from t_sys_employee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+department+''')';
str:=str+' or t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from t_sys_employee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_sys_department where <20><><EFBFBD>ž<EFBFBD><C5BE><EFBFBD>='+''''+employee+'''))) ';
end else if if_open('421') then begin
str:=str+' and t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' ';
end else begin
str:=str+' and t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+employee+'''';
end;
{
t_op_letter_pc.close;
t_op_letter_pc.sql.clear;
t_op_letter_pc.sql.add('select top 100 t.*,''RMB:''+CONVERT(VARCHAR(19),g.<2E><><EFBFBD><EFBFBD>RMB)+'' USD:''+CONVERT(VARCHAR(19),g.<2E><><EFBFBD><EFBFBD>USD) <20><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD> from t_op_gain_cx t left join t_op_gain g on (g.<2E><><EFBFBD><EFBFBD>=t.<2E><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>) '+str);
t_op_letter_pc.sql.add(' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
t_op_letter_pc.open;
}
t_op_letter_pc.close;
t_op_letter_pc.sql.clear;
t_op_letter_pc.sql.add('select top 100 t.*,g.<2E><><EFBFBD><EFBFBD>RMB <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>RMB,g.<2E><><EFBFBD><EFBFBD>USD <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>USD,g.ë<><C3AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>,a.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>,a.ί<>е<EFBFBD>λ,(SELECT <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_sys_employee where <20><><EFBFBD><EFBFBD>=t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,tt.<2E><><EFBFBD><EFBFBD>RMB <20>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>RMB,tt.<2E><><EFBFBD><EFBFBD>USD <20>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>USD,tt.ë<><C3AB><EFBFBD><EFBFBD> <20>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD> ');
t_op_letter_pc.sql.add('from t_op_gain_cx t left join t_op_gain g on (g.<2E><><EFBFBD><EFBFBD>=t.<2E><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>) ');
t_op_letter_pc.sql.add('left join t_op_seae a on (a.<2E><><EFBFBD><EFBFBD>=t.<2E><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>) ');
t_op_letter_pc.sql.add('left join (select <20><><EFBFBD><EFBFBD><E1B5A5>,sum(<28><><EFBFBD><EFBFBD>RMB) <20><><EFBFBD><EFBFBD>RMB,sum(<28><><EFBFBD><EFBFBD>USD) <20><><EFBFBD><EFBFBD>USD,sum(ë<><C3AB><EFBFBD><EFBFBD>) ë<><C3AB><EFBFBD><EFBFBD> from v_op_bscard group by <20><><EFBFBD><EFBFBD><E1B5A5>)tt on (tt.<2E><><EFBFBD><EFBFBD><E1B5A5>=t.<2E><><EFBFBD><EFBFBD><E1B5A5>) ');
t_op_letter_pc.sql.add(str);
t_op_letter_pc.sql.add(' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
t_op_letter_pc.open;
t_op_seaeAmend.Close;
t_op_seaeAmend.SQL.Text:='select top 1 * from t_op_seae where <20><><EFBFBD><EFBFBD>='''+t_op_letter_pc.fieldbyname('<27><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>').AsString+'''';
t_op_seaeAmend.Open;
if if_open('422') then begin
t_sys_employee.Close;
t_sys_employee.SQL.Clear;
t_sys_employee.SQL.Add(' select <20><><EFBFBD>ž<EFBFBD><C5BE><EFBFBD> as <20><><EFBFBD><EFBFBD> from t_sys_department where <20><><EFBFBD>ž<EFBFBD><C5BE><EFBFBD><>''''');
t_sys_employee.SQL.Add(' union select <20><><EFBFBD><EFBFBD> from t_sys_employee where <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>=''<27><>'' ');
t_sys_employee.SQL.Add(' union select ''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' as <20><><EFBFBD><EFBFBD> ');
t_sys_employee.SQL.Add(' union select ''<27><><EFBFBD>괺'' as <20><><EFBFBD><EFBFBD> ');
t_sys_employee.SQL.Add(' union select ''<27>Ծ<EFBFBD>'' as <20><><EFBFBD><EFBFBD> ');
t_sys_employee.Open;
end else if if_open('421') then begin
t_sys_employee.Close;
t_sys_employee.SQL.Clear;
t_sys_employee.SQL.Add(' select ''<27><><EFBFBD>괺'' as <20><><EFBFBD><EFBFBD> ');
t_sys_employee.Open;
end else begin
t_sys_employee.Close;
t_sys_employee.SQL.Clear;
t_sys_employee.SQL.Add(' select <20><><EFBFBD>ž<EFBFBD><C5BE><EFBFBD> as <20><><EFBFBD><EFBFBD> from t_sys_department where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+department+'''');
t_sys_employee.SQL.Add(' union select <20><><EFBFBD><EFBFBD> from t_sys_employee where <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+department+'''');
t_sys_employee.SQL.Add(' union select ''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' as <20><><EFBFBD><EFBFBD> ');
t_sys_employee.SQL.Add(' union select ''<27>Ծ<EFBFBD>'' as <20><><EFBFBD><EFBFBD> ');
t_sys_employee.Open;
end;
end;
procedure Tfrm_op_truck.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if key=#13 then
begin
key:=#0;
frm_op_truck.bsSkinButton10Click(Sender);
end;
end;
procedure Tfrm_op_truck.Button1Click(Sender: TObject);
begin
if t_op_letter_pc.IsEmpty then
exit;
end;
procedure Tfrm_op_truck.dxDBGrid1DblClick(Sender: TObject);
begin
if (not fra_fee1.t_ch_accept.Active) then LoadFee();
t_op_seaeAmend.Close;
t_op_seaeAmend.SQL.Text:='select top 1 * from t_op_seae where <20><><EFBFBD><EFBFBD>='''+t_op_letter_pc.fieldbyname('<27><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>').AsString+'''';
t_op_seaeAmend.Open;
bsSkinTabSheet2.Show;
end;
procedure Tfrm_op_truck.bsSkinButton15Click(Sender: TObject);
var
aQuery:TADOQuery;
begin
if t_op_letter_pc.state in [dsedit,dsinsert] then t_op_letter_pc.post;
{
if not t_op_letter_pc.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ').asboolean then
begin
t_op_letter_pc.Edit;
t_op_letter_pc['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=1;
t_op_letter_pc.post;
end;
}
sys_print('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,nil,nil,nil,nil,t_op_letter_pc1,nil,nil,nil,nil,nil,nil);
aQuery:=CreateAdoQuery;
try
With aQuery do begin
close;SQL.Clear;
SQL.Add('update t_op_gain_cx set <20>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ=1 where LE_ID='+t_op_letter_pc.fieldbyname('LE_ID').AsString);
ExecSQL;
end;
finally
FreeAndNil(aQuery);
end;
end;
procedure Tfrm_op_truck.t_op_letter_pcBeforeEdit(DataSet: TDataSet);
begin
{
if t_op_letter_pc.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ').AsBoolean then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD>ӡ,<2C><><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
abort;
end;
}
if (t_op_letter_pc.FieldByName('״̬').AsString='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') then
begin
showmessage('<27><>ǰ״̬,<2C><><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
abort;
end;
end;
procedure Tfrm_op_truck.t_op_letter_pcBeforeDelete(DataSet: TDataSet);
begin
{
if t_op_letter_pc.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ').AsBoolean then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD>ӡ,<2C><><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
abort;
end;
}
if t_op_letter_pc.FieldByName('״̬').AsString='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
begin
showmessage('<27><>ǰ״̬,<2C><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
if (t_op_letter_pc.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>employee) then
begin
showmessage('ֻ<><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˱<EFBFBD><CBB1>˲<EFBFBD><CBB2><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
end;
procedure Tfrm_op_truck.bsSkinButton16Click(Sender: TObject);
begin
if (t_op_letter_pc.State=dsinsert)or(t_op_letter_pc.State=dsedit) then
t_op_letter_pc.Post;
end;
procedure Tfrm_op_truck.bsSkinButton1Click(Sender: TObject);
begin
t_op_letter_pc.insert;
t_op_seaeAmend.Close;
t_op_seaeAmend.SQL.Text:='select top 0 * from t_op_seae';
t_op_seaeAmend.Open;
if (not fra_fee1.t_ch_accept.Active) then LoadFee();
bsSkinTabSheet2.Show;
end;
procedure Tfrm_op_truck.DBEdit10KeyPress(Sender: TObject; var Key: Char);
var aAdoQuery:TAdoQuery;
begin
if key=#13 then
begin
key:=#0;
if not t_op_letter_pc.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ').AsBoolean then
begin
if (t_op_letter_pc.State=dsinsert)or(t_op_letter_pc.State=dsedit) then
t_op_letter_pc.Post;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('select * from t_op_seae');
SQL.Add('where <20><><EFBFBD><EFBFBD><E1B5A5>=:<3A><><EFBFBD><EFBFBD><E1B5A5> and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><>ͨ<EFBFBD><CDA8>'' and (<28><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'' or <20><><EFBFBD><EFBFBD>״̬=''<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'') ');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><E1B5A5>').Value:=t_op_letter_pc.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString;
Open;
if not IsEmpty then begin
t_op_letter_pc.Edit;
t_op_letter_pc.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_letter_pc.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_letter_pc.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
t_op_letter_pc.FieldByName('<27><>װ<EFBFBD><D7B0>').value:=FieldByName('<27><>װ<EFBFBD><D7B0>').value;
t_op_letter_pc.FieldByName('װ<><D7B0><EFBFBD><EFBFBD>').value:=FieldByName('װ<><D7B0><EFBFBD><EFBFBD>').value;
t_op_letter_pc.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').value:=FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').value;
t_op_letter_pc.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
t_op_letter_pc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_op_letter_pc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_op_letter_pc['״̬']:='<27>½<EFBFBD>';
Close;SQL.Clear;
SQL.Add('select ');
SQL.Add(' SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN ''<27><>'' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END ) as Ӧ<><D3A6>USD');
SQL.Add(',');
SQL.Add(' SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN ''<27><>'' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END ) as Ӧ<><D3A6>RMB');
SQL.Add(',');
SQL.Add('SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN ''<27><>'' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END ) as Ӧ<><D3A6>USD');
SQL.Add(',');
SQL.Add(' SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN ''<27><>'' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END ) as Ӧ<><D3A6>RMB');
SQL.Add('from t_ch_fee');
SQL.Add('where <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from t_op_seae where <20><><EFBFBD><EFBFBD><E1B5A5>='+''''+t_op_letter_pc.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+''')');
Open;
t_op_letter_pc.FieldByName('<27><><EFBFBD><EFBFBD>').value:='RMB:'+FloatToStr(FieldByName('Ӧ<><D3A6>RMB').AsFloat-FieldByName('Ӧ<><D3A6>RMB').AsFloat)+' USD:'+ FloatToStr(FieldByName('Ӧ<><D3A6>USD').AsFloat-FieldByName('Ӧ<><D3A6>USD').AsFloat);
t_op_letter_pc.Post;
end else begin
ShowMessage('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD>,<2C><>û<EFBFBD><C3BB><EFBFBD><EFBFBD><E1BDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
finally
Free;
end;
//showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD>ӡ,<2C><><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
end;
end;
end;
procedure Tfrm_op_truck.bsSkinButton2Click(Sender: TObject);
var
aQuery:TADOQuery;
begin
if t_op_letter_pc.FieldByName('״̬').AsString='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
begin
showmessage('<27><>ǰ״̬,<2C><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if (t_op_letter_pc.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>employee) then
begin
showmessage('ֻ<><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˱<EFBFBD><CBB1>˲<EFBFBD><CBB2><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
t_ch_fee.close;
t_ch_fee.SQL.Text:='select * from t_ch_fee where (<28>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>=1 or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>0 or <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><>0 or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>0 or <20><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD><>0) and <20><><EFBFBD><EFBFBD>='''+t_op_letter_pc.fieldbyname('<27><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>').AsString+'''';
t_ch_fee.open;
if not t_ch_fee.IsEmpty then
begin
application.MessageBox('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>,<2C>Ѷ<EFBFBD><D1B6>˻<EFBFBD><CBBB><EFBFBD><EFBFBD><EFBFBD><EBA1A2><EFBFBD><EFBFBD><E3A1A2>Ʊ<EFBFBD><C6B1>״̬<D7B4><CCAC><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1>ɾ<EFBFBD><C9BE>!','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL);
t_ch_fee.close;
exit;
end;
t_ch_fee.First;
while not t_ch_fee.Eof do begin
t_ch_fee.Delete;
end;
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;sql.clear;
sql.add('delete from t_op_seae where <20><><EFBFBD><EFBFBD>='''+t_op_letter_pc.fieldbyname('<27><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>').AsString+'''');
ExecSQL;
Close;sql.clear;
sql.add('delete from t_op_gain_cx where LE_ID='+t_op_letter_pc.fieldbyname('LE_ID').AsString);
ExecSQL;
end;
finally
FreeAndNil(aQuery);
end;
t_op_letter_pc.Close;
t_op_letter_pc.Open;
if t_op_letter_pc.IsEmpty then begin
t_op_seaeAmend.Close;
t_op_seaeAmend.SQL.Text:='select top 0 * from t_op_seae ';
t_op_seaeAmend.Open;
end else begin
t_op_seaeAmend.Close;
t_op_seaeAmend.SQL.Text:='select top 1 * from t_op_seae where <20><><EFBFBD><EFBFBD>='''+t_op_letter_pc.fieldbyname('<27><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>').AsString+'''';
t_op_seaeAmend.Open;
end;
end;
procedure Tfrm_op_truck.t_op_letter_pcAfterInsert(DataSet: TDataSet);
begin
t_op_letter_pc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_op_letter_pc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
end;
procedure Tfrm_op_truck.bsSkinSpeedButton1Click(Sender: TObject);
var
afield : variant;
i: Integer;
PNO:string;
function getamendBsNo(wtbsno:string;mblno:string):string;
var aQuery:TAdoQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;sql.clear;
sql.add('select top 1 ί<>б<EFBFBD><D0B1><EFBFBD> from t_op_seae where ί<>б<EFBFBD><D0B1><EFBFBD> like '''+wtbsno+'%'' and <20><><EFBFBD><EFBFBD><E1B5A5>='''+mblno+''' order by ί<>б<EFBFBD><D0B1><EFBFBD> desc ');
open;
if IsEmpty then
Result:=wtbsno
else
Result:=FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
begin
if (DBEdit9.Text<>'') then begin
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD>ɸ<EFBFBD><C9B8>ĵ<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD>ɣ<EFBFBD>');
exit;
end;
if t_op_letter_pc.FieldByName('״̬').AsString<>'<27>½<EFBFBD>' then
begin
showmessage('<27><>ǰ״̬,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD>');
exit;
end;
if (t_op_letter_pc.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>employee) then
begin
showmessage('ֻ<><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˱<EFBFBD><CBB1>˲<EFBFBD><CBB2><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
abort;
end;
t_op_seae.Close;
t_op_seae.SQL.Clear;
t_op_seae.SQL.Text:='select top 1 * from t_op_seae where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_op_letter_pc.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'''';
t_op_seae.open;
if t_op_seae.IsEmpty then
begin
showmessage('ҵ<>񲻴<EFBFBD><F1B2BBB4><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɸ<EFBFBD><C9B8>ĵ<EFBFBD><C4B5><EFBFBD>');
exit;
end;
t_op_seaeAmend.Close;
t_op_seaeAmend.SQL.Text:='select top 0 * from t_op_seae';
t_op_seaeAmend.Open;
afield := vararraycreate([0,t_op_seae.fieldcount-1],varvariant);
for i := 0 to (t_op_seae.fieldcount-1) do
begin
afield[i] :=t_op_seae.fields[i].value ;
end;
t_op_seaeAmend.append;
for i := 0 to (t_op_seae.fieldcount-1) do
begin
t_op_seaeAmend.fields[i].value := afield[i] ;
end;
t_op_seaeAmend['<27>ܴ<EFBFBD>']:=WeekofYear(Date);
t_op_seaeAmend['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ĵ<EFBFBD>';
PNO:=Trim(t_op_seae.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString);
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=date;
if (strtoint(get_parameters_value(158,'0'))=1) then begin
if t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']>logininfo.endday then
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'];
end;
if Trim(PNO)<>'' then
t_op_seaeAmend.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString:=getamendBsNo(PNO,t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString)+'*';
t_op_seaeAmend['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(t_op_seaeAmend.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime,getbsno(Logininfo.SeaExpBsNo,'SE'));
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>']:=get_id;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seaeAmend['<27><><EFBFBD><EFBFBD>'];
t_op_seaeAmend['װ<>˷<EFBFBD>ʽ']:='ƴ<><C6B4><EFBFBD><EFBFBD>Ʊ';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>1']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>2']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>3']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>4']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>5']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>6']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>7']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>8']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>9']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>10']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_op_seaeAmend['<27><>TEU']:=0;
t_op_seaeAmend['<27><>װ<EFBFBD><D7B0>']:='';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:='';
t_op_seaeAmend['<27>Ʒѱ<C6B7>׼']:='';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>Ա']:='';
t_op_seaeAmend['<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>']:='';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_op_seaeAmend['<27>ֲ<EFBFBD><D6B2><EFBFBD>']:='';
t_op_seaeAmend['<27>Ƿ<EFBFBD><C7B7><EFBFBD>˰']:=0;
t_op_seaeAmend['<27><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['<27>Ƿ<EFBFBD>ͨ<EFBFBD><CDA8>']:=0;
t_op_seaeAmend['ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:='';
t_op_seaeAmend['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>']:='';
t_op_seaeAmend['<27>¶ȵ<C2B6>λ']:='';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_op_seaeAmend['<27><><EFBFBD>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['<27><><EFBFBD>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['<27><><EFBFBD≯ۿ<CCB8>']:='';
t_op_seaeAmend['<27><><EFBFBD>̴<EFBFBD><CCB4><EFBFBD>']:='';
t_op_seaeAmend['<27><><EFBFBD>̺<EFBFBD><CCBA><EFBFBD>']:='';
t_op_seaeAmend['<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>']:='';
t_op_seaeAmend['<27>ֵ<EFBFBD><D6B5>б<EFBFBD>']:='';
t_op_seaeAmend['<27><>Ʊ<EFBFBD><C6B1>']:='';
t_op_seaeAmend['<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:='';
t_op_seaeAmend['<27>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>']:=0;
t_op_seaeAmend['ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD>']:=0;
t_op_seaeAmend['<27>Ƿ<EFBFBD><C7B7>ɳ<EFBFBD>']:=0;
t_op_seaeAmend['<27>ɳ<EFBFBD><C9B3><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_op_seaeAmend['Ӧ<><D3A6>½<EFBFBD><C2BD>']:=0;
t_op_seaeAmend['Ӧ<><D3A6>½<EFBFBD><C2BD>']:=0;
t_op_seaeAmend['½<><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_op_seaeAmend['<27>Ƿ<EFBFBD><C7B7><EFBFBD>˰']:=0;
t_op_seaeAmend['<27>Ƿ<EFBFBD>ͨ<EFBFBD><CDA8>']:=0;
t_op_seaeAmend['<27>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>']:=0;
t_op_seaeAmend['<27>Ƿ<EFBFBD><C7B7>˲<EFBFBD>']:=0;
t_op_seaeAmend['<27><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['<27>ɳ<EFBFBD><C9B3><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['<27>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['<27>Ƿ<EFBFBD><C7B7>ĵ<EFBFBD>']:=0;
t_op_seaeAmend['FEE']:=0;
t_op_seaeAmend['FEE2']:=0;
t_op_seaeAmend['ҵ<><D2B5>״̬']:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>ǰ״̬']:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
if t_op_seaeAmend['<27><><EFBFBD><EFBFBD>˾']<>'CMA' THEN
t_op_seaeAmend['<27><><EFBFBD>ʽ']:='';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>']:='';
t_op_seaeAmend['<27>ᵥǩ<E1B5A5><C7A9>״̬']:='';
t_op_seaeAmend['ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_op_seaeAmend['<27>˵ֹ<CBB5>']:='';
t_op_seaeAmend['<27><><EFBFBD>ڻ<EFBFBD>Դ<EFBFBD><D4B4>']:='';
t_op_seaeAmend['<27><>׼<EFBFBD>ĺ<EFBFBD>']:='';
t_op_seaeAmend['<27>ɽ<EFBFBD><C9BD><EFBFBD>ʽ']:='';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>']:='';
t_op_seaeAmend['<27>ܼ<EFBFBD>']:='';
t_op_seaeAmend['<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:='';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ']:='';
t_op_seaeAmend['<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><ECB5A5>']:='';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=null;
t_op_seaeAmend['ʵ<><CAB5>ʱ<EFBFBD><CAB1>']:=null;
t_op_seaeAmend['Ѭ<><D1AC>ʱ<EFBFBD><CAB1>']:=null;
t_op_seaeAmend['<27><>֤ʱ<D6A4><CAB1>']:=null;
t_op_seaeAmend['ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>']:='';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>ƾ֤2']:='';
t_op_seaeAmend['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
t_op_seaeAmend['<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_op_seaeAmend['<27>ܼ<EFBFBD>']:='0';
t_op_seaeAmend['<27>ڶ<EFBFBD>֪ͨ<CDA8><D6AA>']:='';
t_op_seaeAmend['<27>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD>κ<EFBFBD>']:='';
t_op_seaeAmend['DOOR<4F><52>ַ']:='';
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='0';
t_op_seaeAmend['Ӧ<>պ<EFBFBD><D5BA>˷<EFBFBD>']:=0;
t_op_seaeAmend['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD>']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_op_seaeAmend['<27>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_op_seaeAmend['<27>ϳ<EFBFBD><CFB3><EFBFBD>']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_op_seaeAmend['ƴ<><C6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_op_seaeAmend['<27>յ<EFBFBD><D5B5>걨']:='';
t_op_seaeAmend['<27>ϼ<EFBFBD>20']:=0;
t_op_seaeAmend['<27>ϼ<EFBFBD>40']:=0;
t_op_seaeAmend['<27>ϼ<EFBFBD>40H']:=0;
t_op_seaeAmend['<27>ϼ<EFBFBD>45']:=0;
t_op_seaeAmend['<27><><EFBFBD>ųɱ<C5B3>']:=0;
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_seaeAmend['<27><><EFBFBD><EFBFBD>'];
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_seaeAmend['<27><><EFBFBD><EFBFBD>'];
t_op_seaeAmend['ί<>б<EFBFBD>׼']:=t_op_seaeAmend['<27><><EFBFBD><EFBFBD>'];
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']:=t_op_seaeAmend['<27><><EFBFBD><EFBFBD>'];
t_op_seaeAmend['<27><><EFBFBD>ر<EFBFBD>׼']:=t_op_seaeAmend['<27><><EFBFBD><EFBFBD>'];
t_op_seaeAmend['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']:=t_op_seaeAmend['<27><><EFBFBD><EFBFBD>'];
t_op_seaeAmend.Post;
t_op_letter_pc.Edit;
t_op_letter_pc.FieldByName('<27><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seaeAmend['<27><><EFBFBD><EFBFBD>'];
t_op_letter_pc.FieldByName('<27><><EFBFBD>ĵ<EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seaeAmend['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_op_letter_pc.FieldByName('<27><><EFBFBD>ĵ<EFBFBD>ί<EFBFBD>б<EFBFBD><D0B1><EFBFBD>').Value:=t_op_seaeAmend['ί<>б<EFBFBD><D0B1><EFBFBD>'];
t_op_letter_pc.post;
t_op_seaeAmend.Close;
t_op_seaeAmend.SQL.Text:='select top 1 * from t_op_seae where <20><><EFBFBD><EFBFBD>='''+t_op_letter_pc.FieldByName('<27><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>').AsString+'''';
t_op_seaeAmend.Open;
end;
procedure Tfrm_op_truck.bsSkinSpeedButton2Click(Sender: TObject);
var
7 months ago
isfee,isout:Boolean;
11 months ago
znjamount:Double;
begin
if (t_op_letter_pc.FieldByName('״̬').AsString<>'<27>½<EFBFBD>') and (t_op_letter_pc.FieldByName('״̬').AsString<>'<27><><EFBFBD><EFBFBD><EFBFBD>ύ') then
begin
showmessage('<27><>ǰ״̬,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD>');
exit;
end;
7 months ago
aAdoQuery2.Close;
aAdoQuery2.SQL.Text:='select * from t_ch_fee_pr_out';
aAdoQuery2.Open;
11 months ago
if t_op_letter_pc.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD>');
exit;
end;
if t_op_letter_pc.FieldByName('<27><>ע').AsString='' then
begin
showmessage('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD>');
exit;
end;
if (fra_fee1.t_ch_accept.RecordCount=0) and (fra_fee1.t_ch_pay.RecordCount=0) then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD><CFB8><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD>');
exit;
end;
isfee:=False;
fra_fee1.t_ch_accept.first;
while not fra_fee1.t_ch_accept.eof do
begin
if (fra_fee1.t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='')or
(fra_fee1.t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring='')or
(fra_fee1.t_ch_accept.fieldbyname('<27>ұ<EFBFBD>').asstring='') then begin
ShowMessage('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
isfee:=True;
end;
if (fra_fee1.t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat=0) or (fra_fee1.t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat=0) or (fra_fee1.t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat=0)
or ((fra_fee1.t_ch_accept.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB') and (fra_fee1.t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>1))
or ((fra_fee1.t_ch_accept.fieldbyname('<27>ұ<EFBFBD>').asstring<>'RMB') and (fra_fee1.t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat=1))
or ((fra_fee1.t_ch_accept.fieldbyname('<27>ұ<EFBFBD>').asstring<>'RMB') AND (fra_fee1.t_ch_accept.fieldbyname('<27>ұ<EFBFBD>').asstring<>'USD') )
then
begin
ShowMessage('<27><><EFBFBD>ۻ<EFBFBD><DBBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ0<CEAA><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2BB>ȷ<EFBFBD><C8B7>');
isfee:=True;
end;
if (fra_fee1.t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>ɽ<EFBFBD>') then begin
znjamount:=znjamount+fra_fee1.t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*fra_fee1.t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
7 months ago
if aAdoQuery2.locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', VarArrayOf([fra_fee1.t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring,fra_fee1.t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring]), []) then
begin
isout:=true;
end;
11 months ago
fra_fee1.t_ch_accept.Next;
end;
fra_fee1.t_ch_pay.first;
while not fra_fee1.t_ch_pay.eof do
begin
if (fra_fee1.t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='')or
(fra_fee1.t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring='')or
(fra_fee1.t_ch_pay.fieldbyname('<27>ұ<EFBFBD>').asstring='') then begin
ShowMessage('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
isfee:=True;
end;
if (fra_fee1.t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat=0) or (fra_fee1.t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat=0) or (fra_fee1.t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat=0)
or ((fra_fee1.t_ch_pay.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB') and (fra_fee1.t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>1))
or ((fra_fee1.t_ch_pay.fieldbyname('<27>ұ<EFBFBD>').asstring<>'RMB') and (fra_fee1.t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat=1))
or ((fra_fee1.t_ch_pay.fieldbyname('<27>ұ<EFBFBD>').asstring<>'RMB') AND (fra_fee1.t_ch_pay.fieldbyname('<27>ұ<EFBFBD>').asstring<>'USD') )
then
begin
ShowMessage('<27><><EFBFBD>ۻ<EFBFBD><DBBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ0<CEAA><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2BB>ȷ<EFBFBD><C8B7>');
isfee:=True;
end;
7 months ago
if (fra_fee1.t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>ɽ<EFBFBD>') then begin
znjamount:=znjamount-(fra_fee1.t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*fra_fee1.t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
11 months ago
end;
7 months ago
if aAdoQuery2.locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', VarArrayOf([fra_fee1.t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring,fra_fee1.t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring]), []) then
begin
isout:=true;
end;
11 months ago
fra_fee1.t_ch_pay.Next;
end;
if (znjamount<0) then begin
ShowMessage('<27><><EFBFBD>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1>0!');
exit;
end;
if isfee then begin
Exit;
end;
7 months ago
if isout then begin
aAdoQuery2.Close;aAdoQuery2.SQL.Clear;
aAdoQuery2.SQL.Add('select ');
aAdoQuery2.SQL.Add(' SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN ''<27><>'' THEN (<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) ELSE -(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) END ) as TTLPR');
aAdoQuery2.SQL.Add('from t_ch_fee');
aAdoQuery2.SQL.Add('where <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from t_op_seae where <20><><EFBFBD><EFBFBD><E1B5A5>='+''''+t_op_letter_pc.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+''')');
aAdoQuery2.Open;
if (aAdoQuery2.fieldbyname('TTLPR').asfloat<0) then begin
ShowMessage('<27><><EFBFBD>ض<EFBFBD><D8B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1>0!');
exit;
end;
end;
11 months ago
t_op_letter_pc.Edit;
t_op_letter_pc.FieldByName('״̬').Value:='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
t_op_letter_pc.post;
end;
procedure Tfrm_op_truck.bsSkinSpeedButton3Click(Sender: TObject);
begin
if t_op_letter_pc.FieldByName('״̬').AsString<>'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then
begin
showmessage('<27><>ǰ״̬,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD>');
exit;
end;
t_op_letter_pc.Edit;
t_op_letter_pc.FieldByName('״̬').Value:='<27>½<EFBFBD>';
t_op_letter_pc.post;
end;
procedure Tfrm_op_truck.bsSkinSpeedButton4Click(Sender: TObject);
var i,LE_ID:integer;
aAdoQuery:TAdoQuery;
begin
if t_op_letter_pc.FieldByName('״̬').AsString<>'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then
begin
showmessage('<27><>ǰ״̬,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD>');
exit;
end;
if trim(RxDBLookupCombo14.DisplayValue)='' then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD>');
exit;
end;
UpdateopseaeStatus(t_op_seaeAmend.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString,'<27><>˾<EFBFBD><CBBE>',trim(RxDBLookupCombo14.DisplayValue));
fra_fee1.t_ch_accept.Close;
fra_fee1.t_ch_accept.open;
fra_fee1.t_ch_pay.Close;
fra_fee1.t_ch_pay.open;
fra_fee1.t_op_gain.Close;
fra_fee1.t_op_gain.open;
aAdoQuery:=CreateadoQuery;
with aAdoQuery do
try
{
Close;sql.Clear;
SQL.Add('Update t_op_seae set <20><><EFBFBD><EFBFBD>״̬=''<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>''');
SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seaeAmend.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
ExecSQL;
}
Close;sql.Clear;
SQL.Add('Update t_op_gain_cx set ״̬=''<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+formatdatetime('YYYY-MM-DD',date)+'''');
SQL.Add('where LE_ID=:LE_ID');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=trim(RxDBLookupCombo14.DisplayValue);
Parameters.ParamByName('LE_ID').Value:=t_op_letter_pc.fieldbyname('LE_ID').Value;
ExecSQL;
finally
Free;
end;
t_op_seaeAmend.Close;
t_op_seaeAmend.Open;
LE_ID:=t_op_letter_pc.fieldbyname('LE_ID').Value;
t_op_letter_pc.close;
t_op_letter_pc.Open;
t_op_letter_pc.Locate('LE_ID',LE_ID,[]);
{
book1:=t_op_letter_pc.GetBookmark;
t_op_letter_pc.Refresh;
t_op_letter_pc.GotoBookmark(book1);
}
end;
procedure Tfrm_op_truck.bsSkinSpeedButton5Click(Sender: TObject);
var i,LE_ID:integer;
aAdoQuery:TAdoQuery;
book1:Tbookmark;
begin
if (t_op_letter_pc.FieldByName('״̬').AsString<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') and (t_op_letter_pc.FieldByName('״̬').AsString<>'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>') then
begin
showmessage('<27><>ǰ״̬,<2C><><EFBFBD>ܲ<EFBFBD><DCB2>أ<EFBFBD><D8A3><EFBFBD>');
exit;
end;
if (t_op_seae2.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') or (t_op_seae2.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>') then begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><E1BDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD>ܲ<EFBFBD><DCB2>أ<EFBFBD><D8A3><EFBFBD>');
abort;
end;
aAdoQuery:=CreateadoQuery;
with aAdoQuery do
try
if t_op_letter_pc.FieldByName('״̬').AsString='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then begin
Close;sql.Clear;
SQL.Add('Update t_op_seae set ҵ<><D2B5>״̬=''<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>'',<2C><><EFBFBD><EFBFBD>״̬=''¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>''');
SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae2.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').Value;
ExecSQL;
end;
Close;sql.Clear;
SQL.Add('Update t_op_gain_cx set ״̬=''<27><><EFBFBD><EFBFBD><EFBFBD>ύ'' ');
SQL.Add('where LE_ID=:LE_ID');
Parameters.ParamByName('LE_ID').Value:=t_op_letter_pc.FieldByName('LE_ID').Value;
ExecSQL;
Close;sql.Clear;
SQL.Add('select * from t_ch_fee ');
SQL.Add('where (<28>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>=0 or <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD> is null) and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=0 and <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>=0 and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=0 and <20><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>=0 and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seaeAmend.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
open;
first;
while not eof do begin
aAdoQuery.edit;
aAdoQuery.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD>ύ';
aAdoQuery.post;
Next;
end;
finally
Free;
end;
fra_fee1.t_ch_accept.Close;
fra_fee1.t_ch_accept.open;
fra_fee1.t_ch_pay.Close;
fra_fee1.t_ch_pay.open;
fra_fee1.t_op_gain.Close;
fra_fee1.t_op_gain.open;
LE_ID:=t_op_letter_pc.fieldbyname('LE_ID').Value;
t_op_letter_pc.close;
t_op_letter_pc.Open;
t_op_letter_pc.Locate('LE_ID',LE_ID,[]);
end;
procedure Tfrm_op_truck.LoadFee;
begin
try
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:=23;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD>س<EFBFBD><D8B3><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD>б<EFBFBD>';
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; //1
loadwwgrid(fra_fee1.wwDBGrid1,'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>Ӧ<EFBFBD><D3A6>');
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD>س<EFBFBD><D8B3><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD>б<EFBFBD>';
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; //2
loadwwgrid(fra_fee1.wwDBGrid2,'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>Ӧ<EFBFBD><D3A6>');
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; //3
fra_fee1.edit_type.text:='1';
fra_fee1.edit_data.text:='0001';
fra_fee1.edit_report.text:='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>';
fra_fee1.t_ch_accept.DataSource:=t_op_seae2;
if strtobool(get_parameters_value(150,'false')) then
fra_fee1.bsSkinPanel3.Visible:=true;
fra_fee1.DBEdit48.DataSource:=t_op_seae2;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; //4
if if_open('293') then
begin
fra_fee1.t_ch_accept.DataSource:=t_op_seae2;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD>س<EFBFBD><D8B3><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; //5
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
fra_fee1.t_ch_accept.close;
fra_fee1.t_ch_accept.SQL.Clear;
fra_fee1.t_ch_accept.SQL.Add('select top 100 * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> 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');
end else begin
fra_fee1.t_ch_accept.close;
fra_fee1.t_ch_accept.SQL.Clear;
fra_fee1.t_ch_accept.SQL.Add('select top 100 * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and '
+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+' order by ˳<><CBB3>,CH_ID');
end;
fra_fee1.t_ch_accept.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; //6
end else begin
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
begin
fra_fee1.t_ch_accept.close;
fra_fee1.t_ch_accept.SQL.Clear;
fra_fee1.t_ch_accept.SQL.Add('select top 100 * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (¼<><C2BC><EFBFBD><EFBFBD>='
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><>1) ) order by ˳<><CBB3>,CH_ID');
end;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_fee1.t_ch_accept.open;
end;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_fee1.a_shen_delete.open;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD>޸ľ<DEB8><C4BE><EFBFBD><EFBFBD><EFBFBD>';
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_fee1.a_shen_modify_old.open;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_fee1.a_shen_modify_new.open;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD>޺ϼ<DEBA><CFBC><EFBFBD><EFBFBD><EFBFBD>';
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_fee1.Panel3.visible:=true;
end
else
fra_fee1.Panel3.visible:=false;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
if if_open('294') then
begin
fra_fee1.t_ch_pay.DataSource:=t_op_seae2;
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
fra_fee1.t_ch_pay.close;
fra_fee1.t_ch_pay.SQL.Clear;
fra_fee1.t_ch_pay.SQL.Add('select top 100 * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> 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');
end else begin
fra_fee1.t_ch_pay.close;
fra_fee1.t_ch_pay.SQL.Clear;
fra_fee1.t_ch_pay.SQL.Add('select top 100 * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and '
+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+' order by ˳<><CBB3>,CH_ID');
end;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_fee1.t_ch_pay.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
end else begin
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
begin
fra_fee1.t_ch_pay.close;
fra_fee1.t_ch_pay.SQL.Clear;
fra_fee1.t_ch_pay.SQL.Add('select top 100 * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (¼<><C2BC><EFBFBD><EFBFBD>='
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><>1) ) order by ˳<><CBB3>,CH_ID');
end;
fra_fee1.t_ch_pay.open;
end;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_fee1.p_shen_delete.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD>޸ľ<DEB8><C4BE><EFBFBD><EFBFBD><EFBFBD>';
fra_fee1.p_shen_modify_old.open;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_fee1.p_shen_modify_new.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD>غϼ<D8BA><CFBC><EFBFBD><EFBFBD><EFBFBD>';
fra_fee1.Panel1.visible:=true;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
end
else
fra_fee1.Panel1.visible:=false;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
if fra_fee1.Panel1.visible and
fra_fee1.Panel3.visible then
begin
if if_open('226') then
fra_fee1.Panel8.Visible:=true
else
fra_fee1.Panel8.Visible:=false;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD>';
fra_fee1.t_op_gain.DataSource:=t_op_seae2;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_fee1.t_op_gain.open;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD>';
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_fee1.DBEdit43.DataSource:=t_op_seae2;
fra_fee1.t_op_gain_main.DataSource:=t_op_seae2;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>3<EFBFBD><33><EFBFBD><EFBFBD>';
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_fee1.t_op_gain_main.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
end
else
begin
fra_fee1.Panel8.Visible:=false;
end;
// frm_data_share.t_crm_client.requery;
// frm_data_share.t_code_currency.requery;
finally
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
end;
procedure Tfrm_op_truck.UnLoadFee;
begin
end;
procedure Tfrm_op_truck.bsSkinPageControl1Change(Sender: TObject);
begin
if (frm_op_truck_insert) then begin
if (bsSkinPageControl1.TabIndex=1) then begin
if (not fra_fee1.t_ch_accept.Active) then LoadFee();
t_op_seaeAmend.Close;
t_op_seaeAmend.SQL.Text:='select top 1 * from t_op_seae where <20><><EFBFBD><EFBFBD>='''+t_op_letter_pc.fieldbyname('<27><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>').AsString+'''';
t_op_seaeAmend.Open;
end;
end;
end;
procedure Tfrm_op_truck.dxDBGrid1Column11CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
strstatus:string;
begin
strstatus:=ANode.Strings[dxDBGrid1Column11.Index];
if strstatus='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then AColor:=$0080FF00
else if strstatus='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then AColor:=clyellow
else if strstatus='<27><><EFBFBD><EFBFBD><EFBFBD>ύ' then AColor:=clred
else AColor:=clwhite;
AFont.Color:=clblack;
end;
procedure Tfrm_op_truck.DBEdit13Change(Sender: TObject);
var
strstatus:string;
begin
strstatus:=DBEdit13.Text;
if strstatus='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then DBEdit13.Color:=$0080FF00
else if strstatus='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then DBEdit13.Color:=clyellow
else if strstatus='<27><><EFBFBD><EFBFBD><EFBFBD>ύ' then DBEdit13.Color:=clred
else DBEdit13.Color:=clwhite;
end;
procedure Tfrm_op_truck.bsSkinButton3Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_op_truck.dxDBGrid1Column25CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ttllr:Double;
begin
if (Trim(ANode.Strings[dxDBGrid1Column22.Index])='<27><><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD>') or (Trim(ANode.Strings[dxDBGrid1Column22.Index])='<27><><EFBFBD>մ<EFBFBD><D5B4><EFBFBD>1<EFBFBD><31>') or (Trim(ANode.Strings[dxDBGrid1Column22.Index])='<27><><EFBFBD>մ<EFBFBD><D5B4><EFBFBD>2<EFBFBD><32>') then begin
if strtofloatdef(AText,0)<=-5000 then
AColor:=clRed
else if strtofloatdef(AText,0)<=-2000 then
AColor:=clyellow;
end else begin
ttllr:=StrToFloatDef(Trim(ANode.Strings[dxDBGrid1Column28.Index]),0);
if ttllr<0 then begin
if strtofloatdef(AText,0)<=-1500 then
AColor:=clRed
else if strtofloatdef(AText,0)<=-800 then
AColor:=clyellow;
end else begin
if strtofloatdef(AText,0)<=-4000 then
AColor:=clRed
else if strtofloatdef(AText,0)<=-2000 then
AColor:=clyellow;
end;
end;
end;
end.