|
|
|
|
unit u_op_custom;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, bsSkinCtrls, ExtCtrls, wwdblook, Mask, wwdbedit, Wwdotdot,
|
|
|
|
|
Wwdbcomb, StdCtrls, wwdbdatetimepicker, dxExEdtr, dxCntner, dxTL,
|
|
|
|
|
dxDBCtrl, dxDBGrid, DB, ADODB, dxDBTLCl, dxGrClms, ComCtrls, bsSkinTabs,
|
|
|
|
|
u_fee, Grids, DBGrids, DBCtrlsEh,ShellAPI;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
TBSITEMS = Record
|
|
|
|
|
PONO,BSNO,YWBH,sales :String;
|
|
|
|
|
Etd :Tdate;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
Tfrm_op_custom = class(TForm)
|
|
|
|
|
Panel2: TPanel;
|
|
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
|
|
bsSkinButton38: TbsSkinButton;
|
|
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
|
|
Label47: TLabel;
|
|
|
|
|
Label80: TLabel;
|
|
|
|
|
Edit3: TEdit;
|
|
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
|
|
bsSkinButton12: TbsSkinButton;
|
|
|
|
|
Edit1: TEdit;
|
|
|
|
|
Label51: TLabel;
|
|
|
|
|
Label53: TLabel;
|
|
|
|
|
wwDBDateTimePicker11: TwwDBDateTimePicker;
|
|
|
|
|
wwDBDateTimePicker13: TwwDBDateTimePicker;
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
Edit2: TEdit;
|
|
|
|
|
t_op_custom1: TDataSource;
|
|
|
|
|
t_op_custom_items1: TDataSource;
|
|
|
|
|
t_op_custom: TADOQuery;
|
|
|
|
|
t_op_custom_items: TADOQuery;
|
|
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
|
|
dxDBGrid1Column1: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column2: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column3: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column4: TdxDBGridPickColumn;
|
|
|
|
|
dxDBGrid1Column5: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column6: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column7: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column8: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column9: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column10: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column11: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column12: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column13: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column14: TdxDBGridColumn;
|
|
|
|
|
bsSkinExPanel1: TbsSkinExPanel;
|
|
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
|
|
dxDBGridColumn1: TdxDBGridColumn;
|
|
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
|
|
fra_fee1: Tfra_fee;
|
|
|
|
|
Label2: TLabel;
|
|
|
|
|
Edit4: TEdit;
|
|
|
|
|
Label3: TLabel;
|
|
|
|
|
Edit5: TEdit;
|
|
|
|
|
dxDBGrid2Column2: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column16: TdxDBGridCheckColumn;
|
|
|
|
|
dxDBGrid1Column15: TdxDBGridPickColumn;
|
|
|
|
|
DBComboBoxEh1: TDBComboBoxEh;
|
|
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
|
|
bsSkinButton11: TbsSkinButton;
|
|
|
|
|
SaveDialog: TSaveDialog;
|
|
|
|
|
DBComboBoxEh2: TDBComboBoxEh;
|
|
|
|
|
DBComboBoxEh3: TDBComboBoxEh;
|
|
|
|
|
Label4: TLabel;
|
|
|
|
|
Label5: TLabel;
|
|
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
|
|
Label6: TLabel;
|
|
|
|
|
Edit6: TEdit;
|
|
|
|
|
Label7: TLabel;
|
|
|
|
|
Edit7: TEdit;
|
|
|
|
|
Label8: TLabel;
|
|
|
|
|
Edit8: TEdit;
|
|
|
|
|
dxDBGrid1Column17: TdxDBGridColumn;
|
|
|
|
|
Label9: TLabel;
|
|
|
|
|
Edit9: TEdit;
|
|
|
|
|
bsSkinTabSheet3: TbsSkinTabSheet;
|
|
|
|
|
dsrFuJian: TDataSource;
|
|
|
|
|
t_op_file: TADOQuery;
|
|
|
|
|
bsSkinGroupBox13: TbsSkinGroupBox;
|
|
|
|
|
bsSkinPanel14: TbsSkinPanel;
|
|
|
|
|
bsSkinButton48: TbsSkinButton;
|
|
|
|
|
bsSkinButton49: TbsSkinButton;
|
|
|
|
|
bsSkinButton50: TbsSkinButton;
|
|
|
|
|
bsSkinButton51: TbsSkinButton;
|
|
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
|
|
dxDBGrid2fid: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid2rl_id: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn2: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn3: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn4: TdxDBGridColumn;
|
|
|
|
|
dxDBGridDateColumn1: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGridColumn5: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn6: TdxDBGridColumn;
|
|
|
|
|
OpenDialog1: TOpenDialog;
|
|
|
|
|
SaveDialog1: TSaveDialog;
|
|
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
procedure Panel2Resize(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton38Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
procedure t_op_customBeforePost(DataSet: TDataSet);
|
|
|
|
|
procedure dxDBGrid2DblClick(Sender: TObject);
|
|
|
|
|
procedure t_op_customAfterInsert(DataSet: TDataSet);
|
|
|
|
|
procedure dxDBGrid1DblClick(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton8Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinPageControl1Change(Sender: TObject);
|
|
|
|
|
procedure DBComboBoxEh1Change(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton11Click(Sender: TObject);
|
|
|
|
|
procedure DBComboBoxEh2Change(Sender: TObject);
|
|
|
|
|
procedure DBComboBoxEh3Change(Sender: TObject);
|
|
|
|
|
procedure Edit3KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure wwDBDateTimePicker11KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure wwDBDateTimePicker13KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure Edit5KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure Edit6KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure Edit2KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure Edit4KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure wwDBDateTimePicker1KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure wwDBDateTimePicker2KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure Edit7KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure Edit8KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure fra_fee1bsSkinButton11Click(Sender: TObject);
|
|
|
|
|
procedure fra_fee1bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
procedure fra_fee1bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
procedure fra_fee1bsSkinButton4Click(Sender: TObject);
|
|
|
|
|
procedure fra_fee1bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
procedure fra_fee1bsSkinButton7Click(Sender: TObject);
|
|
|
|
|
procedure fra_fee1bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
procedure fra_fee1bsSkinButton15Click(Sender: TObject);
|
|
|
|
|
procedure fra_fee1bsSkinButton12Click(Sender: TObject);
|
|
|
|
|
procedure fra_fee1bsSkinButton17Click(Sender: TObject);
|
|
|
|
|
procedure fra_fee1bsSkinButton18Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton48Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton49Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton50Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton51Click(Sender: TObject);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
function GetWTNO(mblno:string):TBSITEMS;
|
|
|
|
|
function BSStatus(bsNo:string):Boolean;
|
|
|
|
|
procedure UpLoadPro(fname:string); //fname<6D><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
|
|
|
|
procedure DownLoadPro(fname:string); //<2F><><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
procedure WMDROPFILES(var Msg: TMessage);message WM_DROPFILES;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_op_custom: Tfrm_op_custom;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_main, my_sys_function, u_op_seae_apply, u_sys_progress;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.DownLoadPro(fname: string);
|
|
|
|
|
const
|
|
|
|
|
MaxBufSize=$F000;
|
|
|
|
|
var
|
|
|
|
|
myfilename:string;//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
|
|
|
|
myfileStream,exeBlobStream:TStream;
|
|
|
|
|
Count,BufSize,N: Integer;
|
|
|
|
|
Buffer:PChar;
|
|
|
|
|
begin
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|
|
|
|
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.Update;
|
|
|
|
|
myfilename:=FName ;
|
|
|
|
|
with t_op_file do
|
|
|
|
|
begin
|
|
|
|
|
myfilename:=myfilename ; //+fieldbyname('<27><><EFBFBD><EFBFBD>').asstring ;
|
|
|
|
|
myfileStream :=TFileStream.Create(myfilename,fmCreate);//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|
|
|
|
try //SaveToStream(Stream);
|
|
|
|
|
ExeBlobStream:=CreateBlobStream(FieldByName('<27><><EFBFBD><EFBFBD>'),bmRead); //<2F><><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD>ȡ<EFBFBD>ü<EFBFBD>¼
|
|
|
|
|
Count:=0;
|
|
|
|
|
try
|
|
|
|
|
if Count=0 then
|
|
|
|
|
begin
|
|
|
|
|
ExeBlobStream.Position:=0;
|
|
|
|
|
Count:=ExeBlobStream.Size;//showmessage(inttostr(count));
|
|
|
|
|
end;
|
|
|
|
|
if Count>MaxBufSize then BufSize:=MaxBufSize else BufSize:=Count;
|
|
|
|
|
GetMem(Buffer,BufSize);
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue:=(Count div BufSize)+2;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue:=0;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=0;
|
|
|
|
|
try
|
|
|
|
|
while Count<>0 do
|
|
|
|
|
begin
|
|
|
|
|
if Count>BufSize then N:=BufSize else N:=Count;
|
|
|
|
|
ExeBlobStream.ReadBuffer(Buffer^,N);//<2F><><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
MyFileStream.WriteBuffer(Buffer^,N);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD>ļ<EFBFBD>
|
|
|
|
|
Dec(Count,N);
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
FreeMem(Buffer,BufSize);
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
ExeBlobStream.Free;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
myfileStream.Free;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
frm_sys_progress.close;
|
|
|
|
|
frm_sys_progress:=nil;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.UpLoadPro(fname: string);
|
|
|
|
|
const
|
|
|
|
|
BufSize=$F000;
|
|
|
|
|
var
|
|
|
|
|
Counter, N: Integer;
|
|
|
|
|
Buffer: PAnsiChar;
|
|
|
|
|
FieldStrm: TStream;
|
|
|
|
|
ExeFileStream:TFileStream;
|
|
|
|
|
size_tmp: Double;
|
|
|
|
|
filename,fileExt:string ;
|
|
|
|
|
begin
|
|
|
|
|
//<2F>ϴ<EFBFBD><CFB4>ļ<EFBFBD>
|
|
|
|
|
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.Update;
|
|
|
|
|
filename:=ExtractFileName(fname) ;
|
|
|
|
|
fileExt:=ExtractFileExt(filename) ;
|
|
|
|
|
ExeFileStream:=TFileStream.Create(fname,fmopenRead); //<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|
|
|
|
with t_op_file do
|
|
|
|
|
begin
|
|
|
|
|
Open;
|
|
|
|
|
append;
|
|
|
|
|
try
|
|
|
|
|
FieldStrm := CreateBlobStream(FieldByName('<27><><EFBFBD><EFBFBD>'),bmWrite);
|
|
|
|
|
GetMem(Buffer,BufSize);
|
|
|
|
|
try
|
|
|
|
|
Counter := ExeFileStream.Size;
|
|
|
|
|
size_tmp :=ExeFileStream.Size;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue:=(Counter div BufSize)+2;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue:=0;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=0;
|
|
|
|
|
while Counter<>0 do
|
|
|
|
|
begin
|
|
|
|
|
if Counter>BufSize then N :=BufSize else N:=Counter;
|
|
|
|
|
ExeFileStream.ReadBuffer(Buffer^,N);
|
|
|
|
|
FieldStrm.WriteBuffer(Buffer^, N);
|
|
|
|
|
Dec(Counter, N);
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
// Application.ProcessMessages;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
FreeMem(Buffer,BufSize);
|
|
|
|
|
FieldStrm.Free;
|
|
|
|
|
end;
|
|
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=filename;
|
|
|
|
|
FieldByName('<27><>С').AsFloat:=size_tmp;
|
|
|
|
|
FieldByName('<27>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=now();
|
|
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asstring:=employee;
|
|
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD>').Asstring:=fileExt;
|
|
|
|
|
Post;
|
|
|
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>!','<27><>ʾ',MB_OK+MB_IconInformation);
|
|
|
|
|
finally
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
frm_sys_progress.close;
|
|
|
|
|
frm_sys_progress:=nil;
|
|
|
|
|
ExeFileStream.Free;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.WMDROPFILES(var Msg: TMessage);
|
|
|
|
|
var
|
|
|
|
|
FilesCount: Integer; // <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
i: Integer;
|
|
|
|
|
FileName: array[0..255] of Char;
|
|
|
|
|
begin
|
|
|
|
|
// <20><>ȡ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
FilesCount := DragQueryFile(Msg.WParam, $FFFFFFFF, nil, 0);
|
|
|
|
|
// <20><>ȡ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
|
|
|
|
for i := 0 to FilesCount - 1 do
|
|
|
|
|
begin
|
|
|
|
|
DragQueryFile(Msg.WParam, i, FileName, 256);
|
|
|
|
|
ShowMessage(FileName);
|
|
|
|
|
end;
|
|
|
|
|
// <20>ͷ<EFBFBD>
|
|
|
|
|
DragFinish(Msg.WParam);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Tfrm_op_custom.BSStatus(bsNo:string):Boolean;
|
|
|
|
|
var
|
|
|
|
|
aAdoQuery:TADOQuery;
|
|
|
|
|
begin
|
|
|
|
|
Result:=False;
|
|
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
|
|
with aAdoQuery do
|
|
|
|
|
try
|
|
|
|
|
Close;SQL.Clear;
|
|
|
|
|
SQL.Add('select <20><><EFBFBD><EFBFBD>״̬ from v_op_bscard_all ');
|
|
|
|
|
SQL.Add('Where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><>'''' and <20><><EFBFBD><EFBFBD>״̬=''<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>''');
|
|
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsNo;
|
|
|
|
|
Open;First;
|
|
|
|
|
if not IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
Result:=True;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
Free;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function Tfrm_op_custom.GetWTNO(mblno:string):TBSITEMS;
|
|
|
|
|
var aQuery:TADOQuery;
|
|
|
|
|
begin
|
|
|
|
|
Result.PONO:='';
|
|
|
|
|
Result.BSNO:='';
|
|
|
|
|
Result.YWBH:='';
|
|
|
|
|
Result.sales:='';
|
|
|
|
|
|
|
|
|
|
if Trim(mblno)<>'' then
|
|
|
|
|
begin
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
with aQuery do
|
|
|
|
|
try
|
|
|
|
|
Close;SQL.Clear;
|
|
|
|
|
SQL.Add('Select top 1 ί<>б<EFBFBD><D0B1><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from V_op_bscard_All where <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>=:<3A><><EFBFBD>ᵥ<EFBFBD><E1B5A5> and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><>ͨ<EFBFBD><CDA8>''');
|
|
|
|
|
Parameters.ParamByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').Value:=mblno;
|
|
|
|
|
Open;First;
|
|
|
|
|
if not IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
Result.PONO:=fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString;
|
|
|
|
|
Result.BSNO:=fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;;
|
|
|
|
|
Result.Etd:=fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value;
|
|
|
|
|
Result.ywbh:=fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
Result.sales:=fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
Free;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.FormClose(Sender: TObject;
|
|
|
|
|
var Action: TCloseAction);
|
|
|
|
|
begin
|
|
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
|
|
|
|
|
|
|
savewwgrid(fra_fee1.wwDBGrid1,'<27>̼<EFBFBD>Ӧ<EFBFBD><D3A6>');
|
|
|
|
|
savewwgrid(fra_fee1.wwDBGrid2,'<27>̼<EFBFBD>Ӧ<EFBFBD><D3A6>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
frm_op_custom.Hide;
|
|
|
|
|
frm_op_custom.ManualFloat(frm_op_custom.BoundsRect );
|
|
|
|
|
frm_main.freeTabs('frm_op_custom');
|
|
|
|
|
action:=cafree;
|
|
|
|
|
frm_op_custom:=nil;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.Panel2Resize(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
i:integer;
|
|
|
|
|
begin
|
|
|
|
|
i:=round(Panel2.Width/11);
|
|
|
|
|
bsSkinButton1.Width:=i;
|
|
|
|
|
bsSkinButton7.Width:=i;
|
|
|
|
|
bsSkinButton6.Width:=i;
|
|
|
|
|
bsSkinButton2.Width:=i;
|
|
|
|
|
bsSkinButton4.Width:=i;
|
|
|
|
|
bsSkinButton3.Width:=i;
|
|
|
|
|
bsSkinButton9.Width:=i;
|
|
|
|
|
bsSkinButton10.Width:=i;
|
|
|
|
|
bsSkinButton11.Width:=i;
|
|
|
|
|
bsSkinButton38.Width:=i;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.bsSkinButton7Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
table_Prior(t_op_custom);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
table_next(t_op_custom);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
table_post(t_op_custom);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.bsSkinButton4Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
|
|
|
|
|
begin
|
|
|
|
|
if not t_op_custom.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean then
|
|
|
|
|
begin
|
|
|
|
|
t_op_custom.delete;
|
|
|
|
|
while t_op_custom_items.Eof do
|
|
|
|
|
t_op_custom_items.Delete;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27>Ѿ<EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>');
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.bsSkinButton38Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
book1:Tbookmark;
|
|
|
|
|
begin
|
|
|
|
|
if t_op_custom.IsEmpty then
|
|
|
|
|
exit;
|
|
|
|
|
book1:=t_op_custom.GetBookmark;
|
|
|
|
|
t_op_custom.Requery;
|
|
|
|
|
t_op_custom.GotoBookmark(book1);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.FormShow(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
t_op_custom.Close;
|
|
|
|
|
t_op_custom.SQL.clear;
|
|
|
|
|
t_op_custom.SQL.Add('select * from t_op_custom where 1=1 and ' //and ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=0
|
|
|
|
|
+' SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7)='''+FormatDateTime('YYYY',Date)+'/'+FormatDateTime('MM',Date)+''' and '
|
|
|
|
|
+open_data('0017','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
|
|
|
|
|
+' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>');
|
|
|
|
|
t_op_custom.open;
|
|
|
|
|
t_op_custom_items.Open;
|
|
|
|
|
loadreggrid(dxdbgrid1,false,caption);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if if_open('293') or if_open('294') then
|
|
|
|
|
begin
|
|
|
|
|
fra_fee1.edit_type.text:='1';
|
|
|
|
|
fra_fee1.baoguan.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_custom1;
|
|
|
|
|
if strtobool(get_parameters_value(150,'false')) then
|
|
|
|
|
fra_fee1.bsSkinPanel3.Visible:=true;
|
|
|
|
|
fra_fee1.DBEdit48.DataSource:=t_op_custom1;
|
|
|
|
|
|
|
|
|
|
if if_open('293') then
|
|
|
|
|
begin
|
|
|
|
|
fra_fee1.t_ch_accept.DataSource:=t_op_custom1;
|
|
|
|
|
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 * 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 * 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;
|
|
|
|
|
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 * 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_accept.open;
|
|
|
|
|
end;
|
|
|
|
|
fra_fee1.a_shen_delete.open;
|
|
|
|
|
fra_fee1.a_shen_modify_old.open;
|
|
|
|
|
fra_fee1.a_shen_modify_new.open;
|
|
|
|
|
fra_fee1.Panel3.visible:=true;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
fra_fee1.Panel3.visible:=false;
|
|
|
|
|
if if_open('294') then
|
|
|
|
|
begin
|
|
|
|
|
fra_fee1.t_ch_pay.DataSource:=t_op_custom1;
|
|
|
|
|
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 * 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 * 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_pay.open;
|
|
|
|
|
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 * 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;
|
|
|
|
|
fra_fee1.p_shen_delete.open;
|
|
|
|
|
fra_fee1.p_shen_modify_old.open;
|
|
|
|
|
fra_fee1.p_shen_modify_new.open;
|
|
|
|
|
fra_fee1.Panel1.visible:=true;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
fra_fee1.Panel1.visible:=false;
|
|
|
|
|
|
|
|
|
|
if fra_fee1.Panel1.visible and
|
|
|
|
|
fra_fee1.Panel3.visible then
|
|
|
|
|
begin
|
|
|
|
|
if if_open('253') then begin
|
|
|
|
|
fra_fee1.Panel8.Visible:=true;
|
|
|
|
|
fra_fee1.Panel8.Height:=20;
|
|
|
|
|
end else
|
|
|
|
|
fra_fee1.Panel8.Visible:=false;
|
|
|
|
|
|
|
|
|
|
fra_fee1.t_op_gain.DataSource:=t_op_custom1;
|
|
|
|
|
fra_fee1.t_op_gain.open;
|
|
|
|
|
|
|
|
|
|
fra_fee1.Panel9.Visible:=false;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
fra_fee1.Panel8.Visible:=false;
|
|
|
|
|
end;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
fra_fee1.Visible:=false;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
if not t_op_file.Active then
|
|
|
|
|
t_op_file.open;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loadwwgrid(fra_fee1.wwDBGrid1,'<27>̼<EFBFBD>Ӧ<EFBFBD><D3A6>');
|
|
|
|
|
loadwwgrid(fra_fee1.wwDBGrid2,'<27>̼<EFBFBD>Ӧ<EFBFBD><D3A6>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.t_op_customBeforePost(DataSet: TDataSet);
|
|
|
|
|
begin
|
|
|
|
|
table_before_post(t_op_custom,'<27><><EFBFBD><EFBFBD>');
|
|
|
|
|
table_before_post(t_op_custom,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
table_before_post(t_op_custom,'<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>');
|
|
|
|
|
table_before_post(t_op_custom,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
t_op_custom['<27><><EFBFBD><EFBFBD>']:=FormatDateTime('YYMM', t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.dxDBGrid2DblClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
frm_main.view_momo(t_op_custom_items1,'Ʒ<><C6B7>');
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.t_op_customAfterInsert(DataSet: TDataSet);
|
|
|
|
|
begin
|
|
|
|
|
t_op_custom.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>';
|
|
|
|
|
t_op_custom['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
|
|
t_op_custom['<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>']:=employee;
|
|
|
|
|
t_op_custom['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
|
|
t_op_custom['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=subComp;
|
|
|
|
|
t_op_custom['<27><><EFBFBD><EFBFBD>Ա']:=employee;
|
|
|
|
|
t_op_custom['<27>ͷ<EFBFBD>Ա']:=employee;
|
|
|
|
|
t_op_custom['ѡ<><D1A1>']:=0;
|
|
|
|
|
t_op_custom['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
|
|
t_op_custom['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:='<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.dxDBGrid1DblClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if t_op_custom.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString<>'' then
|
|
|
|
|
bsSkinTabSheet2.Show;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.bsSkinButton8Click(Sender: TObject);
|
|
|
|
|
VAR
|
|
|
|
|
str:widestring;
|
|
|
|
|
begin
|
|
|
|
|
str:='where '+open_data('0017','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if wwDBDateTimePicker11.text<>''then
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker11.text+'''';
|
|
|
|
|
if wwDBDateTimePicker13.text<>''then
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker13.text+'''';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if wwDBDateTimePicker1.text<>''then
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
|
|
|
|
|
if wwDBDateTimePicker2.text<>''then
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
str:=query_tiaojian(1,str,'<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>','ģ<><C4A3>', Edit3.text);
|
|
|
|
|
|
|
|
|
|
str:=query_tiaojian(1,str,'<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>','ģ<><C4A3>', Edit1.text);
|
|
|
|
|
|
|
|
|
|
str:=query_tiaojian(1,str,'<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>','ģ<><C4A3>', Edit2.text);
|
|
|
|
|
|
|
|
|
|
str:=query_tiaojian(1,str,'¼<><C2BC><EFBFBD><EFBFBD>','ģ<><C4A3>', Edit4.text);
|
|
|
|
|
|
|
|
|
|
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD>','ģ<><C4A3>', Edit5.text);
|
|
|
|
|
|
|
|
|
|
str:=query_tiaojian(1,str,'ί<>б<EFBFBD><D0B1><EFBFBD>','ģ<><C4A3>', Edit7.text);
|
|
|
|
|
|
|
|
|
|
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤','ģ<><C4A3>', Edit9.text);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
str:=query_tiaojian(1,str,'Ʒ<><C6B7>','ģ<><C4A3>', Edit6.text);
|
|
|
|
|
|
|
|
|
|
if Edit8.text<>''then
|
|
|
|
|
str:=str+' and c_id in ( select c_id from t_op_custom_items where Ʒ<><C6B7> like '+''''+'%'+Edit8.text+'%'+''')';
|
|
|
|
|
|
|
|
|
|
t_op_custom.close;
|
|
|
|
|
t_op_custom.sql.clear;
|
|
|
|
|
t_op_custom.sql.add('select * from t_op_custom '+str+' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>');
|
|
|
|
|
t_op_custom.open;
|
|
|
|
|
t_op_custom.open;
|
|
|
|
|
t_op_custom_items.Open;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
var i:Integer;
|
|
|
|
|
BSITEMS:TBSITEMS;
|
|
|
|
|
begin
|
|
|
|
|
//<2F><>ȡ<EFBFBD>˵ֱ<CBB5><D6B1><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
|
|
|
|
|
|
|
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫ<EFBFBD><D2AA>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
if dxdbgrid1.SelectedCount>=1 then
|
|
|
|
|
begin
|
|
|
|
|
for i:=0 to dxdbgrid1.SelectedCount-1 do
|
|
|
|
|
begin
|
|
|
|
|
t_op_custom.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
|
|
|
|
|
t_op_custom.Edit;
|
|
|
|
|
BSITEMS:=GetWTNO(t_op_custom.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString);
|
|
|
|
|
|
|
|
|
|
if Trim(BSITEMS.PONO)<>'' then
|
|
|
|
|
begin
|
|
|
|
|
t_op_custom['ί<>б<EFBFBD><D0B1><EFBFBD>']:=BSITEMS.PONO;
|
|
|
|
|
t_op_custom['<27><><EFBFBD><EFBFBD>']:=BSITEMS.BSNO;
|
|
|
|
|
t_op_custom['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=BSITEMS.Etd;
|
|
|
|
|
t_op_custom['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=BSITEMS.ywbh;
|
|
|
|
|
t_op_custom['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=BSITEMS.sales;
|
|
|
|
|
end;
|
|
|
|
|
t_op_custom.Post;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.bsSkinPageControl1Change(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
{
|
|
|
|
|
if t_op_custom.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString<>'' then
|
|
|
|
|
bsSkinPageControl1.ActivePageIndex:=1
|
|
|
|
|
else bsSkinPageControl1.ActivePageIndex:=0;
|
|
|
|
|
}
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.DBComboBoxEh1Change(Sender: TObject);
|
|
|
|
|
var BSITEMS:TBSITEMS;
|
|
|
|
|
begin
|
|
|
|
|
if t_op_custom=nil then
|
|
|
|
|
exit;
|
|
|
|
|
if trim(t_op_custom.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString)<>'' then
|
|
|
|
|
begin
|
|
|
|
|
if (t_op_custom.state=dsinsert)or(t_op_custom.state=dsedit)then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>ֹ<EFBFBD><D6B9><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
t_op_custom.Cancel;
|
|
|
|
|
end;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
if (t_op_custom.state=dsinsert)or(t_op_custom.state=dsedit)then
|
|
|
|
|
begin
|
|
|
|
|
BSITEMS:=GetWTNO(t_op_custom.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString);
|
|
|
|
|
if Trim(BSITEMS.PONO)<>'' then
|
|
|
|
|
begin
|
|
|
|
|
t_op_custom['ί<>б<EFBFBD><D0B1><EFBFBD>']:=BSITEMS.PONO;
|
|
|
|
|
t_op_custom['<27><><EFBFBD><EFBFBD>']:=BSITEMS.BSNO;
|
|
|
|
|
t_op_custom['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=BSITEMS.Etd;
|
|
|
|
|
t_op_custom['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=BSITEMS.ywbh;
|
|
|
|
|
t_op_custom['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=BSITEMS.sales;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
t_op_custom.Append;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if not if_open('190') then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if not assigned(frm_op_seae_apply) then
|
|
|
|
|
frm_op_seae_apply:=tfrm_op_seae_apply.Create (self);
|
|
|
|
|
frm_op_seae_apply.ManualDock(frm_main.SearchTabs('frm_op_seae_apply',frm_op_seae_apply.caption,'151'),nil,alClient);
|
|
|
|
|
frm_op_seae_apply.show;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.bsSkinButton11Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
with SaveDialog do
|
|
|
|
|
begin
|
|
|
|
|
DefaultExt :='xls';
|
|
|
|
|
Filter := '(*.xls)|*.xls';
|
|
|
|
|
if Execute then
|
|
|
|
|
begin
|
|
|
|
|
dxDBGrid1.SaveToXLS(FileName,true);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.DBComboBoxEh2Change(Sender: TObject);
|
|
|
|
|
var aAdoQuery:TAdoQuery;
|
|
|
|
|
begin
|
|
|
|
|
if t_op_custom=nil then
|
|
|
|
|
exit;
|
|
|
|
|
if (t_op_custom.state=dsinsert)or(t_op_custom.state=dsedit)then
|
|
|
|
|
begin
|
|
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
|
|
with aAdoQuery do
|
|
|
|
|
try
|
|
|
|
|
Close;SQL.Clear;
|
|
|
|
|
SQL.Add('Select top 1 <20><><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>,<2C><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD> from t_op_custom where <20><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><>'''' and <20><><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>=:<3A><><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>');
|
|
|
|
|
Parameters.ParamByName('<27><><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>').Value:=DBComboBoxEh2.Text;
|
|
|
|
|
Open;First;
|
|
|
|
|
if not IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
if DBComboBoxEh2.Text='' then
|
|
|
|
|
exit;
|
|
|
|
|
t_op_custom['<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>']:=fieldbyname('<27><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
Free;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.DBComboBoxEh3Change(Sender: TObject);
|
|
|
|
|
var aAdoQuery:TAdoQuery;
|
|
|
|
|
begin
|
|
|
|
|
if t_op_custom=nil then
|
|
|
|
|
exit;
|
|
|
|
|
if (t_op_custom.state=dsinsert)or(t_op_custom.state=dsedit)then
|
|
|
|
|
begin
|
|
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
|
|
with aAdoQuery do
|
|
|
|
|
try
|
|
|
|
|
Close;SQL.Clear;
|
|
|
|
|
SQL.Add('Select top 1 <20><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>,Ʒ<><C6B7> from t_op_custom where Ʒ<><C6B7><>'''' and <20><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>=:<3A><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>');
|
|
|
|
|
Parameters.ParamByName('<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').Value:=DBComboBoxEh3.Text;
|
|
|
|
|
Open;First;
|
|
|
|
|
if not IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
if DBComboBoxEh3.Text='' then
|
|
|
|
|
exit;
|
|
|
|
|
t_op_custom['Ʒ<><C6B7>']:=fieldbyname('Ʒ<><C6B7>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
Free;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.Edit3KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if Key=#13 then
|
|
|
|
|
bsSkinButton8.OnClick(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.Edit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if Key=#13 then
|
|
|
|
|
bsSkinButton8.OnClick(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.wwDBDateTimePicker11KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if Key=#13 then
|
|
|
|
|
bsSkinButton8.OnClick(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.wwDBDateTimePicker13KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if Key=#13 then
|
|
|
|
|
bsSkinButton8.OnClick(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.Edit5KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if Key=#13 then
|
|
|
|
|
bsSkinButton8.OnClick(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.Edit6KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if Key=#13 then
|
|
|
|
|
bsSkinButton8.OnClick(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.Edit2KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if Key=#13 then
|
|
|
|
|
bsSkinButton8.OnClick(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.Edit4KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if Key=#13 then
|
|
|
|
|
bsSkinButton8.OnClick(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.wwDBDateTimePicker1KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if Key=#13 then
|
|
|
|
|
bsSkinButton8.OnClick(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.wwDBDateTimePicker2KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if Key=#13 then
|
|
|
|
|
bsSkinButton8.OnClick(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.Edit7KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if Key=#13 then
|
|
|
|
|
bsSkinButton8.OnClick(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.Edit8KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if Key=#13 then
|
|
|
|
|
bsSkinButton8.OnClick(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.fra_fee1bsSkinButton11Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if BSStatus(t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>÷<EFBFBD><C3B7>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӻ<EFBFBD><D3BB><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
fra_fee1.bsSkinButton11Click(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.fra_fee1bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if BSStatus(t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>÷<EFBFBD><C3B7>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӻ<EFBFBD><D3BB><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
fra_fee1.bsSkinButton1Click(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.fra_fee1bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
fra_fee1.bsSkinButton2Click(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.fra_fee1bsSkinButton4Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if BSStatus(t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>÷<EFBFBD><C3B7>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӻ<EFBFBD><D3BB><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
fra_fee1.bsSkinButton4Click(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.fra_fee1bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if BSStatus(t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>÷<EFBFBD><C3B7>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӻ<EFBFBD><D3BB><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
fra_fee1.bsSkinButton6Click(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.fra_fee1bsSkinButton7Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if BSStatus(t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>÷<EFBFBD><C3B7>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӻ<EFBFBD><D3BB><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
fra_fee1.bsSkinButton7Click(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.fra_fee1bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if BSStatus(t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>÷<EFBFBD><C3B7>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӻ<EFBFBD><D3BB><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
fra_fee1.bsSkinButton10Click(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.fra_fee1bsSkinButton15Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if BSStatus(t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>÷<EFBFBD><C3B7>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӻ<EFBFBD><D3BB><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
fra_fee1.bsSkinButton15Click(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.fra_fee1bsSkinButton12Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if BSStatus(t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>÷<EFBFBD><C3B7>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӻ<EFBFBD><D3BB><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
fra_fee1.bsSkinButton12Click(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.fra_fee1bsSkinButton17Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if BSStatus(t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>÷<EFBFBD><C3B7>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӻ<EFBFBD><D3BB><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
fra_fee1.bsSkinButton17Click(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.fra_fee1bsSkinButton18Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if BSStatus(t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>÷<EFBFBD><C3B7>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӻ<EFBFBD><D3BB><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if t_op_custom.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
fra_fee1.bsSkinButton18Click(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.bsSkinButton48Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
FileStream:TFileStream;
|
|
|
|
|
fsize:double;
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
//<2F>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
if OpenDialog1.Execute then begin
|
|
|
|
|
FileStream:=TFileStream.Create(Opendialog1.FileName,fmopenRead); //<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|
|
|
|
try
|
|
|
|
|
fsize:=FileStream.size;
|
|
|
|
|
finally
|
|
|
|
|
freeandnil(FileStream);
|
|
|
|
|
end;
|
|
|
|
|
if fsize>500000 then begin
|
|
|
|
|
MessageDlg('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD>500K<30><4B><EFBFBD><EFBFBD>',mtWarning,[mbyes],0);
|
|
|
|
|
end
|
|
|
|
|
else UpLoadPro(Opendialog1.FileName);
|
|
|
|
|
end else exit ;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.bsSkinButton49Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
//<2F><><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>
|
|
|
|
|
if SaveDialog1.Execute then begin
|
|
|
|
|
DownLoadPro(Savedialog1.FileName+t_op_file.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
|
|
end else exit ;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.bsSkinButton50Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
arr: array[0..MAX_PATH] of Char;
|
|
|
|
|
num: DWORD;
|
|
|
|
|
tmpfile:string ;
|
|
|
|
|
begin
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|
|
|
|
try
|
|
|
|
|
GetTempPath(MAX_PATH, arr);
|
|
|
|
|
tmpfile:=arr+t_op_file.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring ;
|
|
|
|
|
DownLoadPro(tmpfile) ;
|
|
|
|
|
ShellExecute(Handle, nil, pchar(tmpfile), nil, nil, SW_NORMAL);
|
|
|
|
|
except
|
|
|
|
|
showmessage('<27><><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵȴ<D3B5><C8B4><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end ;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_custom.bsSkinButton51Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
//ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
|
|
|
|
|
t_op_file.delete ;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|