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.

358 lines
18 KiB
Plaintext

This file contains ambiguous Unicode characters!

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

unit u_piliang_send_msg;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, BusinessSkinForm, dxExEdtr, dxDBTLCl, dxGrClms,
dxDBGrid, dxTL, dxDBCtrl, dxCntner, DB, ADODB, Grids, DBGrids,
kbmMemTable;
type
Tfrm_piliang_send_msg = class(TForm)
bsSkinPanel1: TbsSkinPanel;
bsBusinessSkinForm1: TbsBusinessSkinForm;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridDateColumn;
dxDBGrid1Column19: TdxDBGridMaskColumn;
dxDBGrid1Column20: TdxDBGridMaskColumn;
dxDBGrid1TEU: TdxDBGridMaskColumn;
dxDBGrid1Column63: TdxDBGridMaskColumn;
dxDBGrid1Column64: TdxDBGridMaskColumn;
dxDBGrid1Column65: TdxDBGridDateColumn;
dxDBGrid1Column66: TdxDBGridMaskColumn;
dxDBGrid1Column67: TdxDBGridMaskColumn;
t_op_seae1: TDataSource;
t_ch_accept: TADOQuery;
t_ch_accept1: TDataSource;
t_ch_pay: TADOQuery;
t_ch_pay1: TDataSource;
t_sys_report: TADOQuery;
t_sys_report1: TDataSource;
dxDBGrid2: TdxDBGrid;
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridCheckColumn;
t_op_seae: TADOStoredProc;
t_op_gain: TADOQuery;
t_op_gain1: TDataSource;
bsSkinButton8: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
t_op_fenzhang: TADOQuery;
t_ch_fee_fenzhang2: TADOQuery;
t_ch_fee_fenzhang: TADOQuery;
ds_ch_fee_fenzhang21: TDataSource;
ds_op_fenzhang1: TDataSource;
ds_ch_fee_fenzhang1: TDataSource;
memtblprint1: TDataSource;
memtblprint: TkbmMemTable;
memdd: TkbmMemTable;
memdd1: TDataSource;
memaccept1: TDataSource;
memaccept: TkbmMemTable;
mempay: TkbmMemTable;
mempay1: TDataSource;
at_modify_old: TADOQuery;
at_modify_new: TADOQuery;
dsrmodify_new: TDataSource;
dsrmodify_old: TDataSource;
t_ch_fee_truck: TADOQuery;
t_ch_fee_truck1: TDataSource;
t_print_histry: TADOQuery;
t_print_histry1: TDataSource;
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_piliang_send_msg: Tfrm_piliang_send_msg;
implementation
uses u_main, my_sys_function;
{$R *.dfm}
procedure Tfrm_piliang_send_msg.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_piliang_send_msg.bsSkinButton8Click(Sender: TObject);
var
Frt:String;
aQuery:TADOQuery;
begin
if t_sys_report.IsEmpty then
begin
showmessage('û<><C3BB><EFBFBD><EFBFBD><EFBFBD>󵥸<EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>޷<EFBFBD><DEB7><EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>');
exit;
end;
if strtobool(get_parameters_value(2,'false'))then
begin
t_op_seae.first;
while not t_op_seae.eof do
begin
t_ch_accept.first;
while not t_ch_accept.eof do
begin
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='¼<><C2BC>״̬')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>') then
begin
showmessage('<27><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD>󷽿<EFBFBD><F3B7BDBF>Դ<EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD>󵥣<EFBFBD><F3B5A5A3><EFBFBD>');
exit;
end;
t_ch_accept.next;
end;
t_ch_pay.first;
while not t_ch_pay.eof do
begin
if (t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='¼<><C2BC>״̬')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>') then
begin
showmessage('<27><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD>󷽿<EFBFBD><F3B7BDBF>Դ<EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD>󵥣<EFBFBD><F3B5A5A3><EFBFBD>');
exit;
end;
t_ch_pay.next;
end;
t_op_seae.next;
end;
end;
t_ch_fee_fenzhang.close;
t_ch_fee_fenzhang.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee_fenzhang.open;
t_ch_fee_fenzhang2.close;
t_ch_fee_fenzhang2.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee_fenzhang2.open;
t_op_fenzhang.close;
t_op_fenzhang.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_op_fenzhang.open;
at_modify_new.close;
at_modify_new.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
at_modify_new.open;
at_modify_old.close;
at_modify_old.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
at_modify_old.open;
if strtobool(get_parameters_value(111,'false')) then begin
memtblprint.close;
memtblprint.Open;
t_ch_accept.First;
while not t_ch_accept.Eof do begin
Frt:=GetFrt(t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
if memtblprint.Locate('Frt;ACCNAME;OBJDR',vararrayof([Frt,t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring]),[]) then begin
memtblprint.Edit;
if t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then begin
memtblprint.FieldByName('USDDR').AsFloat:=memtblprint.FieldByName('USDDR').AsFloat+t_ch_accept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLDR').AsFloat:=memtblprint.FieldByName('TTLDR').AsFloat+(t_ch_accept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*t_ch_accept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end else begin
memtblprint.FieldByName('RMBDR').AsFloat:=memtblprint.FieldByName('RMBDR').AsFloat+t_ch_accept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLDR').AsFloat:=memtblprint.FieldByName('TTLDR').AsFloat+(t_ch_accept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*t_ch_accept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end;
if memtblprint.FieldByName('REMARKDR').AsString='' then begin
memtblprint.FieldByName('REMARKDR').AsString:=t_ch_accept.fieldbyName('<27><>ע').AsString;
end else begin
memtblprint.FieldByName('REMARKDR').AsString:=memtblprint.FieldByName('REMARKDR').AsString+' '+t_ch_accept.fieldbyName('<27><>ע').AsString;
end;
memtblprint.Post;
end else begin
memtblprint.Insert;
memtblprint.FieldByName('ORDNO').AsInteger:=0;
memtblprint.FieldByName('FRT').AsString:=GetFrt(t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
memtblprint.FieldByName('ACCNAME').AsString:=t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
memtblprint.FieldByName('OBJDR').AsString:=t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
memtblprint.FieldByName('OBJCR').AsString:='';
memtblprint.FieldByName('REMARKCR').AsString:='';
memtblprint.FieldByName('USDCR').AsFloat:=0;
memtblprint.FieldByName('RMBCR').AsFloat:=0;
memtblprint.FieldByName('TTLCR').AsFloat:=0;
memtblprint.FieldByName('DR').AsString:='T';
memtblprint.FieldByName('CR').AsString:='F';
if t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then begin
memtblprint.FieldByName('USDDR').AsFloat:=t_ch_accept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLDR').AsFloat:=(t_ch_accept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*t_ch_accept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end else begin
memtblprint.FieldByName('RMBDR').AsFloat:=t_ch_accept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLDR').AsFloat:=(t_ch_accept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*t_ch_accept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end;
memtblprint.FieldByName('REMARKDR').AsString:=memtblprint.FieldByName('REMARKDR').AsString+' '+t_ch_accept.fieldbyName('<27><>ע').AsString;
memtblprint.Post;
end;
t_ch_accept.Next;
end;
t_ch_pay.First;
while not t_ch_pay.Eof do begin
Frt:=GetFrt(t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
if memtblprint.Locate('Frt;ACCNAME;CR',vararrayof([Frt,t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'F']),[]) then begin
memtblprint.Edit;
memtblprint.FieldByName('OBJCR').AsString:=t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
if t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then begin
memtblprint.FieldByName('USDCR').AsFloat:=memtblprint.FieldByName('USDCR').AsFloat+t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLCR').AsFloat:=memtblprint.FieldByName('TTLCR').AsFloat+(t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end else begin
memtblprint.FieldByName('RMBCR').AsFloat:=memtblprint.FieldByName('RMBCR').AsFloat+t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLCR').AsFloat:=memtblprint.FieldByName('TTLCR').AsFloat+(t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end;
if memtblprint.FieldByName('REMARKCR').AsString='' then begin
memtblprint.FieldByName('REMARKCR').AsString:=t_ch_pay.fieldbyName('<27><>ע').AsString;
end else begin
memtblprint.FieldByName('REMARKCR').AsString:=memtblprint.FieldByName('REMARKCR').AsString+' '+t_ch_pay.fieldbyName('<27><>ע').AsString;
end;
memtblprint.FieldByName('CR').AsString:='T';
memtblprint.Post;
end else begin
if memtblprint.Locate('Frt;ACCNAME;OBJCR',vararrayof([Frt,t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring]),[]) then begin
memtblprint.Edit;
if t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then begin
memtblprint.FieldByName('USDCR').AsFloat:=memtblprint.FieldByName('USDCR').AsFloat+t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLCR').AsFloat:=memtblprint.FieldByName('TTLCR').AsFloat+(t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end else begin
memtblprint.FieldByName('RMBCR').AsFloat:=memtblprint.FieldByName('RMBCR').AsFloat+t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLCR').AsFloat:=memtblprint.FieldByName('TTLCR').AsFloat+(t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end;
if memtblprint.FieldByName('REMARKCR').AsString='' then begin
memtblprint.FieldByName('REMARKCR').AsString:=t_ch_pay.fieldbyName('<27><>ע').AsString;
end else begin
memtblprint.FieldByName('REMARKCR').AsString:=memtblprint.FieldByName('REMARKCR').AsString+' '+t_ch_pay.fieldbyName('<27><>ע').AsString;
end;
memtblprint.FieldByName('CR').AsString:='T';
memtblprint.Post;
end else begin
memtblprint.Insert;
memtblprint.FieldByName('ORDNO').AsInteger:=0;
memtblprint.FieldByName('FRT').AsString:=GetFrt(t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
memtblprint.FieldByName('ACCNAME').AsString:=t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
memtblprint.FieldByName('OBJCR').AsString:=t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
memtblprint.FieldByName('OBJDR').AsString:='';
memtblprint.FieldByName('REMARKCR').AsString:='';
memtblprint.FieldByName('USDDR').AsFloat:=0;
memtblprint.FieldByName('RMBDR').AsFloat:=0;
memtblprint.FieldByName('TTLDR').AsFloat:=0;
memtblprint.FieldByName('DR').AsString:='F';
memtblprint.FieldByName('CR').AsString:='T';
if t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then begin
memtblprint.FieldByName('USDCR').AsFloat:=t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLCR').AsFloat:=(t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end else begin
memtblprint.FieldByName('RMBCR').AsFloat:=t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLCR').AsFloat:=(t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end;
memtblprint.FieldByName('REMARKCR').AsString:=memtblprint.FieldByName('REMARKCR').AsString+' '+t_ch_pay.fieldbyName('<27><>ע').AsString;
memtblprint.Post;
end;
end;
t_ch_pay.Next;
end;
memtblprint.SortOn('FRT;ACCNAME',[]);
end;
if strtobool(get_parameters_value(81,'false')) then begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> not in (select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_code_fee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+get_parameters_value(82,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')+''') order by ˳<><CBB3>');
Open;
memaccept.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
Close;SQL.Clear;
SQL.Add('Select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> not in (select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_code_fee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+get_parameters_value(82,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')+''') order by ˳<><CBB3>');
Open;
mempay.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
Close;SQL.Clear;
SQL.Add('Select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_code_fee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+get_parameters_value(82,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')+''') order by ˳<><CBB3>');
Open;
memdd.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
end;
finally
FreeAndNil(aQuery);
end;
if strtobool(get_parameters_value(30,'false')) then
begin
t_ch_fee_truck.close;
t_ch_fee_truck.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee_truck.open;
sys_print_piliang('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_sys_report.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_op_seae,t_op_seae1,t_op_gain1,ds_op_fenzhang1,t_ch_fee_truck1,t_ch_accept1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,memdd1);
// sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_accept.DataSource,t_op_gain1,ds_op_fenzhang1,t_ch_fee_truck1,memaccept1,mempay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,memdd1,false);
end
else
sys_print_piliang('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_sys_report.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_op_seae,t_op_seae1,t_op_gain1,ds_op_fenzhang1,nil,t_ch_accept1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,memdd1);
// sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_accept.DataSource,t_op_gain1,ds_op_fenzhang1,nil,memaccept1,mempay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,memdd1,false);
end else begin
with t_print_histry do begin
Close;SQL.Clear;
SQL.Add('Select * from t_sys_printhistry where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>'' and <20><><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'''');
Open;
if IsEmpty then begin
Insert;
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>';
FieldByName('<27><>ӡ<EFBFBD><D3A1>').AsString:=employee;
FieldByName('ʱ<><CAB1>').AsDateTime:=Date;
Post;
end;
end;
if strtobool(get_parameters_value(30,'false')) then
begin
t_ch_fee_truck.close;
t_ch_fee_truck.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee_truck.open;
if strtobool(get_parameters_value(111,'false')) then begin
sys_print_piliang('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_sys_report.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_op_seae,t_op_seae1,t_op_gain1,ds_op_fenzhang1,t_ch_fee_truck1,memtblprint1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,t_print_histry1);
// sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_accept.DataSource,t_op_gain1,ds_op_fenzhang1,t_ch_fee_truck1,memtblprint1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,t_print_histry1,false,t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').AsString);
end else
sys_print_piliang('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_sys_report.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_op_seae,t_op_seae1,t_op_gain1,ds_op_fenzhang1,t_ch_fee_truck1,t_ch_accept1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,t_print_histry1);
// sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_accept.DataSource,t_op_gain1,ds_op_fenzhang1,t_ch_fee_truck1,t_ch_accept1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,t_print_histry1,false,t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').AsString);
end
else
if strtobool(get_parameters_value(111,'false')) then begin
sys_print_piliang('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_sys_report.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_op_seae,t_op_seae1,t_op_gain1,ds_op_fenzhang1,t_ch_fee_truck1,memtblprint1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,t_print_histry1);
// sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_accept.DataSource,t_op_gain1,ds_op_fenzhang1,t_ch_fee_truck1,memtblprint1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,t_print_histry1,false,t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').AsString);
end else
sys_print_piliang('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_sys_report.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_op_seae,t_op_seae1,t_op_gain1,ds_op_fenzhang1,t_ch_fee_truck1,t_ch_accept1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,t_print_histry1);
// sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_accept.DataSource,t_op_gain1,ds_op_fenzhang1,t_ch_fee_truck1,t_ch_accept1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,t_print_histry1,false,t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').AsString);
end;
end;
procedure Tfrm_piliang_send_msg.FormShow(Sender: TObject);
begin
t_sys_report.Parameters[0].value:='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_sys_report.open;
t_ch_accept.open;
t_ch_pay.open;
t_op_gain.open;
end;
end.