|
|
|
|
unit u_rp_zl_seae;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, ExtCtrls, ComCtrls, bsSkinTabs, bsSkinCtrls, StdCtrls,
|
|
|
|
|
wwdbdatetimepicker, DB, ADODB, dxExEdtr, dxCntner, dxTL, dxDBCtrl,
|
|
|
|
|
dxDBGrid, dxDBTLCl, dxGrClms, Menus;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_rp_zl_seae = class(TForm)
|
|
|
|
|
Panel1: TPanel;
|
|
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
|
|
bsSkinPageControl2: TbsSkinPageControl;
|
|
|
|
|
bsSkinTabSheet3: TbsSkinTabSheet;
|
|
|
|
|
bsSkinTabSheet4: TbsSkinTabSheet;
|
|
|
|
|
bsSkinPageControl3: TbsSkinPageControl;
|
|
|
|
|
bsSkinTabSheet5: TbsSkinTabSheet;
|
|
|
|
|
bsSkinTabSheet6: TbsSkinTabSheet;
|
|
|
|
|
p_accept_client: TADOStoredProc;
|
|
|
|
|
p_accept_client1: TDataSource;
|
|
|
|
|
p_accept_sales: TADOStoredProc;
|
|
|
|
|
p_accept_sales1: TDataSource;
|
|
|
|
|
p_pay_client: TADOStoredProc;
|
|
|
|
|
p_pay_client1: TDataSource;
|
|
|
|
|
p_pay_sales: TADOStoredProc;
|
|
|
|
|
p_pay_sales1: TDataSource;
|
|
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column2: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column3: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column4: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column5: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column6: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column7: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column8: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
|
|
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn1: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn2: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn3: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn4: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn5: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn6: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn7: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
|
|
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn8: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn9: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn10: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn11: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn12: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn13: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn14: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid4: TdxDBGrid;
|
|
|
|
|
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn15: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn16: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn17: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn18: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn19: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn20: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn21: TdxDBGridColumn;
|
|
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
|
|
bsSkinCheckRadioBox2: TbsSkinCheckRadioBox;
|
|
|
|
|
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
|
|
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
Label2: TLabel;
|
|
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
|
|
N16: TMenuItem;
|
|
|
|
|
SaveDialog: TSaveDialog;
|
|
|
|
|
dxDBGrid1Column9: TdxDBGridColumn;
|
|
|
|
|
tabs3: TbsSkinTabSheet;
|
|
|
|
|
tabs4: TbsSkinTabSheet;
|
|
|
|
|
dxDBGrid5: TdxDBGrid;
|
|
|
|
|
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column54: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column11: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column13: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column15: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column64: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column67: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column65: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column66: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1USD: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn22: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn23: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1RMB: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn24: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn25: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn26: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn27: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column10: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column12: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column63: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column14: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column16: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column18: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column19: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column21: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column20: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column22: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column23: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column24: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column25: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column26: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column27: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column28: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column29: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid11: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid12: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid13: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid14: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid15: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid16: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid17: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid18: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid19: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid110: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column50: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1TEU: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column52: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column53: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column55: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column56: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column57: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column58: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column59: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column60: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column61: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column62: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column68: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column69: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid6: TdxDBGrid;
|
|
|
|
|
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn8: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn9: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn28: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn29: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn30: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn31: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn32: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn33: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn34: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn80: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn81: TdxDBGridColumn;
|
|
|
|
|
dxDBGridDateColumn1: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGridColumn82: TdxDBGridColumn;
|
|
|
|
|
dxDBGridMaskColumn10: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn11: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn12: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn13: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn14: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn15: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridDateColumn2: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGridMaskColumn16: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn17: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn18: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn19: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn20: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn83: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn84: TdxDBGridColumn;
|
|
|
|
|
dxDBGridMaskColumn21: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn22: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn23: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn24: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn25: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn26: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn27: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn28: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn29: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn30: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn31: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn32: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn33: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn34: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn35: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn36: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn37: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn38: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn39: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridMaskColumn40: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn85: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn86: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn87: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn88: TdxDBGridColumn;
|
|
|
|
|
p_accept_bill1: TDataSource;
|
|
|
|
|
p_accept_bill: TADOStoredProc;
|
|
|
|
|
p_pay_bill: TADOStoredProc;
|
|
|
|
|
p_pay_bill1: TDataSource;
|
|
|
|
|
bsSkinTabShet3: TbsSkinTabSheet;
|
|
|
|
|
dxDBGrid7: TdxDBGrid;
|
|
|
|
|
dxDBGridMaskColumn41: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn36: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn37: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn38: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn39: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn40: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn41: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn42: TdxDBGridColumn;
|
|
|
|
|
p_accept_cl1: TDataSource;
|
|
|
|
|
p_accept_cl: TADOStoredProc;
|
|
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinPanel2Resize(Sender: TObject);
|
|
|
|
|
procedure dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
procedure dxDBGrid2ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
procedure dxDBGrid3ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
procedure dxDBGrid4ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
|
|
procedure dxDBGrid1DblClick(Sender: TObject);
|
|
|
|
|
procedure dxDBGrid4DblClick(Sender: TObject);
|
|
|
|
|
procedure dxDBGrid2DblClick(Sender: TObject);
|
|
|
|
|
procedure dxDBGrid3DblClick(Sender: TObject);
|
|
|
|
|
procedure dxDBGrid7DblClick(Sender: TObject);
|
|
|
|
|
private
|
|
|
|
|
str_accept,str_pay:widestring;
|
|
|
|
|
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_rp_zl_seae: Tfrm_rp_zl_seae;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_main, my_sys_function, u_data_share;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_zl_seae.bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_zl_seae.FormClose(Sender: TObject;
|
|
|
|
|
var Action: TCloseAction);
|
|
|
|
|
begin
|
|
|
|
|
frm_rp_zl_seae.Hide;
|
|
|
|
|
frm_rp_zl_seae.ManualFloat(frm_rp_zl_seae.BoundsRect );
|
|
|
|
|
frm_main.freeTabs('frm_rp_zl_seae');
|
|
|
|
|
action:=cafree;
|
|
|
|
|
frm_rp_zl_seae:=nil;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_zl_seae.bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str_date:string;
|
|
|
|
|
begin
|
|
|
|
|
if bsSkinCheckRadioBox1.Checked then
|
|
|
|
|
str_date:='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'
|
|
|
|
|
else
|
|
|
|
|
str_date:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
str_accept:='where t_ch_fee.<2E><><EFBFBD><EFBFBD><>t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''';
|
|
|
|
|
str_pay:='where t_ch_fee.<2E><><EFBFBD><EFBFBD><>t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''';
|
|
|
|
|
|
|
|
|
|
if wwDBDateTimePicker1.Text<>''then
|
|
|
|
|
begin
|
|
|
|
|
str_accept:=str_accept+' and t_op_seae.'+str_date+'>='+''''+wwDBDateTimePicker1.Text+'''';
|
|
|
|
|
str_pay:=str_pay+' and t_op_seae.'+str_date+'>='+''''+wwDBDateTimePicker1.Text+'''';
|
|
|
|
|
end;
|
|
|
|
|
if wwDBDateTimePicker2.Text<>''then
|
|
|
|
|
begin
|
|
|
|
|
str_accept:=str_accept+' and t_op_seae.'+str_date+'<='+''''+wwDBDateTimePicker2.Text+'''';
|
|
|
|
|
str_pay:=str_pay+' and t_op_seae.'+str_date+'<='+''''+wwDBDateTimePicker2.Text+'''';
|
|
|
|
|
end;
|
|
|
|
|
str_accept:=str_accept+' and '+open_data('0034','t_op_seae.'+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','t_op_seae.'+'<27><><EFBFBD><EFBFBD>Ա','t_op_seae.'+'<27>ͷ<EFBFBD>Ա','t_op_seae.<2E><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
str_pay:=str_pay+' and '+open_data('0034','t_op_seae.'+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','t_op_seae.'+'<27><><EFBFBD><EFBFBD>Ա','t_op_seae.'+'<27>ͷ<EFBFBD>Ա','t_op_seae.<2E><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
|
p_accept_client.close;
|
|
|
|
|
p_accept_client.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'select t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=30 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4>һ<EFBFBD><D2BB>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=60'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>30 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<>ն<EFBFBD><D5B6><EFBFBD>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=90'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>60 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=180'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>90 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<>հ<EFBFBD><D5B0><EFBFBD>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=360'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>180 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4>һ<EFBFBD><D2BB>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())>360 '
|
|
|
|
|
+' then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>δ<EFBFBD><CEB4>'
|
|
|
|
|
+' from t_ch_fee inner join t_op_seae on t_ch_fee.<2E><><EFBFBD><EFBFBD>=t_op_seae.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+str_accept
|
|
|
|
|
+' group by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> order by t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
p_accept_client.Open;
|
|
|
|
|
|
|
|
|
|
p_accept_cl.close;
|
|
|
|
|
p_accept_cl.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'select t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=30 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4>һ<EFBFBD><D2BB>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=60'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>30 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<>ն<EFBFBD><D5B6><EFBFBD>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=90'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>60 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=180'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>90 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<>հ<EFBFBD><D5B0><EFBFBD>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=360'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>180 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4>һ<EFBFBD><D2BB>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())>360 '
|
|
|
|
|
+' then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>δ<EFBFBD><CEB4>'
|
|
|
|
|
+' from t_ch_fee inner join t_op_seae on t_ch_fee.<2E><><EFBFBD><EFBFBD>=t_op_seae.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+str_accept
|
|
|
|
|
+' group by t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> order by t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
p_accept_cl.Open;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
p_pay_client.close;
|
|
|
|
|
p_pay_client.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'select t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=30 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4>һ<EFBFBD><D2BB>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=60'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>30 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=90'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>60 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=180'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>90 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=360'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>180 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4>һ<EFBFBD><D2BB>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())>360 '
|
|
|
|
|
+' then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>δ<EFBFBD><CEB4>'
|
|
|
|
|
+' from t_ch_fee inner join t_op_seae on t_ch_fee.<2E><><EFBFBD><EFBFBD>=t_op_seae.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+str_pay
|
|
|
|
|
+' group by t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> order by t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
p_pay_client.Open;
|
|
|
|
|
|
|
|
|
|
p_accept_sales.close;
|
|
|
|
|
p_accept_sales.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'select t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=30 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4>һ<EFBFBD><D2BB>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=60'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>30 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<>ն<EFBFBD><D5B6><EFBFBD>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=90'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>60 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=180'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>90 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<>հ<EFBFBD><D5B0><EFBFBD>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=360'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>180 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4>һ<EFBFBD><D2BB>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())>360 '
|
|
|
|
|
+' then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>δ<EFBFBD><CEB4>'
|
|
|
|
|
+' from t_ch_fee inner join t_op_seae on t_ch_fee.<2E><><EFBFBD><EFBFBD>=t_op_seae.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+str_accept
|
|
|
|
|
+' group by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
p_accept_sales.Open;
|
|
|
|
|
|
|
|
|
|
p_pay_sales.close;
|
|
|
|
|
p_pay_sales.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'select t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=30 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4>һ<EFBFBD><D2BB>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=60'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>30 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=90'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>60 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=180'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>90 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())<=360'
|
|
|
|
|
+' and datediff(day,t_op_seae.'+str_date+',getdate())>180 then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4>һ<EFBFBD><D2BB>,'
|
|
|
|
|
+' sum(case when datediff(day,t_op_seae.'+str_date+',getdate())>360 '
|
|
|
|
|
+' then (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>δ<EFBFBD><CEB4>'
|
|
|
|
|
+' from t_ch_fee inner join t_op_seae on t_ch_fee.<2E><><EFBFBD><EFBFBD>=t_op_seae.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+str_pay
|
|
|
|
|
+' group by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
p_pay_sales.Open;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_zl_seae.bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,nil,nil,nil,nil,p_accept_client1,p_accept_sales1,p_pay_client1,p_pay_sales1,nil,nil,nil);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_zl_seae.bsSkinPanel2Resize(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
i:integer;
|
|
|
|
|
begin
|
|
|
|
|
i:=round((bsSkinPanel2.Width-bsSkinPanel1.Width)/5);
|
|
|
|
|
bsSkinCheckRadioBox2.Width:=i;
|
|
|
|
|
bsSkinCheckRadioBox1.Width:=i;
|
|
|
|
|
bsSkinButton10.Width:=i;
|
|
|
|
|
bsSkinButton9.Width:=i;
|
|
|
|
|
bsSkinButton5.Width:=i;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_zl_seae.dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort_pro(Column,p_accept_client,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_zl_seae.dxDBGrid2ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort_pro(Column,p_accept_sales,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_zl_seae.dxDBGrid3ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort_pro(Column,p_pay_client,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_zl_seae.dxDBGrid4ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort_pro(Column,p_pay_sales,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_zl_seae.FormShow(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if frm_data_share.t_load_employee.FieldByName('Ӧ<><D3A6>').asboolean then
|
|
|
|
|
begin
|
|
|
|
|
bsSkinTabSheet1.TabVisible:=true;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
bsSkinTabSheet1.TabVisible:=false;
|
|
|
|
|
end;
|
|
|
|
|
if frm_data_share.t_load_employee.FieldByName('Ӧ<><D3A6>').asboolean then
|
|
|
|
|
begin
|
|
|
|
|
bsSkinTabSheet2.TabVisible:=true;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
bsSkinTabSheet2.TabVisible:=false;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_zl_seae.N16Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
with SaveDialog do
|
|
|
|
|
begin
|
|
|
|
|
DefaultExt :='xls';
|
|
|
|
|
Filter := '(*.xls)|*.xls';
|
|
|
|
|
if Execute then
|
|
|
|
|
begin
|
|
|
|
|
if bsSkinTabSheet3.Showing then
|
|
|
|
|
dxDBGrid1.SaveToXLS(FileName,true)
|
|
|
|
|
else if bsSkinTabSheet4.Showing then
|
|
|
|
|
dxDBGrid2.SaveToXLS(FileName,true)
|
|
|
|
|
else if bsSkinTabSheet5.Showing then
|
|
|
|
|
dxDBGrid3.SaveToXLS(FileName,true)
|
|
|
|
|
else if bsSkinTabSheet6.Showing then
|
|
|
|
|
dxDBGrid4.SaveToXLS(FileName,true);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_zl_seae.dxDBGrid1DblClick(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str_bill:widestring;
|
|
|
|
|
begin
|
|
|
|
|
str_bill:=str_accept+' and t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+p_accept_client.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+''''+' and t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+p_accept_client.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'''';
|
|
|
|
|
p_accept_bill.close;
|
|
|
|
|
p_accept_bill.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
|
|
|
|
|
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as <20><><EFBFBD><EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' end) as <20><><EFBFBD><EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
|
|
|
|
|
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<>պϼ<D5BA>,'
|
|
|
|
|
+' sum(t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD>պϼ<D5BA>,'
|
|
|
|
|
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<>պϼ<D5BA>,'
|
|
|
|
|
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
|
|
|
|
|
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD>쵥<EFBFBD><ECB5A5>,'
|
|
|
|
|
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
|
|
|
|
|
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
|
|
|
|
|
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
|
|
|
|
|
+'1 end) as <20>ƷѶ<C6B7>,DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, GETDATE()) AS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>, DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE()) AS ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'(DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE())-isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0)) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> left join t_crm_client '
|
|
|
|
|
+' on t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_crm_client.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> '
|
|
|
|
|
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
|
|
|
|
|
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
|
|
|
|
|
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD>쵥<EFBFBD><ECB5A5>,'
|
|
|
|
|
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
|
|
|
|
|
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
|
|
|
|
|
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
|
|
|
|
|
+'1 end),DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, GETDATE()),'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>, DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE()),'
|
|
|
|
|
+'isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0),'
|
|
|
|
|
+'(DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE())-isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0))'
|
|
|
|
|
+default_sort_two(53,'t_op_seae','t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','','');
|
|
|
|
|
p_accept_bill.Open;
|
|
|
|
|
bsSkinPageControl1.ActivePage:=tabs3;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_zl_seae.dxDBGrid4DblClick(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str_bill:widestring;
|
|
|
|
|
begin
|
|
|
|
|
str_bill:=str_pay+' and t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+p_pay_sales.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'''';
|
|
|
|
|
p_pay_bill.close;
|
|
|
|
|
p_pay_bill.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
|
|
|
|
|
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as <20>Ѹ<EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' end) as <20>Ѹ<EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
|
|
|
|
|
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
|
|
|
|
|
+' sum(t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
|
|
|
|
|
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
|
|
|
|
|
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
|
|
|
|
|
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD>쵥<EFBFBD><ECB5A5>,'
|
|
|
|
|
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
|
|
|
|
|
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
|
|
|
|
|
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
|
|
|
|
|
+'1 end) as <20>ƷѶ<C6B7>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'
|
|
|
|
|
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
|
|
|
|
|
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
|
|
|
|
|
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD>쵥<EFBFBD><ECB5A5>,'
|
|
|
|
|
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
|
|
|
|
|
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
|
|
|
|
|
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
|
|
|
|
|
+'1 end),'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD> '
|
|
|
|
|
+default_sort_two(53,'t_op_seae','t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','','');
|
|
|
|
|
p_pay_bill.Open;
|
|
|
|
|
bsSkinPageControl1.ActivePage:=tabs4;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_zl_seae.dxDBGrid2DblClick(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str_bill:widestring;
|
|
|
|
|
begin
|
|
|
|
|
str_bill:=str_accept+' and t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+p_accept_sales.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'''';
|
|
|
|
|
p_accept_bill.close;
|
|
|
|
|
p_accept_bill.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
|
|
|
|
|
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as <20><><EFBFBD><EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' end) as <20><><EFBFBD><EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
|
|
|
|
|
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<>պϼ<D5BA>,'
|
|
|
|
|
+' sum(t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD>պϼ<D5BA>,'
|
|
|
|
|
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<>պϼ<D5BA>,'
|
|
|
|
|
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
|
|
|
|
|
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD>쵥<EFBFBD><ECB5A5>,'
|
|
|
|
|
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
|
|
|
|
|
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
|
|
|
|
|
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
|
|
|
|
|
+'1 end) as <20>ƷѶ<C6B7>,DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, GETDATE()) AS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>, DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE()) AS ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'(DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE())-isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0)) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> left join t_crm_client '
|
|
|
|
|
+' on t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_crm_client.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> '
|
|
|
|
|
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
|
|
|
|
|
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
|
|
|
|
|
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD>쵥<EFBFBD><ECB5A5>,'
|
|
|
|
|
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
|
|
|
|
|
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
|
|
|
|
|
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
|
|
|
|
|
+'1 end),DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, GETDATE()),'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>, DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE()),'
|
|
|
|
|
+'isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0),'
|
|
|
|
|
+'(DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE())-isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0))'
|
|
|
|
|
+default_sort_two(53,'t_op_seae','t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','','');
|
|
|
|
|
p_accept_bill.Open;
|
|
|
|
|
bsSkinPageControl1.ActivePage:=tabs3;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_zl_seae.dxDBGrid3DblClick(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str_bill:widestring;
|
|
|
|
|
begin
|
|
|
|
|
str_bill:=str_pay+' and t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+p_pay_client.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+'''';
|
|
|
|
|
p_pay_bill.close;
|
|
|
|
|
p_pay_bill.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
|
|
|
|
|
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as <20>Ѹ<EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' end) as <20>Ѹ<EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
|
|
|
|
|
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
|
|
|
|
|
+' sum(t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
|
|
|
|
|
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
|
|
|
|
|
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
|
|
|
|
|
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD>쵥<EFBFBD><ECB5A5>,'
|
|
|
|
|
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
|
|
|
|
|
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
|
|
|
|
|
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
|
|
|
|
|
+'1 end) as <20>ƷѶ<C6B7>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'
|
|
|
|
|
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
|
|
|
|
|
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
|
|
|
|
|
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD>쵥<EFBFBD><ECB5A5>,'
|
|
|
|
|
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
|
|
|
|
|
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
|
|
|
|
|
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
|
|
|
|
|
+'1 end),'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD> '
|
|
|
|
|
+default_sort_two(53,'t_op_seae','t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','','');
|
|
|
|
|
p_pay_bill.Open;
|
|
|
|
|
bsSkinPageControl1.ActivePage:=tabs4;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_zl_seae.dxDBGrid7DblClick(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str_bill:widestring;
|
|
|
|
|
begin
|
|
|
|
|
str_bill:=str_accept+' and t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+p_accept_cl.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+'''';
|
|
|
|
|
p_accept_bill.close;
|
|
|
|
|
p_accept_bill.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
|
|
|
|
|
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as <20><><EFBFBD><EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' end) as <20><><EFBFBD><EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
|
|
|
|
|
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<>պϼ<D5BA>,'
|
|
|
|
|
+' sum(t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD>պϼ<D5BA>,'
|
|
|
|
|
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<>պϼ<D5BA>,'
|
|
|
|
|
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
|
|
|
|
|
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD>쵥<EFBFBD><ECB5A5>,'
|
|
|
|
|
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
|
|
|
|
|
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
|
|
|
|
|
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
|
|
|
|
|
+'1 end) as <20>ƷѶ<C6B7>,DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, GETDATE()) AS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>, DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE()) AS ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'(DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE())-isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0)) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> left join t_crm_client '
|
|
|
|
|
+' on t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_crm_client.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> '
|
|
|
|
|
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
|
|
|
|
|
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
|
|
|
|
|
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD>쵥<EFBFBD><ECB5A5>,'
|
|
|
|
|
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
|
|
|
|
|
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
|
|
|
|
|
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
|
|
|
|
|
+'1 end),DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, GETDATE()),'
|
|
|
|
|
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>, DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE()),'
|
|
|
|
|
+'isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0),'
|
|
|
|
|
+'(DATEDIFF([day],t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE())-isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0))'
|
|
|
|
|
+default_sort_two(53,'t_op_seae','t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','','');
|
|
|
|
|
p_accept_bill.Open;
|
|
|
|
|
bsSkinPageControl1.ActivePage:=tabs3;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|