初
This commit is contained in:
commit
a9ceaeacaf
21
.gitignore
vendored
Normal file
21
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
**/layout
|
||||
**/report
|
||||
**/实施文件
|
||||
**/image
|
||||
**/doc
|
||||
**/wav
|
||||
**/__history
|
||||
**/__recovery
|
||||
*.dll
|
||||
*.exe
|
||||
*.ddp
|
||||
*.dcu
|
||||
*.~pas
|
||||
*.~dfm
|
||||
*.~ddp
|
||||
*.~dpr
|
||||
*.~dpr
|
||||
*.identcache
|
||||
*.local
|
||||
*.zip
|
||||
*.rar
|
||||
193
A00通用方法/U_CustomFun.pas
Normal file
193
A00通用方法/U_CustomFun.pas
Normal file
|
|
@ -0,0 +1,193 @@
|
|||
unit U_CustomFun;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
System.SysUtils, System.Classes, Data.DB, System.Generics.Collections,
|
||||
System.StrUtils, Datasnap.DBClient, Data.Win.ADODB;
|
||||
|
||||
type
|
||||
TProductTotals = class
|
||||
private
|
||||
FPieceCount: Integer;
|
||||
FQuantity: Double;
|
||||
public
|
||||
property PieceCount: Integer read FPieceCount write FPieceCount;
|
||||
property Quantity: Double read FQuantity write FQuantity;
|
||||
constructor Create;
|
||||
end;
|
||||
|
||||
TProductNameTotalsDict = TDictionary<string, TProductTotals>;
|
||||
|
||||
function GetMergedResultsAsString(ClientDataSet: TClientDataSet): string;
|
||||
|
||||
function CustomSelCDSKey(CDS_1: TclientDataSet; Keys: TArray<string>): TArray<string>;
|
||||
|
||||
function GetLSNo1(ADOQueryTmp: TADOQuery; // 取主键
|
||||
var mMaxNo: string; mFlag: string; mTable: string; mlen: Integer; mtype: Integer = 0): Boolean;
|
||||
|
||||
implementation
|
||||
|
||||
//uses
|
||||
// U_printPdf, U_RTFun, U_DataLink;
|
||||
|
||||
|
||||
|
||||
/// ////////////////////////////////////////////////
|
||||
// 函数功能:取流水号
|
||||
// mFlag:前缀;mTable:表名
|
||||
// mlen:流水号长度; mtype:是否带日期 1:带 0 不带
|
||||
/// ////////////////////////////////////////////////
|
||||
function GetLSNo1(ADOQueryTmp: TADOQuery; var mMaxNo: string; mFlag: string; mTable: string; mlen: Integer; mtype: Integer = 0): Boolean;
|
||||
begin
|
||||
try
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('exec Get_SY_MaxBH_copy1 ');
|
||||
sql.Add(' ' + quotedStr(mFlag));
|
||||
sql.Add(',' + quotedStr(mTable));
|
||||
sql.Add(',' + intTostr(mlen));
|
||||
sql.Add(',' + intTostr(mtype));
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
|
||||
if Recordcount > 0 then
|
||||
begin
|
||||
mMaxNo := Trim(fieldByName('MaxBH').AsString);
|
||||
if mMaxNo <> '' then
|
||||
Result := true
|
||||
else
|
||||
Result := false;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Result := false;
|
||||
end;
|
||||
|
||||
end;
|
||||
if not Result then
|
||||
raise Exception.Create(PChar('无法生成流水号(' + mFlag + ')'));
|
||||
|
||||
except
|
||||
Result := false;
|
||||
// raise Exception.Create(PChar('无法生成流水号(' + mFlag + ')'));
|
||||
end;
|
||||
end;
|
||||
|
||||
constructor TProductTotals.Create;
|
||||
begin
|
||||
FPieceCount := 0;
|
||||
FQuantity := 0.0;
|
||||
end;
|
||||
|
||||
function CustomSelCDSKey(CDS_1: TclientDataSet; Keys: TArray<string>): TArray<string>;
|
||||
var
|
||||
RTValues: TArray<string>;
|
||||
i, j, CurRow: Integer;
|
||||
begin
|
||||
SetLength(RTValues, Length(Keys));
|
||||
CurRow := CDS_1.recno;
|
||||
CDS_1.DisableControls;
|
||||
with CDS_1 do
|
||||
begin
|
||||
First;
|
||||
j := 0;
|
||||
while not Eof do
|
||||
begin
|
||||
if j = 0 then
|
||||
begin
|
||||
for i := 0 to Length(RTValues) - 1 do
|
||||
begin
|
||||
RTValues[i] := Trim(CDS_1.fieldbyname(Keys[i]).AsString) + ',';
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
for i := 0 to Length(RTValues) - 1 do
|
||||
begin
|
||||
RTValues[i] := RTValues[i] + Trim(CDS_1.fieldbyname(Keys[i]).AsString) + ',';
|
||||
end;
|
||||
end;
|
||||
j := j + 1;
|
||||
|
||||
CDS_1.Next;
|
||||
end;
|
||||
end;
|
||||
CDS_1.recno := CurRow;
|
||||
CDS_1.EnableControls;
|
||||
|
||||
for i := 0 to Length(RTValues) - 1 do
|
||||
begin
|
||||
RTValues[i] := copy(RTValues[i], 1, Length(RTValues[i]) - 1);
|
||||
end;
|
||||
|
||||
Result := RTValues;
|
||||
end;
|
||||
|
||||
function GetMergedResultsAsString(ClientDataSet: TClientDataSet): string;
|
||||
var
|
||||
ProductNameTotalsDict: TProductNameTotalsDict;
|
||||
ProductName: string;
|
||||
PieceCount: Integer;
|
||||
Quantity: Double;
|
||||
ProductNameList: TStringList;
|
||||
ProductTotals: TProductTotals;
|
||||
I: Integer;
|
||||
begin
|
||||
ProductNameTotalsDict := TProductNameTotalsDict.Create;
|
||||
try
|
||||
ClientDataSet.IndexName := ''; // 清空索引
|
||||
ClientDataSet.First;
|
||||
|
||||
while not ClientDataSet.Eof do
|
||||
begin
|
||||
ProductName := ClientDataSet.FieldByName('Grade').AsString;
|
||||
PieceCount := ClientDataSet.FieldByName('Piece').AsInteger;
|
||||
Quantity := ClientDataSet.FieldByName('Qty').AsFloat;
|
||||
|
||||
if not ProductNameTotalsDict.ContainsKey(ProductName) then
|
||||
begin
|
||||
ProductTotals := TProductTotals.Create;
|
||||
ProductTotals.PieceCount := PieceCount;
|
||||
ProductTotals.Quantity := Quantity;
|
||||
ProductNameTotalsDict.Add(ProductName, ProductTotals);
|
||||
end
|
||||
else
|
||||
begin
|
||||
ProductTotals := ProductNameTotalsDict[ProductName];
|
||||
ProductTotals.PieceCount := ProductTotals.PieceCount + PieceCount;
|
||||
ProductTotals.Quantity := ProductTotals.Quantity + Quantity;
|
||||
end;
|
||||
|
||||
ClientDataSet.Next;
|
||||
end;
|
||||
|
||||
ProductNameList := TStringList.Create;
|
||||
try
|
||||
for ProductName in ProductNameTotalsDict.Keys do
|
||||
begin
|
||||
ProductTotals := ProductNameTotalsDict[ProductName];
|
||||
ProductNameList.Add(Format('%s: 支数=%d, 数量=%.2f', [ProductName, ProductTotals.PieceCount, ProductTotals.Quantity]));
|
||||
end;
|
||||
|
||||
ProductNameList.Sort;
|
||||
Result := StringReplace(ProductNameList.Text, #13#10, '; ', [rfReplaceAll]);
|
||||
finally
|
||||
ProductNameList.Free;
|
||||
|
||||
// 清理字典中的对象,避免内存泄漏
|
||||
for ProductTotals in ProductNameTotalsDict.Values do
|
||||
begin
|
||||
ProductTotals.Free;
|
||||
end;
|
||||
ProductNameTotalsDict.Clear;
|
||||
end;
|
||||
finally
|
||||
ProductNameTotalsDict.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
180
A00通用方法/U_PrintLabFun.pas
Normal file
180
A00通用方法/U_PrintLabFun.pas
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
unit U_PrintLabFun;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
ADODB, System.SysUtils, Vcl.Forms;
|
||||
|
||||
procedure PrintServerLabel(ADO_Prt: TADOQuery; mSheets, mprintFlag, mprinter: Integer; FFiltration1: string);
|
||||
|
||||
procedure PrintServerLabel1(ADO_Prt: TADOQuery; mSheets, mprintFlag, mprinter: Integer; FFiltration1, MLabVolume: string);
|
||||
|
||||
procedure PrintServerLabelStkId(ADO_Prt: TADOQuery; mSheets, mprintFlag, mprinter: Integer; FFiltration1: string);
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_printPdf, U_RTFun, U_DataLink;
|
||||
|
||||
procedure PrintServerLabel1(ADO_Prt: TADOQuery; mSheets, mprintFlag, mprinter: Integer; FFiltration1, MLabVolume: string);
|
||||
var
|
||||
MaxBLCLID, LBName: string;
|
||||
WBoolean: Boolean;
|
||||
i: Integer;
|
||||
Mmessage, MpdfFileId, Mcode: string;
|
||||
begin
|
||||
|
||||
with ADO_Prt do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' exec P_BS_Cloth_Prt2 ');
|
||||
SQL.Add(' @Filtration=''' + Trim(FFiltration1) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADO_Prt.IsEmpty then
|
||||
begin
|
||||
raise Exception.Create('标签内容未找到!');
|
||||
end;
|
||||
|
||||
if Trim(MLabVolume) <> '' then
|
||||
LBName := Trim(MLabVolume)
|
||||
else
|
||||
LBName := Trim(ADO_Prt.fieldbyname('LabVolume').AsString);
|
||||
try
|
||||
if GetLSNo(ADO_Prt, MaxBLCLID, 'L', 'Bs_Report_Cloud_Log', 4, 1) = False then
|
||||
begin
|
||||
|
||||
end;
|
||||
with ADO_Prt do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from Bs_Report_Cloud_Log where 1=2');
|
||||
Open;
|
||||
end;
|
||||
with ADO_Prt do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('BLCLID').Value := MaxBLCLID;
|
||||
FieldByName('Filler').Value := dname;
|
||||
FieldByName('LMName').Value := LBName;
|
||||
FieldByName('LMSql1').Value := 'P_BS_Cloth_Prt2';
|
||||
FieldByName('Filtration1').Value := Trim(FFiltration1);
|
||||
FieldByName('IsSql1').Value := 0;
|
||||
FieldByName('Sheets').Value := mSheets;
|
||||
Post;
|
||||
end;
|
||||
printPdf(Application, 1, PChar('title'), PChar(dcode), PChar(dname), PChar(MaxBLCLID), mSheets, mprintFlag, mprinter, PChar(DConString));
|
||||
except
|
||||
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure PrintServerLabel(ADO_Prt: TADOQuery; mSheets, mprintFlag, mprinter: Integer; FFiltration1: string);
|
||||
var
|
||||
MaxBLCLID, LBName: string;
|
||||
WBoolean: Boolean;
|
||||
i: Integer;
|
||||
Mmessage, MpdfFileId, Mcode: string;
|
||||
begin
|
||||
|
||||
with ADO_Prt do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' EXEC P_Trade_Card_Prt1 ');
|
||||
SQL.Add(' @Filtration=''' + Trim(FFiltration1) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADO_Prt.IsEmpty then
|
||||
begin
|
||||
raise Exception.Create('标签内容未找到!');
|
||||
end;
|
||||
LBName := Trim(ADO_Prt.fieldbyname('LabVolume').AsString);
|
||||
try
|
||||
if GetLSNo(ADO_Prt, MaxBLCLID, 'L', 'Bs_Report_Cloud_Log', 4, 1) = False then
|
||||
begin
|
||||
|
||||
end;
|
||||
with ADO_Prt do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from Bs_Report_Cloud_Log where 1=2');
|
||||
Open;
|
||||
end;
|
||||
with ADO_Prt do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('BLCLID').Value := MaxBLCLID;
|
||||
FieldByName('Filler').Value := dname;
|
||||
FieldByName('LMName').Value := LBName;
|
||||
FieldByName('LMSql1').Value := 'P_Trade_Card_Prt1';
|
||||
FieldByName('Filtration1').Value := Trim(FFiltration1);
|
||||
FieldByName('IsSql1').Value := 0;
|
||||
FieldByName('Sheets').Value := mSheets;
|
||||
Post;
|
||||
end;
|
||||
printPdf(Application, 1, PChar('title'), PChar(dcode), PChar(dname), PChar(MaxBLCLID), mSheets, mprintFlag, mprinter, PChar(DConString));
|
||||
except
|
||||
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure PrintServerLabelStkId(ADO_Prt: TADOQuery; mSheets, mprintFlag, mprinter: Integer; FFiltration1: string);
|
||||
var
|
||||
MaxBLCLID, LBName: string;
|
||||
WBoolean: Boolean;
|
||||
i: Integer;
|
||||
Mmessage, MpdfFileId, Mcode: string;
|
||||
begin
|
||||
|
||||
with ADO_Prt do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' EXEC P_Trade_Cloth_Prt_Lab ');
|
||||
SQL.Add(' @Filtration=''' + Trim(FFiltration1) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADO_Prt.IsEmpty then
|
||||
begin
|
||||
raise Exception.Create('标签内容未找到!');
|
||||
end;
|
||||
LBName := Trim(ADO_Prt.fieldbyname('LabVolume').AsString);
|
||||
try
|
||||
if GetLSNo(ADO_Prt, MaxBLCLID, 'L', 'Bs_Report_Cloud_Log', 4, 1) = False then
|
||||
begin
|
||||
|
||||
end;
|
||||
with ADO_Prt do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from Bs_Report_Cloud_Log where 1=2');
|
||||
Open;
|
||||
end;
|
||||
with ADO_Prt do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('BLCLID').Value := MaxBLCLID;
|
||||
FieldByName('Filler').Value := dname;
|
||||
FieldByName('LMName').Value := LBName;
|
||||
FieldByName('LMSql1').Value := 'P_Trade_Cloth_Prt_Lab';
|
||||
FieldByName('Filtration1').Value := Trim(FFiltration1);
|
||||
FieldByName('IsSql1').Value := 0;
|
||||
FieldByName('Sheets').Value := mSheets;
|
||||
Post;
|
||||
end;
|
||||
printPdf(Application, 1, PChar('title'), PChar(dcode), PChar(dname), PChar(MaxBLCLID), mSheets, mprintFlag, mprinter, PChar(DConString));
|
||||
except
|
||||
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
61
A00通用方法/U_ProgressUpdate.pas
Normal file
61
A00通用方法/U_ProgressUpdate.pas
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
unit U_ProgressUpdate;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
System.SysUtils, ADODB;
|
||||
|
||||
function TradeMarketProgressUpdate(AdoCmd: TADOQuery; MTMSIdS: string): Boolean;
|
||||
|
||||
function TradeMarketProgressUpdateByTMMID(AdoCmd: TADOQuery; MTMMID: string): Boolean;
|
||||
|
||||
implementation
|
||||
|
||||
function TradeMarketProgressUpdate(AdoCmd: TADOQuery; MTMSIdS: string): Boolean;
|
||||
begin
|
||||
with AdoCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Trade_Market_UpOut');
|
||||
sql.Add('@TMSIdS=' + quotedstr(Trim(MTMSIdS)));
|
||||
Open;
|
||||
end;
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
function TradeMarketProgressUpdateByTMMID(AdoCmd: TADOQuery; MTMMID: string): Boolean;
|
||||
var
|
||||
MTMSIdS: string;
|
||||
begin
|
||||
with AdoCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select distinct TMSId from Trade_Market_sub A ');
|
||||
sql.Add('where EXISTS(select X.RTValue from [dbo].[F_Tool_SplitString](' + quotedstr(Trim(MTMMID)) + ','','') X where X.RTValue=A.TMSId ) ');
|
||||
Open;
|
||||
while not Eof do
|
||||
begin
|
||||
if Trim(MTMSIdS) = '' then
|
||||
MTMSIdS := FieldByName('TMSId').AsString
|
||||
else
|
||||
MTMSIdS := MTMSIdS + ',' + FieldByName('TMSId').AsString;
|
||||
end;
|
||||
end;
|
||||
|
||||
with AdoCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Trade_Market_UpOut');
|
||||
sql.Add('@TMSIdS=' + quotedstr(Trim(MTMSIdS)));
|
||||
Open;
|
||||
end;
|
||||
|
||||
Result := True;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
186
A00通用窗体/U_AttachmentUpload.dfm
Normal file
186
A00通用窗体/U_AttachmentUpload.dfm
Normal file
|
|
@ -0,0 +1,186 @@
|
|||
inherited frmAttachmentUpload: TfrmAttachmentUpload
|
||||
Left = 192
|
||||
Top = 134
|
||||
BorderIcons = [biSystemMenu, biMinimize]
|
||||
Caption = #38468#20214#20449#24687
|
||||
ClientHeight = 463
|
||||
ClientWidth = 851
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Height = -13
|
||||
Font.Name = #23435#20307
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
ExplicitWidth = 867
|
||||
ExplicitHeight = 502
|
||||
PixelsPerInch = 107
|
||||
TextHeight = 13
|
||||
object ListView1: TListView [0]
|
||||
Left = 43
|
||||
Top = 22
|
||||
Width = 465
|
||||
Height = 83
|
||||
Columns = <>
|
||||
TabOrder = 0
|
||||
OnDblClick = ListView1DblClick
|
||||
end
|
||||
object Panel1: TPanel [1]
|
||||
Left = 687
|
||||
Top = 0
|
||||
Width = 164
|
||||
Height = 463
|
||||
Align = alRight
|
||||
TabOrder = 1
|
||||
object FileName: TcxButton
|
||||
Left = 33
|
||||
Top = 63
|
||||
Width = 81
|
||||
Height = 27
|
||||
Hint = 'Filesother'
|
||||
Caption = #28155#21152
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
TabOrder = 0
|
||||
OnClick = FileNameClick
|
||||
end
|
||||
object cxButton1: TcxButton
|
||||
Left = 33
|
||||
Top = 104
|
||||
Width = 81
|
||||
Height = 27
|
||||
Hint = 'Filesother'
|
||||
Caption = #21024#38500
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
TabOrder = 1
|
||||
OnClick = cxButton1Click
|
||||
end
|
||||
object cxButton2: TcxButton
|
||||
Left = 33
|
||||
Top = 143
|
||||
Width = 81
|
||||
Height = 27
|
||||
Hint = 'Filesother'
|
||||
Caption = #19979#36733
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
TabOrder = 2
|
||||
OnClick = cxButton2Click
|
||||
end
|
||||
object cxButton3: TcxButton
|
||||
Left = 33
|
||||
Top = 186
|
||||
Width = 81
|
||||
Height = 27
|
||||
Hint = 'Filesother'
|
||||
Caption = #20851#38381
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
OnClick = cxButton3Click
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel [2]
|
||||
Left = 191
|
||||
Top = 152
|
||||
Width = 209
|
||||
Height = 44
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel2'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -13
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
OnDblClick = Panel2DblClick
|
||||
end
|
||||
object cxGrid1: TcxGrid [3]
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 687
|
||||
Height = 463
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #25991#20214#21517#31216
|
||||
DataBinding.FieldName = 'FileName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 233
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #25991#20214#20462#25913#26102#38388
|
||||
DataBinding.FieldName = 'TFdate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 140
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #25805#20316#21592
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 83
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #19978#20256#26102#38388
|
||||
DataBinding.FieldName = 'FillTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 140
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Left = 113
|
||||
Top = 64
|
||||
end
|
||||
object ADOQueryTmp: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
Parameters = <>
|
||||
Left = 323
|
||||
Top = 149
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
Parameters = <>
|
||||
Left = 624
|
||||
Top = 96
|
||||
end
|
||||
object ImageList1: TImageList
|
||||
Left = 536
|
||||
Top = 228
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
ConnectTimeout = 0
|
||||
NATKeepAlive.UseKeepAlive = False
|
||||
NATKeepAlive.IdleTimeMS = 0
|
||||
NATKeepAlive.IntervalMS = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
ReadTimeout = 0
|
||||
Left = 492
|
||||
Top = 198
|
||||
end
|
||||
object ADOConnection1: TADOConnection
|
||||
LoginPrompt = False
|
||||
Left = 380
|
||||
Top = 272
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ADOQueryTmp
|
||||
Left = 548
|
||||
Top = 140
|
||||
end
|
||||
end
|
||||
380
A00通用窗体/U_AttachmentUpload.pas
Normal file
380
A00通用窗体/U_AttachmentUpload.pas
Normal file
|
|
@ -0,0 +1,380 @@
|
|||
unit U_AttachmentUpload;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ExtCtrls, ComCtrls, Menus, cxLookAndFeelPainters, StdCtrls, cxButtons,
|
||||
DB, ADODB, ImgList, shellapi, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, cxDBData, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxGridLevel, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGrid, cxLookAndFeels, dxSkinsCore, dxSkinsDefaultPainters, cxNavigator,
|
||||
dxDateRanges, IdExplicitTLSClientServerBase, System.ImageList, U_BaseHelp;
|
||||
|
||||
type
|
||||
TfrmAttachmentUpload = class(TfrmBaseHelp)
|
||||
ListView1: TListView;
|
||||
Panel1: TPanel;
|
||||
FileName: TcxButton;
|
||||
cxButton1: TcxButton;
|
||||
cxButton2: TcxButton;
|
||||
cxButton3: TcxButton;
|
||||
ADOQueryTmp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ImageList1: TImageList;
|
||||
Panel2: TPanel;
|
||||
IdFTP1: TIdFTP;
|
||||
ADOConnection1: TADOConnection;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
DataSource1: TDataSource;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
procedure cxButton3Click(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FileNameClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ListView1DblClick(Sender: TObject);
|
||||
procedure cxButton1Click(Sender: TObject);
|
||||
procedure cxButton2Click(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure Panel2DblClick(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
private
|
||||
procedure InitData();
|
||||
{ Private declarations }
|
||||
public
|
||||
fkeyNO: string;
|
||||
fType: string;
|
||||
fId: integer;
|
||||
FEditAuthority: Boolean;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmAttachmentUpload: TfrmAttachmentUpload;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_CompressionFun;
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmAttachmentUpload.InitData();
|
||||
var
|
||||
ListItem: TListItem;
|
||||
Flag: Cardinal;
|
||||
info: SHFILEINFOA;
|
||||
Icon: TIcon;
|
||||
begin
|
||||
ListView1.Items.Clear;
|
||||
try
|
||||
|
||||
with adoqueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FJ_File ');
|
||||
sql.Add('where WBID=' + quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType=' + quotedstr(trim(fType)));
|
||||
open;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmAttachmentUpload.cxButton3Click(Sender: TObject);
|
||||
begin
|
||||
ADOQueryTmp.Close;
|
||||
ADOQuerycmd.Close;
|
||||
ListView1.Items.Free;
|
||||
ModalResult := -1;
|
||||
end;
|
||||
|
||||
procedure TfrmAttachmentUpload.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmAttachmentUpload := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmAttachmentUpload.FileNameClick(Sender: TObject);
|
||||
var
|
||||
OpenDiaLog: TOpenDialog;
|
||||
fFileName: string;
|
||||
fFilePath: string;
|
||||
maxNo: string;
|
||||
FJStream: TMemoryStream;
|
||||
mfileSize: integer;
|
||||
mCreationTime: TdateTime;
|
||||
mWriteTime: TdateTime;
|
||||
begin
|
||||
|
||||
try
|
||||
adoqueryCmd.Connection.BeginTrans;
|
||||
OpenDiaLog := TOpenDialog.Create(Self);
|
||||
if OpenDiaLog.Execute then
|
||||
begin
|
||||
fFilePath := OpenDiaLog.FileName;
|
||||
fFileName := ExtractFileName(OpenDiaLog.FileName);
|
||||
Panel2.Caption := '正在上传数据,请稍等...';
|
||||
Panel2.Visible := true;
|
||||
application.ProcessMessages;
|
||||
|
||||
if GetLSNo(ADOQueryCmd, maxNo, 'FJ', 'FJ_File', 4, 1) = False then
|
||||
begin
|
||||
adoqueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
//获取文件信息
|
||||
GetFileInfo(fFilePath, mfileSize, mCreationTime, mWriteTime);
|
||||
with adoqueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from FJ_File ');
|
||||
sql.Add('where TFID=' + quotedstr(trim(maxNo)));
|
||||
execsql;
|
||||
end;
|
||||
try
|
||||
FJStream := TMemoryStream.Create;
|
||||
with adoqueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FJ_File ');
|
||||
sql.Add('where TFID=' + quotedstr(trim(maxNo)));
|
||||
open;
|
||||
append;
|
||||
fieldbyname('TFID').Value := trim(maxNo);
|
||||
fieldbyname('WBID').Value := trim(fkeyNO);
|
||||
fieldbyname('TFType').Value := trim(fType);
|
||||
fieldbyname('Filler').Value := trim(DName);
|
||||
fieldbyname('FileName').Value := trim(fFileName);
|
||||
fieldbyname('TFDate').Value := mWriteTime;
|
||||
FJStream.LoadFromFile(fFilePath);
|
||||
CompressionStream(FJStream);
|
||||
tblobfield(FieldByName('Filesother')).LoadFromStream(FJStream);
|
||||
post;
|
||||
end;
|
||||
Panel2.Visible := false;
|
||||
initdata();
|
||||
finally
|
||||
FJStream.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
adoqueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
adoqueryCmd.Connection.RollbackTrans;
|
||||
application.MessageBox('附件保存失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmAttachmentUpload.FormCreate(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
application.MessageBox('网络连接失败!', '提示信息');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmAttachmentUpload.FormShow(Sender: TObject);
|
||||
begin
|
||||
// if FEditAuthority then
|
||||
// Panel1.Visible := true
|
||||
// else
|
||||
// Panel1.Visible := false;
|
||||
initdata();
|
||||
end;
|
||||
|
||||
procedure TfrmAttachmentUpload.ListView1DblClick(Sender: TObject);
|
||||
var
|
||||
sFieldName: string;
|
||||
fileName: string;
|
||||
begin
|
||||
if ListView1.Items.Count < 1 then
|
||||
EXIT;
|
||||
|
||||
if listView1.SelCount < 1 then
|
||||
exit;
|
||||
sFieldName := 'D:\附件查看';
|
||||
|
||||
if not DirectoryExists(pchar(sFieldName)) then
|
||||
CreateDirectory(pchar(sFieldName), nil);
|
||||
|
||||
fileName := ListView1.Selected.Caption;
|
||||
|
||||
sFieldName := sFieldName + '\' + trim(fileName);
|
||||
|
||||
try
|
||||
IdFTP1.Host := PicSvr;
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
;
|
||||
end;
|
||||
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
|
||||
Panel2.Caption := '正在下载数据,请稍等...';
|
||||
Panel2.Visible := true;
|
||||
application.ProcessMessages;
|
||||
try
|
||||
IdFTP1.Get('FJ\' + Trim(fileName), sFieldName, false, true);
|
||||
except
|
||||
Panel2.Visible := false;
|
||||
Application.MessageBox('附件文件不存在', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Panel2.Visible := false;
|
||||
Application.MessageBox('无法连接文件服务器', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
Panel2.Visible := false;
|
||||
if IdFTP1.Connected then
|
||||
IdFTP1.Quit;
|
||||
ShellExecute(Handle, 'open', PChar(sFieldName), '', '', SW_SHOWNORMAL);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmAttachmentUpload.cxButton1Click(Sender: TObject);
|
||||
var
|
||||
fFileName: string;
|
||||
fFilePath: string;
|
||||
begin
|
||||
|
||||
if ADOQueryTmp.IsEmpty then
|
||||
exit;
|
||||
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from FJ_File ');
|
||||
sql.Add('where TFID=' + quotedstr(trim(ADOQueryTmp.fieldbyname('TFID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
initData();
|
||||
except
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmAttachmentUpload.cxButton2Click(Sender: TObject);
|
||||
var
|
||||
SaveDialog: TSaveDialog;
|
||||
fFileName: string;
|
||||
fFilePath: string;
|
||||
ff: TADOBlobStream;
|
||||
FJStream: TMemoryStream;
|
||||
begin
|
||||
if adoqueryTmp.IsEmpty then
|
||||
exit;
|
||||
|
||||
try
|
||||
|
||||
fFileName := adoqueryTmp.fieldbyname('FileName').AsString;
|
||||
|
||||
SaveDialog := TSaveDialog.Create(Self);
|
||||
|
||||
SaveDialog.FileName := fFileName;
|
||||
if SaveDialog.Execute then
|
||||
begin
|
||||
Panel2.Caption := '正在保存数据,请稍等...';
|
||||
Panel2.Visible := true;
|
||||
application.ProcessMessages;
|
||||
fFilePath := SaveDialog.FileName;
|
||||
|
||||
try
|
||||
ff := TADOBlobstream.Create(adoqueryTmp.fieldByName('FilesOther') as TblobField, bmRead);
|
||||
|
||||
FJStream := TMemoryStream.Create;
|
||||
ff.SaveToStream(FJStream);
|
||||
UnCompressionStream(FJStream);
|
||||
FJStream.SaveToFile(fFilePath);
|
||||
// ShellExecute(Handle, 'open',PChar(sFieldName),'', '', SW_SHOWNORMAL);
|
||||
finally
|
||||
FJStream.free;
|
||||
ff.Free;
|
||||
end;
|
||||
|
||||
Panel2.Visible := false;
|
||||
// if IdFTP1.Connected then IdFTP1.Quit;
|
||||
end;
|
||||
except
|
||||
Panel2.Visible := false;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmAttachmentUpload.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
if fId = 10 then
|
||||
Action := cafree
|
||||
else
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmAttachmentUpload.Panel2DblClick(Sender: TObject);
|
||||
begin
|
||||
Panel2.Visible := false;
|
||||
end;
|
||||
|
||||
procedure TfrmAttachmentUpload.Tv1DblClick(Sender: TObject);
|
||||
var
|
||||
sFieldName: string;
|
||||
fileName: string;
|
||||
ff: TADOBlobStream;
|
||||
FJStream: TMemoryStream;
|
||||
begin
|
||||
|
||||
if adoqueryTmp.IsEmpty then
|
||||
exit;
|
||||
|
||||
sFieldName := 'D:\附件查看';
|
||||
|
||||
if not DirectoryExists(pchar(sFieldName)) then
|
||||
CreateDirectory(pchar(sFieldName), nil);
|
||||
|
||||
fileName := adoqueryTmp.fieldbyname('FileName').AsString;
|
||||
|
||||
sFieldName := sFieldName + '\' + trim(fileName);
|
||||
|
||||
try
|
||||
ff := TADOBlobstream.Create(adoqueryTmp.fieldByName('FilesOther') as TblobField, bmRead);
|
||||
|
||||
FJStream := TMemoryStream.Create;
|
||||
ff.SaveToStream(FJStream);
|
||||
UnCompressionStream(FJStream);
|
||||
FJStream.SaveToFile(sFieldName);
|
||||
ShellExecute(Handle, 'open', PChar(sFieldName), '', '', SW_SHOWNORMAL);
|
||||
finally
|
||||
FJStream.free;
|
||||
ff.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
4615
A00通用窗体/U_BankSel.dfm
Normal file
4615
A00通用窗体/U_BankSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
181
A00通用窗体/U_BankSel.pas
Normal file
181
A00通用窗体/U_BankSel.pas
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
unit U_BankSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseHelp, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
||||
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxNavigator,
|
||||
dxDateRanges, dxBarBuiltInMenu, System.ImageList, U_BaseInput, cxButtonEdit,
|
||||
cxDropDownEdit;
|
||||
|
||||
type
|
||||
TfrmBankSel = class(TfrmBaseHelp)
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
ADOConnection1: TADOConnection;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
BankName: TEdit;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
ImageList1: TImageList;
|
||||
ThreeColorBase: TcxStyleRepository;
|
||||
SHuangSe: TcxStyle;
|
||||
SkyBlue: TcxStyle;
|
||||
Default: TcxStyle;
|
||||
QHuangSe: TcxStyle;
|
||||
Red: TcxStyle;
|
||||
FontBlue: TcxStyle;
|
||||
TextSHuangSe: TcxStyle;
|
||||
FonePurple: TcxStyle;
|
||||
FoneClMaroon: TcxStyle;
|
||||
FoneRed: TcxStyle;
|
||||
RowColor: TcxStyle;
|
||||
handBlack: TcxStyle;
|
||||
cxBlue: TcxStyle;
|
||||
SHuangSeCu: TcxStyle;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure TV1DblClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure BankNameChange(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
FCoType, FAuthority: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBankSel: TfrmBankSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBankSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
application.MessageBox('网络连接失败!', '提示信息');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBankSel.BankNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmBankSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
BankName.SetFocus;
|
||||
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmBankSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
|
||||
sql.Add(' select * from BS_Bank order by SerialNo ');
|
||||
|
||||
Open;
|
||||
end;
|
||||
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBankSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
InitGrid();
|
||||
|
||||
ReadCxGrid('单位名称' + Trim(FCoType), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmBankSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBankSel.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('单位名称' + Trim(FCoType), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmBankSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
BankName.SetFocus;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmBankSel.TV1DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmBankSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmBankSel := nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
5104
A00通用窗体/U_ClothInfoSel.dfm
Normal file
5104
A00通用窗体/U_ClothInfoSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
558
A00通用窗体/U_ClothInfoSel.pas
Normal file
558
A00通用窗体/U_ClothInfoSel.pas
Normal file
|
|
@ -0,0 +1,558 @@
|
|||
unit U_ClothInfoSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseHelp, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
||||
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxNavigator,
|
||||
dxDateRanges, dxBarBuiltInMenu, System.ImageList, U_BaseInput, cxTL,
|
||||
cxMaskEdit, cxTLdxBarBuiltInMenu, cxCheckBox, cxInplaceContainer, cxDBTL,
|
||||
cxTLData, math, cxMemo, dxSkinOffice2013White, dxSkinWXI,
|
||||
dxScrollbarAnnotations;
|
||||
|
||||
type
|
||||
TfrmClothInfoSel = class(TfrmBaseHelp)
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
ADOConnection1: TADOConnection;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
ImageList1: TImageList;
|
||||
cxDBTreeList1: TcxDBTreeList;
|
||||
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||
DS_Tree: TDataSource;
|
||||
CDS_Tree: TClientDataSet;
|
||||
ADOQueryTree: TADOQuery;
|
||||
Panel3: TPanel;
|
||||
Panel7: TPanel;
|
||||
Panel4: TPanel;
|
||||
Label14: TLabel;
|
||||
LBCPAP1: TLabel;
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
TCBNOR1: TComboBox;
|
||||
Panel1: TPanel;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
Label9: TLabel;
|
||||
Label8: TLabel;
|
||||
C_Code: TEdit;
|
||||
C_Name: TEdit;
|
||||
C_GramWeight: TEdit;
|
||||
C_Width: TEdit;
|
||||
ThreeColorBase: TcxStyleRepository;
|
||||
SHuangSe: TcxStyle;
|
||||
SkyBlue: TcxStyle;
|
||||
Default: TcxStyle;
|
||||
QHuangSe: TcxStyle;
|
||||
Red: TcxStyle;
|
||||
FontBlue: TcxStyle;
|
||||
TextSHuangSe: TcxStyle;
|
||||
FonePurple: TcxStyle;
|
||||
FoneClMaroon: TcxStyle;
|
||||
FoneRed: TcxStyle;
|
||||
RowColor: TcxStyle;
|
||||
handBlack: TcxStyle;
|
||||
cxBlue: TcxStyle;
|
||||
SHuangSeCu: TcxStyle;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1SSel: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
v1CYNo: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
Tv1Column11: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column8: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
Label1: TLabel;
|
||||
C_StyleNo: TEdit;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
Tv1Column9: TcxGridDBColumn;
|
||||
Tv1Column10: TcxGridDBColumn;
|
||||
Tv1Column12: TcxGridDBColumn;
|
||||
Tv1Column13: TcxGridDBColumn;
|
||||
Tv1Column14: TcxGridDBColumn;
|
||||
Tv1Column15: TcxGridDBColumn;
|
||||
Tv1Column16: TcxGridDBColumn;
|
||||
Tv1Column17: TcxGridDBColumn;
|
||||
Tv1Column18: TcxGridDBColumn;
|
||||
Tv1Column19: TcxGridDBColumn;
|
||||
Tv1Column20: TcxGridDBColumn;
|
||||
Tv1Column21: TcxGridDBColumn;
|
||||
Tv1Column22: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
C_Accessories: TEdit;
|
||||
C_mlName: TEdit;
|
||||
Label5: TLabel;
|
||||
Tv1Column23: TcxGridDBColumn;
|
||||
Tv1Column24: TcxGridDBColumn;
|
||||
Label6: TLabel;
|
||||
C_FLStyleNo: TEdit;
|
||||
Label7: TLabel;
|
||||
C_FLBarcodes: TEdit;
|
||||
Tv1Column25: TcxGridDBColumn;
|
||||
Label10: TLabel;
|
||||
C_Barcodes: TEdit;
|
||||
Tv1Column26: TcxGridDBColumn;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure TV1DblClick(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure TCBNOR1Change(Sender: TObject);
|
||||
procedure C_NameChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure cxDBTreeList1DblClick(Sender: TObject);
|
||||
private
|
||||
CurrentPage, RecordsNumber: Integer;
|
||||
procedure InitGrid();
|
||||
procedure InitTree();
|
||||
{ Private declarations }
|
||||
public
|
||||
FFL, FCG: string;
|
||||
FCTType: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmClothInfoSel: TfrmClothInfoSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmClothInfoSel.InitTree();
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from SY_User where UserName=' + quotedstr(Trim(DName)));
|
||||
Open;
|
||||
end;
|
||||
|
||||
with ADOQueryTree do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from BS_Cloth_Type ');
|
||||
if Trim(FCTType) = '全部' then
|
||||
begin
|
||||
SQL.Add('where 1=1');
|
||||
end
|
||||
else if FCTType = '坯布' then
|
||||
begin
|
||||
SQL.Add(' where CTType in (''梭织'',''针织'') ');
|
||||
end
|
||||
else
|
||||
begin
|
||||
SQL.Add(' where CTType=' + quotedstr(FCTType));
|
||||
end;
|
||||
if (ADOQueryTemp.fieldbyname('Udept').AsString = '业务部') then
|
||||
begin
|
||||
SQL.Add('and (CTParent<>''CT2401040009'' and CTID<>''CT2401040009'')');
|
||||
end;
|
||||
if FCG = '采购' then
|
||||
begin
|
||||
SQL.Add('and (CTParent=''CT2401040008'' or CTID=''CT2401040008'' or CTParent=''CT2401040009'' or CTID=''CT2401040009'' )');
|
||||
end;
|
||||
|
||||
if FFL = '辅料' then
|
||||
begin
|
||||
SQL.Add('and (CTParent=''CT2401040008'' or CTID=''CT2401040008'' )');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
|
||||
SCreateCDS(ADOQueryTree, CDS_Tree);
|
||||
SInitCDSData(ADOQueryTree, CDS_Tree);
|
||||
cxDBTreeList1.Items[0].Expand(false);
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
{if Application.MessageBox('网络连接失败,是否要再次连接?','提示',32+4)=IDYES then
|
||||
begin
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected:=false;
|
||||
ConnectionString:=DConString;
|
||||
//ConnectionString:='23242';
|
||||
Connected:=true;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end; }
|
||||
//frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoSel.Button1Click(Sender: TObject);
|
||||
begin
|
||||
if CurrentPage > 1 then
|
||||
CurrentPage := CurrentPage - 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoSel.Button2Click(Sender: TObject);
|
||||
begin
|
||||
if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then
|
||||
CurrentPage := CurrentPage + 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoSel.cxDBTreeList1DblClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoSel.C_NameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
C_Code.SetFocus;
|
||||
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoSel.InitGrid();
|
||||
var
|
||||
fwhere, MBCIID, Pwhere: string;
|
||||
begin
|
||||
v1Column12.Visible := true;
|
||||
v1CYNo.Visible := true;
|
||||
v1Column9.Visible := true;
|
||||
Tv1Column11.Visible := true;
|
||||
v1Column3.Visible := true;
|
||||
v1Column1.Visible := true;
|
||||
Tv1Column3.Visible := true;
|
||||
Tv1Column8.Visible := true;
|
||||
Tv1Column2.Visible := true;
|
||||
Tv1Column1.Visible := true;
|
||||
Tv1Column4.Visible := true;
|
||||
Tv1Column5.Visible := true;
|
||||
Tv1Column6.Visible := true;
|
||||
Tv1Column7.Visible := true;
|
||||
Tv1Column20.Visible := true;
|
||||
Tv1Column21.Visible := true;
|
||||
Tv1Column22.Visible := true;
|
||||
Tv1Column13.Caption := '供应商';
|
||||
Tv1Column14.Caption := '单价';
|
||||
Tv1Column25.Visible := true;
|
||||
|
||||
Label2.Visible := false;
|
||||
C_Accessories.Visible := false;
|
||||
|
||||
Label6.Visible := false;
|
||||
C_FLStyleNo.Visible := false;
|
||||
Label7.Visible := false;
|
||||
C_FLBarcodes.Visible := false;
|
||||
|
||||
Label5.Visible := false;
|
||||
C_mlName.Visible := false;
|
||||
|
||||
Tv1Column9.Visible := false;
|
||||
Tv1Column10.Visible := false;
|
||||
Tv1Column12.Visible := false;
|
||||
|
||||
Tv1Column19.Visible := false;
|
||||
Tv1Column15.Visible := false;
|
||||
Tv1Column16.Visible := false;
|
||||
Tv1Column17.Visible := false;
|
||||
Tv1Column18.Visible := false;
|
||||
Tv1Column23.Visible := false;
|
||||
Tv1Column24.Visible := false;
|
||||
|
||||
if FFL = '辅料' then
|
||||
begin
|
||||
v1Column9.Visible := false;
|
||||
Tv1Column11.Visible := false;
|
||||
v1Column3.Visible := false;
|
||||
v1Column1.Visible := false;
|
||||
Tv1Column3.Visible := false;
|
||||
Tv1Column8.Visible := false;
|
||||
Tv1Column2.Visible := false;
|
||||
Tv1Column1.Visible := false;
|
||||
Tv1Column4.Visible := false;
|
||||
Tv1Column5.Visible := false;
|
||||
Tv1Column6.Visible := false;
|
||||
Tv1Column7.Visible := false;
|
||||
Tv1Column20.Visible := false;
|
||||
Tv1Column21.Visible := false;
|
||||
Tv1Column22.Visible := false;
|
||||
Tv1Column25.Visible := false;
|
||||
|
||||
Tv1Column19.Visible := false;
|
||||
Tv1Column15.Visible := false;
|
||||
Tv1Column16.Visible := false;
|
||||
Tv1Column17.Visible := false;
|
||||
Tv1Column18.Visible := false;
|
||||
|
||||
Label5.Visible := false;
|
||||
C_mlName.Visible := false;
|
||||
|
||||
Tv1Column9.Visible := true;
|
||||
Tv1Column10.Visible := true;
|
||||
Tv1Column12.Visible := true;
|
||||
Tv1Column23.Visible := true;
|
||||
Tv1Column24.Visible := true;
|
||||
// Tv1Column13.Visible := true;
|
||||
// Tv1Column14.Visible := true;
|
||||
Tv1Column13.Caption := '辅料供应商';
|
||||
Tv1Column14.Caption := '辅料单价';
|
||||
Label2.Visible := true;
|
||||
C_Accessories.Visible := true;
|
||||
|
||||
Label6.Visible := true;
|
||||
C_FLStyleNo.Visible := true;
|
||||
Label7.Visible := true;
|
||||
C_FLBarcodes.Visible := true;
|
||||
|
||||
end;
|
||||
|
||||
with ADOQueryTree do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from BS_Cloth_Type where CTID=' + quotedstr(Trim(CDS_Tree.fieldbyname('CTID').AsString)));
|
||||
// SQL.Add('order by CTName');
|
||||
Open;
|
||||
end;
|
||||
if (Trim(ADOQueryTree.fieldbyname('CTID').AsString) = 'CT2401040008') or (Trim(ADOQueryTree.fieldbyname('CTParent').AsString) = 'CT2401040008') then
|
||||
begin
|
||||
v1Column9.Visible := false;
|
||||
Tv1Column11.Visible := false;
|
||||
v1Column3.Visible := false;
|
||||
v1Column1.Visible := false;
|
||||
Tv1Column3.Visible := false;
|
||||
Tv1Column8.Visible := false;
|
||||
Tv1Column2.Visible := false;
|
||||
Tv1Column1.Visible := false;
|
||||
Tv1Column4.Visible := false;
|
||||
Tv1Column5.Visible := false;
|
||||
Tv1Column6.Visible := false;
|
||||
Tv1Column7.Visible := false;
|
||||
Tv1Column20.Visible := false;
|
||||
Tv1Column21.Visible := false;
|
||||
Tv1Column22.Visible := false;
|
||||
Tv1Column25.Visible := false;
|
||||
|
||||
Tv1Column19.Visible := false;
|
||||
Tv1Column15.Visible := false;
|
||||
Tv1Column16.Visible := false;
|
||||
Tv1Column17.Visible := false;
|
||||
Tv1Column18.Visible := false;
|
||||
|
||||
Label5.Visible := false;
|
||||
C_mlName.Visible := false;
|
||||
|
||||
Tv1Column9.Visible := true;
|
||||
Tv1Column10.Visible := true;
|
||||
Tv1Column12.Visible := true;
|
||||
Tv1Column23.Visible := true;
|
||||
Tv1Column24.Visible := true;
|
||||
// Tv1Column13.Visible := true;
|
||||
// Tv1Column14.Visible := true;
|
||||
Tv1Column13.Caption := '辅料供应商';
|
||||
Tv1Column14.Caption := '辅料单价';
|
||||
Label2.Visible := true;
|
||||
C_Accessories.Visible := true;
|
||||
Label6.Visible := true;
|
||||
C_FLStyleNo.Visible := true;
|
||||
Label7.Visible := true;
|
||||
C_FLBarcodes.Visible := true;
|
||||
end;
|
||||
|
||||
if (Trim(ADOQueryTree.fieldbyname('CTID').AsString) = 'CT2401040009') or (Trim(ADOQueryTree.fieldbyname('CTParent').AsString) = 'CT2401040009') then
|
||||
begin
|
||||
v1Column9.Visible := false;
|
||||
Tv1Column11.Visible := false;
|
||||
v1Column3.Visible := false;
|
||||
v1Column1.Visible := false;
|
||||
Tv1Column3.Visible := false;
|
||||
Tv1Column8.Visible := false;
|
||||
Tv1Column2.Visible := false;
|
||||
Tv1Column1.Visible := false;
|
||||
Tv1Column4.Visible := false;
|
||||
Tv1Column5.Visible := false;
|
||||
Tv1Column6.Visible := false;
|
||||
Tv1Column7.Visible := false;
|
||||
Tv1Column20.Visible := false;
|
||||
Tv1Column21.Visible := false;
|
||||
Tv1Column22.Visible := false;
|
||||
Tv1Column25.Visible := false;
|
||||
|
||||
Tv1Column19.Visible := true;
|
||||
Tv1Column15.Visible := true;
|
||||
Tv1Column16.Visible := true;
|
||||
Tv1Column17.Visible := true;
|
||||
Tv1Column18.Visible := true;
|
||||
Tv1Column13.Caption := '面料供应商';
|
||||
Tv1Column14.Caption := '面料单价';
|
||||
|
||||
Label5.Visible := true;
|
||||
C_mlName.Visible := true;
|
||||
|
||||
Tv1Column9.Visible := false;
|
||||
Tv1Column10.Visible := false;
|
||||
Tv1Column12.Visible := false;
|
||||
Label2.Visible := false;
|
||||
C_Accessories.Visible := false;
|
||||
Label6.Visible := false;
|
||||
C_FLStyleNo.Visible := false;
|
||||
Label7.Visible := false;
|
||||
C_FLBarcodes.Visible := false;
|
||||
Tv1Column23.Visible := false;
|
||||
Tv1Column24.Visible := false;
|
||||
// Tv1Column13.Visible := true;
|
||||
// Tv1Column14.Visible := true;
|
||||
// Tv1Column13.Caption := '辅料供应商';
|
||||
// Tv1Column14.Caption := '辅料单价';
|
||||
end;
|
||||
|
||||
if not CDS_1.IsEmpty then
|
||||
MBCIID := Trim(CDS_1.FieldByName('BCIID').AsString)
|
||||
else
|
||||
MBCIID := '';
|
||||
|
||||
Pwhere := SGetFilters(Panel1, 1, 2);
|
||||
|
||||
if trim(Pwhere) <> '' then
|
||||
begin
|
||||
if fwhere <> '' then
|
||||
fwhere := fwhere + ' and ' + trim(Pwhere)
|
||||
else
|
||||
fwhere := ' where ' + trim(Pwhere);
|
||||
end;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
Filtered := False;
|
||||
sql.Clear;
|
||||
sql.Add(' exec P_BS_CloInfo_Get ');
|
||||
sql.Add(' @CTID=' + quotedstr(Trim(CDS_Tree.fieldbyname('CTID').AsString)));
|
||||
sql.Add(',@pageIndex=' + inttostr(CurrentPage));
|
||||
sql.Add(',@pageSize=' + inttostr(RecordsNumber));
|
||||
sql.Add(',@criteria= ' + quotedstr(fwhere));
|
||||
// ShowMessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
TV1.DataController.Filter.Clear;
|
||||
LBCPAP1.Caption := inttostr(CurrentPage) + '/' + inttostr(ceil(CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber));
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
TV1.DataController.Filter.Clear;
|
||||
end;
|
||||
|
||||
if MBCIID <> '' then
|
||||
CDS_1.Locate('BCIID', MBCIID, []);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
RecordsNumber := 500;
|
||||
CurrentPage := 1;
|
||||
if Trim(FCTType) = '' then
|
||||
FCTType := '通用';
|
||||
ReadCxGrid('单位名称' + Trim(FCTType), TV1, '自定义数据');
|
||||
|
||||
InitTree();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoSel.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('单位名称' + Trim(FCTType), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoSel.TCBNOR1Change(Sender: TObject);
|
||||
begin
|
||||
RecordsNumber := StrToInt(TCBNOR1.Text);
|
||||
CurrentPage := 1;
|
||||
C_Code.SetFocus;
|
||||
InitGrid();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoSel.TV1DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmClothInfoSel := nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
4803
A00通用窗体/U_ClothPurchasePlanSel.dfm
Normal file
4803
A00通用窗体/U_ClothPurchasePlanSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
246
A00通用窗体/U_ClothPurchasePlanSel.pas
Normal file
246
A00通用窗体/U_ClothPurchasePlanSel.pas
Normal file
|
|
@ -0,0 +1,246 @@
|
|||
unit U_ClothPurchasePlanSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseHelp, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
||||
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxNavigator,
|
||||
dxDateRanges, dxBarBuiltInMenu, System.ImageList, U_BaseInput, cxButtonEdit,
|
||||
cxCheckBox, Vcl.Menus, cxCalendar, cxPC;
|
||||
|
||||
type
|
||||
TfrmClothPurchasePlanSel = class(TfrmBaseHelp)
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
ADOConnection1: TADOConnection;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Y_Spec: TEdit;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
ImageList1: TImageList;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1SPName: TcxGridDBColumn;
|
||||
v1SPSpec: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1QtyUnit: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
ThreeColorBase: TcxStyleRepository;
|
||||
SHuangSe: TcxStyle;
|
||||
SkyBlue: TcxStyle;
|
||||
Default: TcxStyle;
|
||||
QHuangSe: TcxStyle;
|
||||
Red: TcxStyle;
|
||||
FontBlue: TcxStyle;
|
||||
TextSHuangSe: TcxStyle;
|
||||
FonePurple: TcxStyle;
|
||||
FoneClMaroon: TcxStyle;
|
||||
FoneRed: TcxStyle;
|
||||
RowColor: TcxStyle;
|
||||
handBlack: TcxStyle;
|
||||
cxBlue: TcxStyle;
|
||||
SHuangSeCu: TcxStyle;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
PM_1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
Tv1Column8: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
Y_Name: TEdit;
|
||||
Label3: TLabel;
|
||||
SellName: TEdit;
|
||||
Label4: TLabel;
|
||||
PurNo: TEdit;
|
||||
Label5: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
IsJYTime: TCheckBox;
|
||||
Tv1Column10: TcxGridDBColumn;
|
||||
cxTabControl1: TcxTabControl;
|
||||
ToolButton2: TToolButton;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure TV1DblClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure Y_SpecChange(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
FSTKName, FAuthority: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmClothPurchasePlanSel: TfrmClothPurchasePlanSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmClothPurchasePlanSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
application.MessageBox('网络连接失败!', '提示信息');
|
||||
end;
|
||||
EndDate.DateTime := SGetServerDate(ADOQueryTemp);
|
||||
BegDate.DateTime := EndDate.DateTime - 90;
|
||||
end;
|
||||
|
||||
procedure TfrmClothPurchasePlanSel.Y_SpecChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothPurchasePlanSel.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothPurchasePlanSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
Y_Name.SetFocus;
|
||||
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmClothPurchasePlanSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.*,B.* ');
|
||||
sql.Add(' from Pur_YarnPlan_Main A');
|
||||
sql.Add(' inner join BS_YarnPurPlan_Sub B on A.PurMId=B.PurMId');
|
||||
sql.Add(' where isnull(A.status,''0'')=''9''');
|
||||
sql.add(' and A.ConDate>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + '''');
|
||||
sql.Add(' and A.ConDate<''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + '''');
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
sql.Add(' and not EXISTS (select X.FromSubID from BS_Yarn_IO X where X.FromSubID=B.PurSId) ');
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
sql.Add(' and EXISTS (select X.FromSubID from BS_Yarn_IO X where X.FromSubID=B.PurSId) ');
|
||||
end;
|
||||
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothPurchasePlanSel.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_1, true);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothPurchasePlanSel.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_1, False);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothPurchasePlanSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
InitGrid();
|
||||
|
||||
ReadCxGrid(self.Caption, TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothPurchasePlanSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmClothPurchasePlanSel.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(self.Caption, TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothPurchasePlanSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
Y_Name.SetFocus;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmClothPurchasePlanSel.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothPurchasePlanSel.TV1DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmClothPurchasePlanSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmClothPurchasePlanSel := nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
4596
A00通用窗体/U_CompanySel.dfm
Normal file
4596
A00通用窗体/U_CompanySel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
241
A00通用窗体/U_CompanySel.pas
Normal file
241
A00通用窗体/U_CompanySel.pas
Normal file
|
|
@ -0,0 +1,241 @@
|
|||
unit U_CompanySel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseHelp, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
||||
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxNavigator,
|
||||
dxDateRanges, dxBarBuiltInMenu, System.ImageList, U_BaseInput,
|
||||
dxSkinOffice2013White, dxSkinWXI, dxScrollbarAnnotations;
|
||||
|
||||
type
|
||||
TfrmCompanySel = class(TfrmBaseHelp)
|
||||
TV1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
ADOConnection1: TADOConnection;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
CoName: TEdit;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
ImageList1: TImageList;
|
||||
TV1Column1: TcxGridDBColumn;
|
||||
TV1Column2: TcxGridDBColumn;
|
||||
TV1Column3: TcxGridDBColumn;
|
||||
ThreeColorBase: TcxStyleRepository;
|
||||
SHuangSe: TcxStyle;
|
||||
SkyBlue: TcxStyle;
|
||||
Default: TcxStyle;
|
||||
QHuangSe: TcxStyle;
|
||||
Red: TcxStyle;
|
||||
FontBlue: TcxStyle;
|
||||
TextSHuangSe: TcxStyle;
|
||||
FonePurple: TcxStyle;
|
||||
FoneClMaroon: TcxStyle;
|
||||
FoneRed: TcxStyle;
|
||||
RowColor: TcxStyle;
|
||||
handBlack: TcxStyle;
|
||||
cxBlue: TcxStyle;
|
||||
SHuangSeCu: TcxStyle;
|
||||
TV1Column4: TcxGridDBColumn;
|
||||
TV1Column5: TcxGridDBColumn;
|
||||
TV1Column6: TcxGridDBColumn;
|
||||
TV1Column7: TcxGridDBColumn;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure TV1DblClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure CoNameChange(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
FCoType, FAuthority, FCY, FLX: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmCompanySel: TfrmCompanySel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmCompanySel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
application.MessageBox('网络连接失败!', '提示信息');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCompanySel.CoNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCompanySel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
CoName.SetFocus;
|
||||
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmCompanySel.InitGrid();
|
||||
begin
|
||||
if (FCoType = '客户') and (FCY = '出运') then
|
||||
begin
|
||||
TV1Column7.Visible := true;
|
||||
end;
|
||||
|
||||
try
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from SY_User where UserName=' + quotedstr(Trim(DName)));
|
||||
Open;
|
||||
end;
|
||||
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
if ((FCoType = '客户') or (FCoType = '供应商')) and (FCY = '出运') then
|
||||
begin
|
||||
sql.Add('select B.* ,A.* from BS_Company A ');
|
||||
sql.Add('LEFT JOIN BS_Company_contact B on B.COID=A.COID');
|
||||
sql.Add('where 1=1 and Valid=''Y''');
|
||||
// showmessage(sql.text);
|
||||
end
|
||||
else
|
||||
begin
|
||||
sql.Add('select A.* from BS_Company A where 1=1 and Valid=''Y'' ');
|
||||
end;
|
||||
|
||||
if Trim(FCoType) <> '' then
|
||||
begin
|
||||
sql.Add(' and A.CoType=''' + Trim(FCoType) + '''');
|
||||
end;
|
||||
if Trim(FAuthority) = '理单业务' then
|
||||
begin
|
||||
sql.Add(' and ( SalesId=' + quotedstr(trim(DCode)) + ' or exists (select * from [dbo].[F_Tool_SplitString](TallyId,'','') X where X.RTValue =' + quotedstr(trim(DCode)) + '))');
|
||||
end;
|
||||
if (FCoType = '供应商') and (ADOQueryTemp.fieldbyname('Udept').AsString = '业务部') then
|
||||
begin
|
||||
SQL.Add('and GYSType=''辅料'' ');
|
||||
end;
|
||||
if (FCoType = '客户') and (FCY = '出运') then
|
||||
begin
|
||||
if (Trim(DName) <> 'ADMIN') then
|
||||
begin
|
||||
SQL.Add('and (Filler=''' + Trim(DName) + ''' or Saleser=''' + Trim(DName) + ''') ');
|
||||
end;
|
||||
end;
|
||||
|
||||
if (FCoType = '客户') and (FLX = '销售合同') then
|
||||
begin
|
||||
if (Trim(DName) <> 'ADMIN') then
|
||||
begin
|
||||
SQL.Add('and (Filler=''' + Trim(DName) + ''' or Saleser=''' + Trim(DName) + ''') ');
|
||||
end;
|
||||
|
||||
end;
|
||||
// if (FLX = '采购合同') or (FLX = '销售合同') then
|
||||
// begin
|
||||
if FCoType <> '我司' then
|
||||
begin
|
||||
SQL.Add('and status=''1'' ');
|
||||
end;
|
||||
|
||||
// end;
|
||||
// showmessage(sql.text);
|
||||
Open;
|
||||
end;
|
||||
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCompanySel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
InitGrid();
|
||||
|
||||
ReadCxGrid('单位名称' + Trim(FCoType), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCompanySel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmCompanySel.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('单位名称' + Trim(FCoType), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCompanySel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
CoName.SetFocus;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmCompanySel.TV1DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmCompanySel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmCompanySel := nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
937
A00通用窗体/U_EmployeeSel.dfm
Normal file
937
A00通用窗体/U_EmployeeSel.dfm
Normal file
|
|
@ -0,0 +1,937 @@
|
|||
inherited frmEmployeeSel: TfrmEmployeeSel
|
||||
Left = 342
|
||||
Top = 13
|
||||
Caption = #25968#25454#36873#25321
|
||||
ClientHeight = 637
|
||||
ClientWidth = 731
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
ExplicitWidth = 747
|
||||
ExplicitHeight = 676
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ScrollBox1: TScrollBox [0]
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 731
|
||||
Height = 637
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object btn1: TSpeedButton
|
||||
Left = 23
|
||||
Top = 3
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn2: TSpeedButton
|
||||
Left = 111
|
||||
Top = 3
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn3: TSpeedButton
|
||||
Left = 199
|
||||
Top = 3
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn4: TSpeedButton
|
||||
Left = 287
|
||||
Top = 3
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn5: TSpeedButton
|
||||
Left = 375
|
||||
Top = 3
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn6: TSpeedButton
|
||||
Left = 463
|
||||
Top = 3
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn7: TSpeedButton
|
||||
Left = 551
|
||||
Top = 3
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn8: TSpeedButton
|
||||
Left = 639
|
||||
Top = 3
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn58: TSpeedButton
|
||||
Left = 23
|
||||
Top = 81
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn9: TSpeedButton
|
||||
Left = 111
|
||||
Top = 81
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn10: TSpeedButton
|
||||
Left = 199
|
||||
Top = 81
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn11: TSpeedButton
|
||||
Left = 287
|
||||
Top = 81
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn12: TSpeedButton
|
||||
Left = 375
|
||||
Top = 81
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn13: TSpeedButton
|
||||
Left = 463
|
||||
Top = 81
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn14: TSpeedButton
|
||||
Left = 551
|
||||
Top = 81
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn15: TSpeedButton
|
||||
Left = 639
|
||||
Top = 81
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn59: TSpeedButton
|
||||
Left = 23
|
||||
Top = 158
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn16: TSpeedButton
|
||||
Left = 111
|
||||
Top = 158
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn17: TSpeedButton
|
||||
Left = 199
|
||||
Top = 158
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn18: TSpeedButton
|
||||
Left = 287
|
||||
Top = 158
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn19: TSpeedButton
|
||||
Left = 375
|
||||
Top = 158
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn20: TSpeedButton
|
||||
Left = 463
|
||||
Top = 158
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn21: TSpeedButton
|
||||
Left = 551
|
||||
Top = 158
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn22: TSpeedButton
|
||||
Left = 639
|
||||
Top = 158
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn60: TSpeedButton
|
||||
Left = 23
|
||||
Top = 236
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn23: TSpeedButton
|
||||
Left = 111
|
||||
Top = 236
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn24: TSpeedButton
|
||||
Left = 199
|
||||
Top = 236
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn25: TSpeedButton
|
||||
Left = 287
|
||||
Top = 236
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn26: TSpeedButton
|
||||
Left = 375
|
||||
Top = 236
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn27: TSpeedButton
|
||||
Left = 463
|
||||
Top = 236
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn28: TSpeedButton
|
||||
Left = 551
|
||||
Top = 236
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn29: TSpeedButton
|
||||
Left = 639
|
||||
Top = 236
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn61: TSpeedButton
|
||||
Left = 23
|
||||
Top = 314
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn30: TSpeedButton
|
||||
Left = 111
|
||||
Top = 314
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn31: TSpeedButton
|
||||
Left = 199
|
||||
Top = 314
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn32: TSpeedButton
|
||||
Left = 287
|
||||
Top = 314
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn33: TSpeedButton
|
||||
Left = 375
|
||||
Top = 314
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn34: TSpeedButton
|
||||
Left = 463
|
||||
Top = 314
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn35: TSpeedButton
|
||||
Left = 551
|
||||
Top = 314
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn36: TSpeedButton
|
||||
Left = 639
|
||||
Top = 314
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn62: TSpeedButton
|
||||
Left = 23
|
||||
Top = 392
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn37: TSpeedButton
|
||||
Left = 111
|
||||
Top = 392
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn38: TSpeedButton
|
||||
Left = 199
|
||||
Top = 392
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn39: TSpeedButton
|
||||
Left = 287
|
||||
Top = 392
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn40: TSpeedButton
|
||||
Left = 375
|
||||
Top = 392
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn41: TSpeedButton
|
||||
Left = 463
|
||||
Top = 392
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn42: TSpeedButton
|
||||
Left = 551
|
||||
Top = 392
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn43: TSpeedButton
|
||||
Left = 639
|
||||
Top = 392
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn63: TSpeedButton
|
||||
Left = 23
|
||||
Top = 469
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn44: TSpeedButton
|
||||
Left = 111
|
||||
Top = 469
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn45: TSpeedButton
|
||||
Left = 199
|
||||
Top = 469
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn46: TSpeedButton
|
||||
Left = 287
|
||||
Top = 469
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn47: TSpeedButton
|
||||
Left = 375
|
||||
Top = 469
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn48: TSpeedButton
|
||||
Left = 463
|
||||
Top = 469
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn49: TSpeedButton
|
||||
Left = 551
|
||||
Top = 469
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn50: TSpeedButton
|
||||
Left = 639
|
||||
Top = 469
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn64: TSpeedButton
|
||||
Left = 23
|
||||
Top = 547
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn51: TSpeedButton
|
||||
Left = 111
|
||||
Top = 547
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn52: TSpeedButton
|
||||
Left = 199
|
||||
Top = 547
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn53: TSpeedButton
|
||||
Left = 287
|
||||
Top = 547
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn54: TSpeedButton
|
||||
Left = 375
|
||||
Top = 547
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn55: TSpeedButton
|
||||
Left = 463
|
||||
Top = 547
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn56: TSpeedButton
|
||||
Left = 551
|
||||
Top = 547
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn57: TSpeedButton
|
||||
Left = 639
|
||||
Top = 547
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
end
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
end
|
||||
inherited ADOQueryBaseTemp: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
end
|
||||
object ADOTmp: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 120
|
||||
Top = 176
|
||||
end
|
||||
object ADOConnection1: TADOConnection
|
||||
LoginPrompt = False
|
||||
Left = 296
|
||||
Top = 192
|
||||
end
|
||||
end
|
||||
218
A00通用窗体/U_EmployeeSel.pas
Normal file
218
A00通用窗体/U_EmployeeSel.pas
Normal file
|
|
@ -0,0 +1,218 @@
|
|||
unit U_EmployeeSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, Buttons, DB, ADODB, U_BaseHelp, System.ImageList, Vcl.ImgList;
|
||||
|
||||
type
|
||||
TfrmEmployeeSel = class(TfrmBaseHelp)
|
||||
ScrollBox1: TScrollBox;
|
||||
btn1: TSpeedButton;
|
||||
btn2: TSpeedButton;
|
||||
btn3: TSpeedButton;
|
||||
btn4: TSpeedButton;
|
||||
btn5: TSpeedButton;
|
||||
btn6: TSpeedButton;
|
||||
btn7: TSpeedButton;
|
||||
btn8: TSpeedButton;
|
||||
btn58: TSpeedButton;
|
||||
btn9: TSpeedButton;
|
||||
btn10: TSpeedButton;
|
||||
btn11: TSpeedButton;
|
||||
btn12: TSpeedButton;
|
||||
btn13: TSpeedButton;
|
||||
btn14: TSpeedButton;
|
||||
btn15: TSpeedButton;
|
||||
btn59: TSpeedButton;
|
||||
btn16: TSpeedButton;
|
||||
btn17: TSpeedButton;
|
||||
btn18: TSpeedButton;
|
||||
btn19: TSpeedButton;
|
||||
btn20: TSpeedButton;
|
||||
btn21: TSpeedButton;
|
||||
btn22: TSpeedButton;
|
||||
btn60: TSpeedButton;
|
||||
btn23: TSpeedButton;
|
||||
btn24: TSpeedButton;
|
||||
btn25: TSpeedButton;
|
||||
btn26: TSpeedButton;
|
||||
btn27: TSpeedButton;
|
||||
btn28: TSpeedButton;
|
||||
btn29: TSpeedButton;
|
||||
btn61: TSpeedButton;
|
||||
btn30: TSpeedButton;
|
||||
btn31: TSpeedButton;
|
||||
btn32: TSpeedButton;
|
||||
btn33: TSpeedButton;
|
||||
btn34: TSpeedButton;
|
||||
btn35: TSpeedButton;
|
||||
btn36: TSpeedButton;
|
||||
btn62: TSpeedButton;
|
||||
btn37: TSpeedButton;
|
||||
btn38: TSpeedButton;
|
||||
btn39: TSpeedButton;
|
||||
btn40: TSpeedButton;
|
||||
btn41: TSpeedButton;
|
||||
btn42: TSpeedButton;
|
||||
btn43: TSpeedButton;
|
||||
btn63: TSpeedButton;
|
||||
btn44: TSpeedButton;
|
||||
btn45: TSpeedButton;
|
||||
btn46: TSpeedButton;
|
||||
btn47: TSpeedButton;
|
||||
btn48: TSpeedButton;
|
||||
btn49: TSpeedButton;
|
||||
btn50: TSpeedButton;
|
||||
btn64: TSpeedButton;
|
||||
btn51: TSpeedButton;
|
||||
btn52: TSpeedButton;
|
||||
btn53: TSpeedButton;
|
||||
btn54: TSpeedButton;
|
||||
btn55: TSpeedButton;
|
||||
btn56: TSpeedButton;
|
||||
btn57: TSpeedButton;
|
||||
ADOTmp: TADOQuery;
|
||||
ADOConnection1: TADOConnection;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure btn1Click(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
procedure InitEmployee();
|
||||
{ Private declarations }
|
||||
public
|
||||
FRCode, FRName, FPost: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmEmployeeSel: TfrmEmployeeSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmEmployeeSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmEmployeeSel := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeSel.InitEmployee();
|
||||
type
|
||||
FdDy = record
|
||||
inc: integer;
|
||||
FCode: string[32];
|
||||
FName: string[32];
|
||||
end;
|
||||
var
|
||||
BB: array[0..100] of FdDy;
|
||||
i, j: Integer;
|
||||
begin
|
||||
|
||||
with ADOTmp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select EECode,EEName from SY_Employee where Post=''' + Trim(FPost) + ''' ');
|
||||
SQL.Add('order by EECode,EEName ');
|
||||
Open;
|
||||
end;
|
||||
if ADOTmp.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('没有定义数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOTmp do
|
||||
begin
|
||||
First;
|
||||
i := 0;
|
||||
while not Eof do
|
||||
begin
|
||||
BB[i].inc := i;
|
||||
BB[i].FCode := Trim(fieldbyname('EECode').AsString);
|
||||
BB[i].FName := Trim(fieldbyname('EEName').AsString);
|
||||
i := i + 1;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
i := i - 1;
|
||||
if i > 63 then
|
||||
begin
|
||||
i := 63;
|
||||
end;
|
||||
for j := 0 to i do
|
||||
begin
|
||||
with ScrollBox1 do
|
||||
begin
|
||||
TSpeedButton(Controls[j]).Visible := True;
|
||||
TSpeedButton(Controls[j]).Hint := BB[j].FCode;
|
||||
TSpeedButton(Controls[j]).Caption := BB[j].FName;
|
||||
|
||||
{TSpeedButton(Controls[j]).Hint:=BB[j];
|
||||
if Length(BB[j])>4 then
|
||||
begin
|
||||
TSpeedButton(Controls[j]).Caption:=Copy(Trim(BB[j]),1,4)+#13+Copy(Trim(BB[j]),5,Length(BB[j])-4);
|
||||
end else
|
||||
TSpeedButton(Controls[j]).Caption:=BB[j]; }
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
InitEmployee();
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeSel.btn1Click(Sender: TObject);
|
||||
begin
|
||||
FRCode := Trim(TSpeedButton(Sender).Hint);
|
||||
FRName := Trim(TSpeedButton(Sender).Caption);
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
inherited;
|
||||
// Action:=caHide;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
{if Application.MessageBox('网络连接失败,是否要再次连接?','提示',32+4)=IDYES then
|
||||
begin
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected:=false;
|
||||
ConnectionString:=DConString;
|
||||
//ConnectionString:='23242';
|
||||
Connected:=true;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end; }
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
4823
A00通用窗体/U_KnitClothInfoSel.dfm
Normal file
4823
A00通用窗体/U_KnitClothInfoSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
293
A00通用窗体/U_KnitClothInfoSel.pas
Normal file
293
A00通用窗体/U_KnitClothInfoSel.pas
Normal file
|
|
@ -0,0 +1,293 @@
|
|||
unit U_KnitClothInfoSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseHelp, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
||||
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxNavigator,
|
||||
dxDateRanges, dxBarBuiltInMenu, System.ImageList, U_BaseInput, cxTL,
|
||||
cxMaskEdit, cxTLdxBarBuiltInMenu, cxCheckBox, cxInplaceContainer, cxDBTL,
|
||||
cxTLData, math;
|
||||
|
||||
type
|
||||
TfrmKnitClothInfoSel = class(TfrmBaseHelp)
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
ADOConnection1: TADOConnection;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
ImageList1: TImageList;
|
||||
cxDBTreeList1: TcxDBTreeList;
|
||||
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||
DS_Tree: TDataSource;
|
||||
CDS_Tree: TClientDataSet;
|
||||
ADOQueryTree: TADOQuery;
|
||||
Panel3: TPanel;
|
||||
Panel7: TPanel;
|
||||
Panel4: TPanel;
|
||||
Label14: TLabel;
|
||||
LBCPAP1: TLabel;
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
TCBNOR1: TComboBox;
|
||||
Panel1: TPanel;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
Label9: TLabel;
|
||||
Label8: TLabel;
|
||||
C_Code: TEdit;
|
||||
C_Name: TEdit;
|
||||
C_GramWeight: TEdit;
|
||||
C_Width: TEdit;
|
||||
ThreeColorBase: TcxStyleRepository;
|
||||
SHuangSe: TcxStyle;
|
||||
SkyBlue: TcxStyle;
|
||||
Default: TcxStyle;
|
||||
QHuangSe: TcxStyle;
|
||||
Red: TcxStyle;
|
||||
FontBlue: TcxStyle;
|
||||
TextSHuangSe: TcxStyle;
|
||||
FonePurple: TcxStyle;
|
||||
FoneClMaroon: TcxStyle;
|
||||
FoneRed: TcxStyle;
|
||||
RowColor: TcxStyle;
|
||||
handBlack: TcxStyle;
|
||||
cxBlue: TcxStyle;
|
||||
SHuangSeCu: TcxStyle;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1SSel: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
v1CYNo: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
Tv1Column11: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure TV1DblClick(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure TCBNOR1Change(Sender: TObject);
|
||||
procedure C_NameChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
private
|
||||
CurrentPage, RecordsNumber: Integer;
|
||||
procedure InitGrid();
|
||||
procedure InitTree();
|
||||
{ Private declarations }
|
||||
public
|
||||
FCoType: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmKnitClothInfoSel: TfrmKnitClothInfoSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmKnitClothInfoSel.InitTree();
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
|
||||
with ADOQueryTree do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from BS_Cloth_Type where CTType=''针织'' ');
|
||||
Open;
|
||||
end;
|
||||
|
||||
SCreateCDS(ADOQueryTree, CDS_Tree);
|
||||
SInitCDSData(ADOQueryTree, CDS_Tree);
|
||||
cxDBTreeList1.Items[0].Expand(false);
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
{if Application.MessageBox('网络连接失败,是否要再次连接?','提示',32+4)=IDYES then
|
||||
begin
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected:=false;
|
||||
ConnectionString:=DConString;
|
||||
//ConnectionString:='23242';
|
||||
Connected:=true;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end; }
|
||||
//frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoSel.Button1Click(Sender: TObject);
|
||||
begin
|
||||
if CurrentPage > 1 then
|
||||
CurrentPage := CurrentPage - 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoSel.Button2Click(Sender: TObject);
|
||||
begin
|
||||
if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then
|
||||
CurrentPage := CurrentPage + 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoSel.C_NameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
C_Code.SetFocus;
|
||||
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoSel.InitGrid();
|
||||
var
|
||||
fwhere, MBCIID, Pwhere: string;
|
||||
begin
|
||||
|
||||
if not CDS_1.IsEmpty then
|
||||
MBCIID := Trim(CDS_1.FieldByName('BCIID').AsString)
|
||||
else
|
||||
MBCIID := '';
|
||||
|
||||
Pwhere := SGetFilters(Panel1, 1, 2);
|
||||
|
||||
if trim(Pwhere) <> '' then
|
||||
begin
|
||||
if fwhere <> '' then
|
||||
fwhere := fwhere + ' and ' + trim(Pwhere)
|
||||
else
|
||||
fwhere := ' where ' + trim(Pwhere);
|
||||
end;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
Filtered := False;
|
||||
sql.Clear;
|
||||
sql.Add(' exec P_BS_CloInfo_Get ');
|
||||
sql.Add(' @CTID=' + quotedstr(Trim(CDS_Tree.fieldbyname('CTID').AsString)));
|
||||
sql.Add(',@pageIndex=' + inttostr(CurrentPage));
|
||||
sql.Add(',@pageSize=' + inttostr(RecordsNumber));
|
||||
sql.Add(',@criteria= ' + quotedstr(fwhere));
|
||||
// ShowMessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
TV1.DataController.Filter.Clear;
|
||||
LBCPAP1.Caption := inttostr(CurrentPage) + '/' + inttostr(ceil(CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber));
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
TV1.DataController.Filter.Clear;
|
||||
end;
|
||||
|
||||
if MBCIID <> '' then
|
||||
CDS_1.Locate('BCIID', MBCIID, []);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
RecordsNumber := 500;
|
||||
CurrentPage := 1;
|
||||
|
||||
ReadCxGrid('单位名称' + Trim(FCoType), TV1, '自定义数据');
|
||||
|
||||
InitTree();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoSel.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('单位名称' + Trim(FCoType), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoSel.TCBNOR1Change(Sender: TObject);
|
||||
begin
|
||||
RecordsNumber := StrToInt(TCBNOR1.Text);
|
||||
CurrentPage := 1;
|
||||
C_Code.SetFocus;
|
||||
InitGrid();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoSel.TV1DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmKnitClothInfoSel := nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
4071
A00通用窗体/U_LabelMapSet.dfm
Normal file
4071
A00通用窗体/U_LabelMapSet.dfm
Normal file
File diff suppressed because it is too large
Load Diff
337
A00通用窗体/U_LabelMapSet.pas
Normal file
337
A00通用窗体/U_LabelMapSet.pas
Normal file
|
|
@ -0,0 +1,337 @@
|
|||
unit U_LabelMapSet;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxPC, cxCheckComboBox, cxDropDownEdit, Menus, RM_e_Xls,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
|
||||
dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, System.ImageList,
|
||||
Vcl.ImgList, U_BaseHelp;
|
||||
|
||||
type
|
||||
TfrmLabelMapSet = class(Tform)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
Panel1: TPanel;
|
||||
LMName: TEdit;
|
||||
v2Column8: TcxGridDBColumn;
|
||||
Label1: TLabel;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
ToolButton4: TToolButton;
|
||||
ToolButton5: TToolButton;
|
||||
Label2: TLabel;
|
||||
LMType: TEdit;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
ADOConnection1: TADOConnection;
|
||||
ImageList1: TImageList;
|
||||
cxGrid2: TcxGrid;
|
||||
TV2: TcxGridDBTableView;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
DS_2: TDataSource;
|
||||
ToolBar2: TToolBar;
|
||||
ToolButton12: TToolButton;
|
||||
ToolButton6: TToolButton;
|
||||
ToolButton7: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
ADO_2: TADOQuery;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure CustomerChange(Sender: TObject);
|
||||
procedure v2Column8PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure ToolButton5Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ToolButton12Click(Sender: TObject);
|
||||
procedure ToolButton6Click(Sender: TObject);
|
||||
procedure ToolButton7Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
procedure Getfields(MSql: Integer);
|
||||
public
|
||||
FLMType: string;
|
||||
FFiltration1, FFiltration2, FFiltration3: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmLabelMapSet: TfrmLabelMapSet;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmLabelMapSet.Getfields(MSql: Integer);
|
||||
begin
|
||||
|
||||
case MSql of
|
||||
1:
|
||||
begin
|
||||
if trim(CDS_1.fieldbyname('LMSql1').AsString) <> '' then
|
||||
begin
|
||||
with ADO_2 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec ' + trim(CDS_1.fieldbyname('LMSql1').AsString) + ' @Filtration=' + quotedstr(Trim(FFiltration1)));
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
TV2.ClearItems; //清空数据
|
||||
(TV2.DataController as IcxCustomGridDataController).DeleteAllItems; //删除所有列
|
||||
(TV2.DataController as IcxCustomGridDataController).CreateAllItems(false); //创建数据源中的所有列
|
||||
TV2.ApplyBestFit; //让列宽自适应 .BestFitMaxWidth;
|
||||
end;
|
||||
2:
|
||||
begin
|
||||
if trim(CDS_1.fieldbyname('LMSql2').AsString) <> '' then
|
||||
begin
|
||||
with ADO_2 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec ' + trim(CDS_1.fieldbyname('LMSql2').AsString) + ' @Filtration=' + quotedstr(Trim(FFiltration2)));
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
TV2.ClearItems; //清空数据
|
||||
(TV2.DataController as IcxCustomGridDataController).DeleteAllItems; //删除所有列
|
||||
(TV2.DataController as IcxCustomGridDataController).CreateAllItems(False); //创建数据源中的所有列
|
||||
TV2.ApplyBestFit; //让列宽自适应 .BestFitMaxWidth;
|
||||
end;
|
||||
3:
|
||||
begin
|
||||
if trim(CDS_1.fieldbyname('LMSql3').AsString) <> '' then
|
||||
begin
|
||||
with ADO_2 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec ' + trim(CDS_1.fieldbyname('LMSql3').AsString) + ' @Filtration=' + quotedstr(Trim(FFiltration3)));
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
TV2.ClearItems; //清空数据
|
||||
(TV2.DataController as IcxCustomGridDataController).DeleteAllItems; //删除所有列
|
||||
(TV2.DataController as IcxCustomGridDataController).CreateAllItems(false); //创建数据源中的所有列
|
||||
TV2.ApplyBestFit; //让列宽自适应 .BestFitMaxWidth;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select A.* from BS_Label_Map A ');
|
||||
sql.Add(' where LMType=' + quotedstr(FLMType));
|
||||
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
|
||||
frmLabelMapSet := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.FormCreate(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
// ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
// ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid(Trim(Self.Caption), Tv1, '标签管理');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.ToolButton12Click(Sender: TObject);
|
||||
begin
|
||||
Getfields(1);
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(Trim(Self.Caption), Tv1, '标签管理');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.ToolButton2Click(Sender: TObject);
|
||||
var
|
||||
sql: string;
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
sql := SGetFilters(Panel1, 1, 2);
|
||||
SDofilter(ADOQueryMain, sql);
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
TcxGridToExcel('sql字段', cxgrid2);
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.CustomerChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.v2Column8PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
begin
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with CDS_1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value := Trim(mvalue);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate BS_Label_Map ');
|
||||
sql.Add(' Set ' + FFieldName + '=''' + Trim(mvalue) + '''');
|
||||
sql.Add(' , Editer=''' + Trim(DName) + '''');
|
||||
sql.Add(' , Edittime=getdate()');
|
||||
sql.Add(' where LMID=' + quotedstr(CDS_1.fieldbyname('LMID').AsString));
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
tv1.Controller.EditingController.ShowEdit();
|
||||
except
|
||||
tv1.Controller.EditingController.ShowEdit();
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
end
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.ToolButton4Click(Sender: TObject);
|
||||
begin
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('insert into BS_Label_Map(LMType,Filler) values(' + quotedstr(Trim(FLMType)) + ',' + quotedstr(Trim(dname)) + ')');
|
||||
ExecSQL;
|
||||
end;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.ToolButton5Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete BS_Label_Map where LMID=' + QuotedStr(CDS_1.FieldByName('LMID').AsString));
|
||||
ExecSQL;
|
||||
end;
|
||||
CDS_1.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.ToolButton6Click(Sender: TObject);
|
||||
begin
|
||||
Getfields(2);
|
||||
end;
|
||||
|
||||
procedure TfrmLabelMapSet.ToolButton7Click(Sender: TObject);
|
||||
begin
|
||||
Getfields(3);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
4515
A00通用窗体/U_LabelPrint.dfm
Normal file
4515
A00通用窗体/U_LabelPrint.dfm
Normal file
File diff suppressed because it is too large
Load Diff
272
A00通用窗体/U_LabelPrint.pas
Normal file
272
A00通用窗体/U_LabelPrint.pas
Normal file
|
|
@ -0,0 +1,272 @@
|
|||
unit U_LabelPrint;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseHelp, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
||||
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxNavigator,
|
||||
dxDateRanges, dxBarBuiltInMenu, System.ImageList, U_BaseInput, RM_Common,
|
||||
RM_Class, RM_GridReport, RM_Dataset, Vcl.Buttons, RM_E_llPDF, RM_BarCode,
|
||||
RM_e_Graphic, RM_e_Jpeg, RM_e_Xls, cxContainer, cxMaskEdit, cxDropDownEdit,
|
||||
cxMRUEdit;
|
||||
|
||||
type
|
||||
TfrmLabelPrint = class(TfrmBaseHelp)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOConnection1: TADOConnection;
|
||||
Panel1: TPanel;
|
||||
ImageList1: TImageList;
|
||||
RMDB_1: TRMDBDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMDB_2: TRMDBDataSet;
|
||||
CDS_Label: TClientDataSet;
|
||||
ADO_1: TADOQuery;
|
||||
btnPrint: TSpeedButton;
|
||||
btnShow: TSpeedButton;
|
||||
ADO_2: TADOQuery;
|
||||
RMDB_3: TRMDBDataSet;
|
||||
ADO_3: TADOQuery;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
RMJPEGExport1: TRMJPEGExport;
|
||||
RMBarCodeObject1: TRMBarCodeObject;
|
||||
RMllPDFExport1: TRMllPDFExport;
|
||||
CheckBox1: TCheckBox;
|
||||
ComboBox1: TComboBox;
|
||||
Label1: TLabel;
|
||||
cbbLab: TcxMRUEdit;
|
||||
CheckBox2: TCheckBox;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TV1DblClick(Sender: TObject);
|
||||
procedure btnPrintClick(Sender: TObject);
|
||||
procedure btnShowClick(Sender: TObject);
|
||||
procedure cbbLabPropertiesButtonClick(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure PrintLabel(MIsShow: Boolean);
|
||||
{ Private declarations }
|
||||
public
|
||||
FPreviewPrint: Boolean;
|
||||
FLMType: string; //标签类型
|
||||
FFiltration1, FFiltration2, FFiltration3: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmLabelPrint: TfrmLabelPrint;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_LabelMapSet;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmLabelPrint.PrintLabel(MIsShow: Boolean);
|
||||
var
|
||||
fPrintFile, fPrintFile10, FMainID, LBName: string;
|
||||
begin
|
||||
if CDS_Label.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox(PChar('类型' + FLMType + '没有设置标签!'), '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
RMllPDFExport1.ShowDialog := CheckBox2.Checked;
|
||||
RMJPEGExport1.ShowDialog := CheckBox2.Checked;
|
||||
RMXLSExport1.ShowDialog := CheckBox2.Checked;
|
||||
RM1.ShowPrintDialog := CheckBox1.Checked;
|
||||
|
||||
LBName := cbbLab.text;
|
||||
ExportFtErpFile(LBName + '.rmf', ADOQueryTemp);
|
||||
|
||||
if CDS_Label.Locate('LMName', LBName, []) then
|
||||
begin
|
||||
|
||||
if trim(CDS_Label.fieldbyname('LMSql1').AsString) <> '' then
|
||||
begin
|
||||
with ADO_1 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec ' + trim(CDS_Label.fieldbyname('LMSql1').AsString) + ' @Filtration=' + quotedstr(Trim(FFiltration1)));
|
||||
// showmessage(sql.text);
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
if trim(CDS_Label.fieldbyname('LMSql2').AsString) <> '' then
|
||||
begin
|
||||
with ADO_2 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec ' + trim(CDS_Label.fieldbyname('LMSql2').AsString) + ' @Filtration=' + quotedstr(Trim(FFiltration2)));
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
if trim(CDS_Label.fieldbyname('LMSql3').AsString) <> '' then
|
||||
begin
|
||||
with ADO_3 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec ' + trim(CDS_Label.fieldbyname('LMSql3').AsString) + ' @Filtration=' + quotedstr(Trim(FFiltration3)));
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + LBName + '.rmf';
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.DefaultCopies := StrToIntDef(ComboBox1.Text, 1);
|
||||
if MIsShow then
|
||||
RM1.ShowReport
|
||||
else
|
||||
RM1.PrintReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelPrint.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FPreviewPrint := True;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
{if Application.MessageBox('网络连接失败,是否要再次连接?','提示',32+4)=IDYES then
|
||||
begin
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected:=false;
|
||||
ConnectionString:=DConString;
|
||||
//ConnectionString:='23242';
|
||||
Connected:=true;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end; }
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelPrint.btnPrintClick(Sender: TObject);
|
||||
begin
|
||||
PrintLabel(False);
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelPrint.btnShowClick(Sender: TObject);
|
||||
begin
|
||||
PrintLabel(true);
|
||||
end;
|
||||
|
||||
procedure TfrmLabelPrint.cbbLabPropertiesButtonClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
try
|
||||
frmLabelMapSet := TfrmLabelMapSet.Create(Application);
|
||||
with frmLabelMapSet do
|
||||
begin
|
||||
FFiltration1 := self.FFiltration1;
|
||||
FFiltration2 := self.FFiltration2;
|
||||
FFiltration3 := self.FFiltration3;
|
||||
FLMType := self.FLMType;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmLabelMapSet.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelPrint.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
inherited;
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelPrint.InitGrid();
|
||||
begin
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select distinct(LMName) name from BS_Label_Map where LMType=' + QuotedStr(TRIM(FLMType)));
|
||||
Open;
|
||||
if isEmpty then
|
||||
begin
|
||||
exit;
|
||||
end;
|
||||
cbbLab.Properties.LookupItems.Clear;
|
||||
while not Eof do
|
||||
begin
|
||||
|
||||
cbbLab.Properties.LookupItems.Add(Trim(fieldByName('Name').AsString));
|
||||
Next;
|
||||
end;
|
||||
|
||||
cbbLab.ItemIndex := 0;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
Sql.Add('select * from BS_Label_Map where LMType=' + QuotedStr(TRIM(FLMType)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryTemp, CDS_Label);
|
||||
SInitCDSData(ADOQueryTemp, CDS_Label);
|
||||
if CDS_Label.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox(PChar('类型' + FLMType + '没有设置标签!'), '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelPrint.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
if FPreviewPrint then
|
||||
RM1.PreviewButtons := [rmpbZoom, rmpbLoad, rmpbSave, rmpbPrint, rmpbFind, rmpbPageSetup, rmpbExit, rmpbSaveToXLS, rmpbExport, rmpbNavigator]
|
||||
else
|
||||
RM1.PreviewButtons := [rmpbZoom, rmpbLoad, rmpbSave, rmpbFind, rmpbPageSetup, rmpbExit, rmpbSaveToXLS, rmpbExport, rmpbNavigator];
|
||||
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmLabelPrint.TV1DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelPrint.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmLabelPrint := nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
165
A00通用窗体/U_PictureUpload.dfm
Normal file
165
A00通用窗体/U_PictureUpload.dfm
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
object frmPictureUpload: TfrmPictureUpload
|
||||
Left = 697
|
||||
Top = 183
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsSingle
|
||||
Caption = #33719#21462#22270#29255
|
||||
ClientHeight = 449
|
||||
ClientWidth = 496
|
||||
Color = clWhite
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poDesktopCenter
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object Image2: TImage
|
||||
Left = 464
|
||||
Top = 8
|
||||
Width = 160
|
||||
Height = 120
|
||||
end
|
||||
object SpeedButton3: TSpeedButton
|
||||
Left = 500
|
||||
Top = 426
|
||||
Width = 80
|
||||
Height = 22
|
||||
Caption = #25918#24323
|
||||
end
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 496
|
||||
Height = 411
|
||||
HorzScrollBar.Visible = False
|
||||
VertScrollBar.Visible = False
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
ExplicitLeft = 5
|
||||
ExplicitTop = 5
|
||||
ExplicitWidth = 300
|
||||
ExplicitHeight = 400
|
||||
object Image1: TImage
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 492
|
||||
Height = 407
|
||||
Cursor = crSizeAll
|
||||
Align = alClient
|
||||
Center = True
|
||||
IncrementalDisplay = True
|
||||
Stretch = True
|
||||
OnMouseDown = Image1MouseDown
|
||||
OnMouseMove = Image1MouseMove
|
||||
ExplicitLeft = -2
|
||||
ExplicitTop = 3
|
||||
ExplicitWidth = 275
|
||||
ExplicitHeight = 436
|
||||
end
|
||||
end
|
||||
object ToolBar1: TToolBar
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 496
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 103
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_Contract.ImageList_new32
|
||||
Images = DataLink_Contract.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 1
|
||||
ExplicitWidth = 509
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#24320#22270#29255
|
||||
ImageIndex = 23
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBSave: TToolButton
|
||||
Left = 95
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
Enabled = False
|
||||
ImageIndex = 16
|
||||
OnClick = TBSaveClick
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 166
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22270#29255#21478#23384#20026
|
||||
ImageIndex = 13
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 273
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 14
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 344
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25918#24323
|
||||
ImageIndex = 10
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 415
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object OpenPictureDialog1: TOpenPictureDialog
|
||||
Left = 112
|
||||
Top = 128
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_Contract.ADOLink
|
||||
Parameters = <>
|
||||
Left = 224
|
||||
Top = 264
|
||||
end
|
||||
object SaveDialog1: TSavePictureDialog
|
||||
Left = 96
|
||||
Top = 235
|
||||
end
|
||||
object adoqueryImage: TADOQuery
|
||||
Connection = DataLink_Contract.ADOLink
|
||||
Parameters = <>
|
||||
Left = 224
|
||||
Top = 184
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
ConnectTimeout = 0
|
||||
NATKeepAlive.UseKeepAlive = False
|
||||
NATKeepAlive.IdleTimeMS = 0
|
||||
NATKeepAlive.IntervalMS = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
ReadTimeout = 0
|
||||
Left = 244
|
||||
Top = 118
|
||||
end
|
||||
end
|
||||
536
A00通用窗体/U_PictureUpload.pas
Normal file
536
A00通用窗体/U_PictureUpload.pas
Normal file
|
|
@ -0,0 +1,536 @@
|
|||
unit U_PictureUpload;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, strUtils, Variants, Classes, Graphics, Controls,
|
||||
Forms, Dialogs, ComCtrls, ToolWin, ExtCtrls, jpeg, IniFiles, ExtDlgs, Buttons,
|
||||
StdCtrls, DB, ADODB, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, IdExplicitTLSClientServerBase;
|
||||
|
||||
type
|
||||
TfrmPictureUpload = class(TForm)
|
||||
ScrollBox1: TScrollBox;
|
||||
Image1: TImage;
|
||||
OpenPictureDialog1: TOpenPictureDialog;
|
||||
Image2: TImage;
|
||||
SpeedButton3: TSpeedButton;
|
||||
ADOQuery1: TADOQuery;
|
||||
SaveDialog1: TSavePictureDialog;
|
||||
adoqueryImage: TADOQuery;
|
||||
IdFTP1: TIdFTP;
|
||||
ToolBar1: TToolBar;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
ToolButton4: TToolButton;
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure TwainTwainAcquire(Sender: TObject; const Index: Integer; Image: TBitmap; var Cancel: Boolean);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure Image1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure Image1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
||||
procedure Initimage();
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
private
|
||||
hWndC: THandle;
|
||||
CapturingAVI: bool;
|
||||
ClickPos: TPoint;
|
||||
SelectedSource, PicLeft, PicTop, PicWidth, PicHeight: Integer;
|
||||
FilePath, FileName: string;
|
||||
MyJpeg: TJPEGImage;
|
||||
procedure CreThumb(Width, Height: Integer);
|
||||
function SaveImage(): Boolean;
|
||||
procedure Rotate90(Source: TGraphic; Target: TJpegImage);
|
||||
public
|
||||
FTFType, fFlileFlag: string;
|
||||
FWidth, FHeight: Integer;
|
||||
FPictureName, FDataId: string;
|
||||
{ Public declarations }
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmPictureUpload: TfrmPictureUpload;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
const
|
||||
WM_CAP_START = WM_USER;
|
||||
|
||||
const
|
||||
WM_CAP_STOP = WM_CAP_START + 68;
|
||||
|
||||
const
|
||||
WM_CAP_DRIVER_CONNECT = WM_CAP_START + 10;
|
||||
|
||||
const
|
||||
WM_CAP_DRIVER_DISCONNECT = WM_CAP_START + 11;
|
||||
|
||||
const
|
||||
WM_CAP_SAVEDIB = WM_CAP_START + 25;
|
||||
|
||||
const
|
||||
WM_CAP_GRAB_FRAME = WM_CAP_START + 60;
|
||||
|
||||
const
|
||||
WM_CAP_SEQUENCE = WM_CAP_START + 62;
|
||||
|
||||
const
|
||||
WM_CAP_FILE_SET_CAPTURE_FILEA = WM_CAP_START + 20;
|
||||
|
||||
const
|
||||
WM_CAP_SEQUENCE_NOFILE = WM_CAP_START + 63;
|
||||
|
||||
const
|
||||
WM_CAP_SET_OVERLAY = WM_CAP_START + 51;
|
||||
|
||||
const
|
||||
WM_CAP_SET_PREVIEW = WM_CAP_START + 50;
|
||||
|
||||
const
|
||||
WM_CAP_SET_CALLBACK_VIDEOSTREAM = WM_CAP_START + 6;
|
||||
|
||||
const
|
||||
WM_CAP_SET_CALLBACK_ERROR = WM_CAP_START + 2;
|
||||
|
||||
const
|
||||
WM_CAP_SET_CALLBACK_STATUSA = WM_CAP_START + 3;
|
||||
|
||||
const
|
||||
WM_CAP_SET_CALLBACK_FRAME = WM_CAP_START + 5;
|
||||
|
||||
const
|
||||
WM_CAP_SET_SCALE = WM_CAP_START + 53;
|
||||
|
||||
const
|
||||
WM_CAP_SET_PREVIEWRATE = WM_CAP_START + 52;
|
||||
|
||||
function capCreateCaptureWindowA(lpszWindowName: PCHAR; dwStyle: longint; x: integer; y: integer; nWidth: integer; nHeight: integer; ParentWin: HWND; nId: integer): HWND; stdcall external 'AVICAP32.DLL';
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmPictureUpload.Rotate90(Source: TGraphic; Target: TJpegImage);
|
||||
var
|
||||
SourceBmp, TargetBmp: TBitmap;
|
||||
r, c: Integer;
|
||||
x, y: Integer;
|
||||
begin
|
||||
SourceBmp := TBitmap.Create;
|
||||
SourceBmp.Assign(Source);
|
||||
TargetBmp := TBitmap.Create;
|
||||
TargetBmp.Width := SourceBmp.Height;
|
||||
TargetBmp.Height := SourceBmp.Width;
|
||||
for r := 0 to SourceBmp.Height - 1 do
|
||||
begin
|
||||
for c := 0 to SourceBmp.Width - 1 do
|
||||
begin
|
||||
//x := (SourceBmp.Height-1) - r; // -90
|
||||
//y := c; //-90
|
||||
x := r; //90
|
||||
y := (SourceBmp.Width - 1) - c; //90
|
||||
// look into Bitmap.ScanLine for faster pixel access
|
||||
TargetBmp.Canvas.Pixels[x, y] := SourceBmp.Canvas.Pixels[c, r];
|
||||
end;
|
||||
end;
|
||||
Target.Assign(TargetBmp);
|
||||
SourceBmp.Free;
|
||||
TargetBmp.Free;
|
||||
end;
|
||||
|
||||
procedure TfrmPictureUpload.Initimage();
|
||||
var
|
||||
jpg: TJpegImage;
|
||||
myStream: TADOBlobStream;
|
||||
sFieldName: string;
|
||||
JPStream: TMemoryStream;
|
||||
begin
|
||||
jpg := TJpegImage.Create();
|
||||
JPStream := TMemoryStream.Create;
|
||||
try
|
||||
|
||||
with adoqueryImage do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File where WBID=' + quotedstr(trim(FDataId)));
|
||||
sql.Add('and TFType=' + quotedstr(trim(FTFType)));
|
||||
open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
|
||||
if not fieldbyname('FilesOther').IsNull then
|
||||
begin
|
||||
myStream := tadoblobstream.Create(tblobfield(adoqueryImage.fieldbyname('FilesOther')), bmread);
|
||||
jpg.LoadFromStream(myStream);
|
||||
Image2.Picture.Assign(jpg);
|
||||
myStream.Free;
|
||||
|
||||
try
|
||||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI', 'SERVER', '服务器地址', '127.0.0.1');
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
;
|
||||
end;
|
||||
|
||||
JPStream.Clear;
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
try
|
||||
IdFTP1.Get(fFlileFlag + '\' + Trim(fieldbyname('FileName').AsString), JPStream);
|
||||
except
|
||||
Application.MessageBox('客户图样文件不存在', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox('无法连接文件服务器', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if IdFTP1.Connected then
|
||||
IdFTP1.Quit;
|
||||
JPStream.Position := 0;
|
||||
jpg.LoadFromStream(JPStream);
|
||||
Image1.Picture.Assign(jpg);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
jpg.free;
|
||||
JPStream.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmPictureUpload.SaveImage(): Boolean;
|
||||
var
|
||||
myStream: TADOBlobStream;
|
||||
maxNo: string;
|
||||
fNewFileName: string;
|
||||
begin
|
||||
//取文件后缀 ExtractFileExt(FilePath)
|
||||
|
||||
if FPictureName = '' then
|
||||
begin
|
||||
fNewFileName := formatdatetime('yyyyMMddhhnnsszzz', now()) + ExtractFileExt(FilePath);
|
||||
FPictureName := fNewFileName;
|
||||
end;
|
||||
|
||||
result := false;
|
||||
try
|
||||
with adoqueryImage do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File where WBID=' + quotedstr(trim(FDataId)));
|
||||
sql.Add('and TFType=' + quotedstr(trim(FTFType)));
|
||||
open;
|
||||
if RecordCount <= 0 then
|
||||
begin
|
||||
Append;
|
||||
if GetLSNo(ADOQuery1, maxNo, 'FJ', 'TP_File', 4, 1) = False then
|
||||
begin
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
fieldByName('TFID').AsString := maxNo;
|
||||
fieldByName('WBID').AsString := FDataId;
|
||||
end
|
||||
else
|
||||
begin
|
||||
edit;
|
||||
end;
|
||||
fieldByName('FileName').AsString := trim(FPictureName);
|
||||
fieldByName('Filler').AsString := trim(dName);
|
||||
fieldByName('TFType').AsString := trim(FTFType);
|
||||
myStream := TADOBlobStream.Create(TBlobField(FieldByName('FilesOther')), bmWrite);
|
||||
MyJpeg.Assign(Image2.Picture.Graphic);
|
||||
MyJpeg.SaveToStream(myStream);
|
||||
myStream.Free;
|
||||
Post;
|
||||
end;
|
||||
|
||||
if FilePath <> '' then
|
||||
begin
|
||||
try
|
||||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI', 'SERVER', '服务器地址', '127.0.0.1');
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
IdFTP1.Put(FilePath, fFlileFlag + '\' + Trim(FPictureName));
|
||||
IdFTP1.Quit;
|
||||
except
|
||||
IdFTP1.Quit;
|
||||
Application.MessageBox('上传客户图样文件失败,请检查文件服务器!', '提示', MB_ICONWARNING);
|
||||
end;
|
||||
end;
|
||||
IdFTP1.Quit;
|
||||
|
||||
result := true;
|
||||
except
|
||||
myStream.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPictureUpload.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmPictureUpload.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
if SaveImage() then
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end
|
||||
else
|
||||
begin
|
||||
application.MessageBox('数据保存失败!', '提示信息', 0)
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPictureUpload.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
Jpeg: TJPEGImage;
|
||||
begin
|
||||
if OpenPictureDialog1.Execute then
|
||||
begin
|
||||
Image1.Top := 0;
|
||||
Image1.Left := 0;
|
||||
Image1.Picture.LoadFromFile(OpenPictureDialog1.FileName);
|
||||
FilePath := OpenPictureDialog1.FileName;
|
||||
FileName := ExtractFileName(FilePath);
|
||||
|
||||
// Jpeg := TJPEGImage.Create;
|
||||
// Rotate90(Image1.Picture.Graphic, Jpeg);
|
||||
// Image1.Picture.Assign(Jpeg);
|
||||
// Jpeg.Free;
|
||||
|
||||
CreThumb(FWidth, FHeight);
|
||||
TBSave.Enabled := TRUE;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmPictureUpload.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
with adoqueryImage do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File where WBID=' + quotedstr(trim(FPictureName)));
|
||||
open;
|
||||
if RecordCount > 0 then
|
||||
begin
|
||||
edit;
|
||||
fieldByName('FileName').Value := null;
|
||||
FieldByName('FilesOther').Value := null;
|
||||
post;
|
||||
Image1.Picture.Assign(nil);
|
||||
Image2.Picture.Assign(nil);
|
||||
end;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPictureUpload.ToolButton3Click(Sender: TObject);
|
||||
var
|
||||
MJPG: TJpegImage;
|
||||
pathFile: string;
|
||||
begin
|
||||
if Image1.Picture.Graphic = nil then
|
||||
exit;
|
||||
|
||||
MJPG := TJpegImage.Create;
|
||||
try
|
||||
SaveDialog1.FileName := FileName;
|
||||
if SaveDialog1.Execute then
|
||||
begin
|
||||
if SaveDialog1.FileName <> '' then
|
||||
begin
|
||||
pathFile := trim(SaveDialog1.FileName);
|
||||
|
||||
if (RightStr(UPPERCASE(pathFile), 4) <> '.JPG') and (RightStr(UPPERCASE(pathFile), 5) <> '.JPEG') then
|
||||
begin
|
||||
pathFile := pathFile + '.JPG';
|
||||
end;
|
||||
MJPG.Assign(Image1.Picture.Graphic);
|
||||
if fileexists(pathFile) then
|
||||
begin
|
||||
if application.MessageBox(pchar('文件[' + trim(pathFile) + ']已存在,是否要替换它?'), '提示信息', MB_YESNO + mb_iconinformation + MB_DEFBUTTON2) = idyes then
|
||||
MJPG.SaveToFile(pathFile);
|
||||
end
|
||||
else
|
||||
MJPG.SaveToFile(pathFile);
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
MJPG.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPictureUpload.ToolButton4Click(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 2;
|
||||
end;
|
||||
|
||||
procedure TfrmPictureUpload.TwainTwainAcquire(Sender: TObject; const Index: Integer; Image: TBitmap; var Cancel: Boolean);
|
||||
begin
|
||||
Image1.Picture.Assign(Image);
|
||||
Cancel := TRUE;
|
||||
CreThumb(150, 150);
|
||||
TBSave.Enabled := TRUE;
|
||||
end;
|
||||
|
||||
procedure TfrmPictureUpload.FormShow(Sender: TObject);
|
||||
var
|
||||
Ini: TIniFile;
|
||||
begin
|
||||
{ Ini := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'scanner.ini');
|
||||
try
|
||||
SelectedSource := Ini.ReadInteger( 'SCANNER', 'Scanner', 0);
|
||||
PicLeft := Ini.ReadInteger( 'SCANNER', 'Left', 0);
|
||||
PicTop := Ini.ReadInteger( 'SCANNER', 'Top', 0);
|
||||
PicWidth := Ini.ReadInteger( 'SCANNER', 'Width', 100);
|
||||
PicHeight := Ini.ReadInteger( 'SCANNER', 'Height', 100);
|
||||
finally
|
||||
Ini.Free;
|
||||
end; }
|
||||
Initimage();
|
||||
end;
|
||||
|
||||
{
|
||||
procedure TfrmPictureUpload.ToolButton6Click(Sender: TObject);
|
||||
var
|
||||
Ini: TIniFile;
|
||||
begin
|
||||
FormGetPos := TFormGetPos.Create(Self);
|
||||
FormGetPos.SpinEdit1.Value := PicLeft;
|
||||
FormGetPos.SpinEdit2.Value := PicTop;
|
||||
FormGetPos.SpinEdit3.Value := PicWidth;
|
||||
FormGetPos.SpinEdit4.Value := PicHeight;
|
||||
if FormGetPos.ShowModal = 1 then
|
||||
begin
|
||||
PicLeft := FormGetPos.SpinEdit1.Value;
|
||||
PicTop := FormGetPos.SpinEdit2.Value;
|
||||
PicWidth := FormGetPos.SpinEdit3.Value;
|
||||
PicHeight := FormGetPos.SpinEdit4.Value;
|
||||
|
||||
Ini := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'scanner.ini');
|
||||
try
|
||||
Ini.WriteInteger( 'SCANNER', 'Left', PicLeft);
|
||||
Ini.WriteInteger( 'SCANNER', 'Top', PicTop);
|
||||
Ini.WriteInteger( 'SCANNER', 'Width', PicWidth);
|
||||
Ini.WriteInteger( 'SCANNER', 'Height', PicHeight);
|
||||
finally
|
||||
Ini.Free;
|
||||
end;
|
||||
end;
|
||||
FormGetPos.Free;
|
||||
end;
|
||||
}
|
||||
|
||||
procedure TfrmPictureUpload.CreThumb(Width, Height: Integer);
|
||||
var
|
||||
Bitmap: TBitmap;
|
||||
Ratio: Double;
|
||||
ARect: TRect;
|
||||
AHeight, AHeightOffset: Integer;
|
||||
AWidth, AWidthOffset: Integer;
|
||||
begin
|
||||
Bitmap := TBitmap.Create;
|
||||
try
|
||||
Ratio := Image1.Picture.Graphic.Width / Image1.Picture.Graphic.Height;
|
||||
if Ratio > 0.75 then
|
||||
begin
|
||||
AHeight := Round(Width / Ratio);
|
||||
AHeightOffset := (Height - AHeight) div 2;
|
||||
AWidth := Width;
|
||||
AWidthOffset := 0;
|
||||
end
|
||||
else
|
||||
begin
|
||||
AWidth := Round(Height * Ratio);
|
||||
AWidthOffset := (Width - AWidth) div 2;
|
||||
AHeight := Height;
|
||||
AHeightOffset := 0;
|
||||
end;
|
||||
Bitmap.Width := Width;
|
||||
Bitmap.Height := Height;
|
||||
Bitmap.Canvas.Brush.Color := clBtnFace;
|
||||
Bitmap.Canvas.FillRect(Rect(0, 0, Width, Height));
|
||||
ARect := Rect(AWidthOffset, AHeightOffset, AWidth + AWidthOffset, AHeight + AHeightOffset);
|
||||
Bitmap.Canvas.StretchDraw(ARect, Image1.Picture.Graphic);
|
||||
Image2.Picture.Assign(Bitmap);
|
||||
finally
|
||||
Bitmap.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPictureUpload.FormCreate(Sender: TObject);
|
||||
begin
|
||||
MyJpeg := TJpegImage.Create;
|
||||
TBSave.Enabled := false;
|
||||
if FWidth = 0 then
|
||||
FWidth := 197;
|
||||
if FHeight = 0 then
|
||||
FHeight := 110;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmPictureUpload.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
// MyJpeg1.Free;
|
||||
MyJpeg.Free;
|
||||
end;
|
||||
|
||||
procedure TfrmPictureUpload.Image1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
ClickPos.x := X;
|
||||
ClickPos.y := Y;
|
||||
end;
|
||||
|
||||
procedure TfrmPictureUpload.Image1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
NewPos: TPoint;
|
||||
begin
|
||||
{The left button was pressed}
|
||||
if ssLeft in Shift then
|
||||
begin
|
||||
{Calculate new position}
|
||||
NewPos.X := Image1.Left + X - ClickPos.x;
|
||||
NewPos.Y := Image1.Top + Y - ClickPos.y;
|
||||
if NewPos.x + Image1.Width < ScrollBox1.Width then
|
||||
NewPos.x := ScrollBox1.Width - Image1.Width;
|
||||
if NewPos.y + Image1.Height < ScrollBox1.Height then
|
||||
NewPos.y := ScrollBox1.Height - Image1.Height;
|
||||
if NewPos.X > 0 then
|
||||
NewPos.X := 0;
|
||||
if NewPos.Y > 0 then
|
||||
NewPos.Y := 0;
|
||||
|
||||
Image1.Top := NewPos.Y;
|
||||
Image1.Left := NewPos.X;
|
||||
end {if ssLeft in Shift}
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
986
A00通用窗体/U_PositionSel.dfm
Normal file
986
A00通用窗体/U_PositionSel.dfm
Normal file
|
|
@ -0,0 +1,986 @@
|
|||
inherited frmPositionSel: TfrmPositionSel
|
||||
Left = 342
|
||||
Top = 13
|
||||
Caption = #25968#25454#36873#25321
|
||||
ClientHeight = 668
|
||||
ClientWidth = 731
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
ExplicitWidth = 747
|
||||
ExplicitHeight = 707
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ScrollBox1: TScrollBox [0]
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 731
|
||||
Height = 668
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object btn1: TSpeedButton
|
||||
Left = 23
|
||||
Top = 3
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn2: TSpeedButton
|
||||
Left = 111
|
||||
Top = 3
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn3: TSpeedButton
|
||||
Left = 199
|
||||
Top = 3
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn4: TSpeedButton
|
||||
Left = 287
|
||||
Top = 3
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn5: TSpeedButton
|
||||
Left = 375
|
||||
Top = 3
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn6: TSpeedButton
|
||||
Left = 463
|
||||
Top = 3
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn7: TSpeedButton
|
||||
Left = 551
|
||||
Top = 3
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn8: TSpeedButton
|
||||
Left = 639
|
||||
Top = 3
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn58: TSpeedButton
|
||||
Left = 23
|
||||
Top = 81
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn9: TSpeedButton
|
||||
Left = 111
|
||||
Top = 81
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn10: TSpeedButton
|
||||
Left = 199
|
||||
Top = 81
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn11: TSpeedButton
|
||||
Left = 287
|
||||
Top = 81
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn12: TSpeedButton
|
||||
Left = 375
|
||||
Top = 81
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn13: TSpeedButton
|
||||
Left = 463
|
||||
Top = 81
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn14: TSpeedButton
|
||||
Left = 551
|
||||
Top = 81
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn15: TSpeedButton
|
||||
Left = 639
|
||||
Top = 81
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn59: TSpeedButton
|
||||
Left = 23
|
||||
Top = 158
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn16: TSpeedButton
|
||||
Left = 111
|
||||
Top = 158
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn17: TSpeedButton
|
||||
Left = 199
|
||||
Top = 158
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn18: TSpeedButton
|
||||
Left = 287
|
||||
Top = 158
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn19: TSpeedButton
|
||||
Left = 375
|
||||
Top = 158
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn20: TSpeedButton
|
||||
Left = 463
|
||||
Top = 158
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn21: TSpeedButton
|
||||
Left = 551
|
||||
Top = 158
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn22: TSpeedButton
|
||||
Left = 639
|
||||
Top = 158
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn60: TSpeedButton
|
||||
Left = 23
|
||||
Top = 236
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn23: TSpeedButton
|
||||
Left = 111
|
||||
Top = 236
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn24: TSpeedButton
|
||||
Left = 199
|
||||
Top = 236
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn25: TSpeedButton
|
||||
Left = 287
|
||||
Top = 236
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn26: TSpeedButton
|
||||
Left = 375
|
||||
Top = 236
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn27: TSpeedButton
|
||||
Left = 463
|
||||
Top = 236
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn28: TSpeedButton
|
||||
Left = 551
|
||||
Top = 236
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn29: TSpeedButton
|
||||
Left = 639
|
||||
Top = 236
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn61: TSpeedButton
|
||||
Left = 23
|
||||
Top = 314
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn30: TSpeedButton
|
||||
Left = 111
|
||||
Top = 314
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn31: TSpeedButton
|
||||
Left = 199
|
||||
Top = 314
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn32: TSpeedButton
|
||||
Left = 287
|
||||
Top = 314
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn33: TSpeedButton
|
||||
Left = 375
|
||||
Top = 314
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn34: TSpeedButton
|
||||
Left = 463
|
||||
Top = 314
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn35: TSpeedButton
|
||||
Left = 551
|
||||
Top = 314
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn36: TSpeedButton
|
||||
Left = 639
|
||||
Top = 314
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn62: TSpeedButton
|
||||
Left = 23
|
||||
Top = 392
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn37: TSpeedButton
|
||||
Left = 111
|
||||
Top = 392
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn38: TSpeedButton
|
||||
Left = 199
|
||||
Top = 392
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn39: TSpeedButton
|
||||
Left = 287
|
||||
Top = 392
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn40: TSpeedButton
|
||||
Left = 375
|
||||
Top = 392
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn41: TSpeedButton
|
||||
Left = 463
|
||||
Top = 392
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn42: TSpeedButton
|
||||
Left = 551
|
||||
Top = 392
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn43: TSpeedButton
|
||||
Left = 639
|
||||
Top = 392
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn63: TSpeedButton
|
||||
Left = 23
|
||||
Top = 469
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn44: TSpeedButton
|
||||
Left = 111
|
||||
Top = 469
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn45: TSpeedButton
|
||||
Left = 199
|
||||
Top = 469
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn46: TSpeedButton
|
||||
Left = 287
|
||||
Top = 469
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn47: TSpeedButton
|
||||
Left = 375
|
||||
Top = 469
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn48: TSpeedButton
|
||||
Left = 463
|
||||
Top = 469
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn49: TSpeedButton
|
||||
Left = 551
|
||||
Top = 469
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn50: TSpeedButton
|
||||
Left = 639
|
||||
Top = 469
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn64: TSpeedButton
|
||||
Left = 23
|
||||
Top = 547
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn51: TSpeedButton
|
||||
Left = 111
|
||||
Top = 547
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn52: TSpeedButton
|
||||
Left = 199
|
||||
Top = 547
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn53: TSpeedButton
|
||||
Left = 287
|
||||
Top = 547
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn54: TSpeedButton
|
||||
Left = 375
|
||||
Top = 547
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn55: TSpeedButton
|
||||
Left = 463
|
||||
Top = 547
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn56: TSpeedButton
|
||||
Left = 551
|
||||
Top = 547
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn57: TSpeedButton
|
||||
Left = 639
|
||||
Top = 547
|
||||
Width = 70
|
||||
Height = 70
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 352
|
||||
Top = 626
|
||||
Width = 33
|
||||
Height = 19
|
||||
Caption = '1/1'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 199
|
||||
Top = 623
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = #19978#19968#39029
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
OnClick = Button1Click
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 445
|
||||
Top = 623
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = #19979#19968#39029
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
OnClick = Button2Click
|
||||
end
|
||||
end
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
end
|
||||
inherited ADOQueryBaseTemp: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
end
|
||||
object ADOTmp: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 120
|
||||
Top = 176
|
||||
end
|
||||
object ADOConnection1: TADOConnection
|
||||
LoginPrompt = False
|
||||
Left = 296
|
||||
Top = 192
|
||||
end
|
||||
object CDS_All: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 296
|
||||
Top = 272
|
||||
end
|
||||
end
|
||||
237
A00通用窗体/U_PositionSel.pas
Normal file
237
A00通用窗体/U_PositionSel.pas
Normal file
|
|
@ -0,0 +1,237 @@
|
|||
unit U_PositionSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, Buttons, DB, ADODB, U_BaseHelp, System.ImageList, Vcl.ImgList,
|
||||
Datasnap.DBClient, Vcl.StdCtrls, math;
|
||||
|
||||
type
|
||||
TfrmPositionSel = class(TfrmBaseHelp)
|
||||
ScrollBox1: TScrollBox;
|
||||
btn1: TSpeedButton;
|
||||
btn2: TSpeedButton;
|
||||
btn3: TSpeedButton;
|
||||
btn4: TSpeedButton;
|
||||
btn5: TSpeedButton;
|
||||
btn6: TSpeedButton;
|
||||
btn7: TSpeedButton;
|
||||
btn8: TSpeedButton;
|
||||
btn58: TSpeedButton;
|
||||
btn9: TSpeedButton;
|
||||
btn10: TSpeedButton;
|
||||
btn11: TSpeedButton;
|
||||
btn12: TSpeedButton;
|
||||
btn13: TSpeedButton;
|
||||
btn14: TSpeedButton;
|
||||
btn15: TSpeedButton;
|
||||
btn59: TSpeedButton;
|
||||
btn16: TSpeedButton;
|
||||
btn17: TSpeedButton;
|
||||
btn18: TSpeedButton;
|
||||
btn19: TSpeedButton;
|
||||
btn20: TSpeedButton;
|
||||
btn21: TSpeedButton;
|
||||
btn22: TSpeedButton;
|
||||
btn60: TSpeedButton;
|
||||
btn23: TSpeedButton;
|
||||
btn24: TSpeedButton;
|
||||
btn25: TSpeedButton;
|
||||
btn26: TSpeedButton;
|
||||
btn27: TSpeedButton;
|
||||
btn28: TSpeedButton;
|
||||
btn29: TSpeedButton;
|
||||
btn61: TSpeedButton;
|
||||
btn30: TSpeedButton;
|
||||
btn31: TSpeedButton;
|
||||
btn32: TSpeedButton;
|
||||
btn33: TSpeedButton;
|
||||
btn34: TSpeedButton;
|
||||
btn35: TSpeedButton;
|
||||
btn36: TSpeedButton;
|
||||
btn62: TSpeedButton;
|
||||
btn37: TSpeedButton;
|
||||
btn38: TSpeedButton;
|
||||
btn39: TSpeedButton;
|
||||
btn40: TSpeedButton;
|
||||
btn41: TSpeedButton;
|
||||
btn42: TSpeedButton;
|
||||
btn43: TSpeedButton;
|
||||
btn63: TSpeedButton;
|
||||
btn44: TSpeedButton;
|
||||
btn45: TSpeedButton;
|
||||
btn46: TSpeedButton;
|
||||
btn47: TSpeedButton;
|
||||
btn48: TSpeedButton;
|
||||
btn49: TSpeedButton;
|
||||
btn50: TSpeedButton;
|
||||
btn64: TSpeedButton;
|
||||
btn51: TSpeedButton;
|
||||
btn52: TSpeedButton;
|
||||
btn53: TSpeedButton;
|
||||
btn54: TSpeedButton;
|
||||
btn55: TSpeedButton;
|
||||
btn56: TSpeedButton;
|
||||
btn57: TSpeedButton;
|
||||
ADOTmp: TADOQuery;
|
||||
ADOConnection1: TADOConnection;
|
||||
CDS_All: TClientDataSet;
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
Label1: TLabel;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure btn1Click(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
FPOSNO: string;
|
||||
FPage: Integer;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmPositionSel: TfrmPositionSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmPositionSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmPositionSel := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmPositionSel.InitGrid();
|
||||
var
|
||||
i: Integer;
|
||||
str: string;
|
||||
begin
|
||||
|
||||
with ADOTmp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select POSNO,POSName ');
|
||||
sql.Add(',ROW_NUMBER() over(order by A.POSNO) as keyNo ');
|
||||
sql.Add('from Bs_Position A ');
|
||||
SQL.Add('order by POSNO,POSName ');
|
||||
Open;
|
||||
end;
|
||||
if ADOTmp.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('没有定义数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
SCreateCDS(ADOTmp, CDS_All);
|
||||
SInitCDSData(ADOTmp, CDS_All);
|
||||
|
||||
if CDS_All.RecordCount < FPage * 64 then
|
||||
begin
|
||||
FPage := FPage - 1;
|
||||
end;
|
||||
if FPage <= 0 then
|
||||
begin
|
||||
FPage := 1;
|
||||
end;
|
||||
if CDS_All.RecordCount mod 64 > 0 then
|
||||
Label1.Caption := IntToStr(FPage) + '/' + IntToStr(Floor(CDS_All.RecordCount / 64 + 1))
|
||||
else
|
||||
Label1.Caption := IntToStr(FPage) + '/' + IntToStr(Floor(CDS_All.RecordCount / 64));
|
||||
|
||||
for i := 0 to 63 do
|
||||
begin
|
||||
if CDS_All.Locate('keyNo', (FPage - 1) * 64 + i + 1, []) then
|
||||
begin
|
||||
with ScrollBox1 do
|
||||
begin
|
||||
TSpeedButton(Controls[i]).Visible := True;
|
||||
TSpeedButton(Controls[i]).Hint := CDS_All.fieldbyname('POSNO').AsString;
|
||||
TSpeedButton(Controls[i]).Caption := CDS_All.fieldbyname('POSNO').AsString;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
with ScrollBox1 do
|
||||
begin
|
||||
TSpeedButton(Controls[i]).Visible := False;
|
||||
TSpeedButton(Controls[i]).Hint := '';
|
||||
TSpeedButton(Controls[i]).Caption := '';
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPositionSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FPage := 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmPositionSel.btn1Click(Sender: TObject);
|
||||
begin
|
||||
FPOSNO := Trim(TSpeedButton(Sender).Hint);
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmPositionSel.Button1Click(Sender: TObject);
|
||||
begin
|
||||
FPage := FPage - 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmPositionSel.Button2Click(Sender: TObject);
|
||||
begin
|
||||
FPage := FPage + 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmPositionSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
inherited;
|
||||
// Action:=caHide;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmPositionSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
{if Application.MessageBox('网络连接失败,是否要再次连接?','提示',32+4)=IDYES then
|
||||
begin
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected:=false;
|
||||
ConnectionString:=DConString;
|
||||
//ConnectionString:='23242';
|
||||
Connected:=true;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end; }
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
4663
A00通用窗体/U_ProductInfoSel.dfm
Normal file
4663
A00通用窗体/U_ProductInfoSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
182
A00通用窗体/U_ProductInfoSel.pas
Normal file
182
A00通用窗体/U_ProductInfoSel.pas
Normal file
|
|
@ -0,0 +1,182 @@
|
|||
unit U_ProductInfoSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseHelp, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
||||
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxNavigator,
|
||||
dxDateRanges, dxBarBuiltInMenu, System.ImageList, U_BaseInput, cxButtonEdit,
|
||||
cxDropDownEdit;
|
||||
|
||||
type
|
||||
TfrmProductInfoSel = class(TfrmBaseHelp)
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
ADOConnection1: TADOConnection;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
CoName: TEdit;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
ImageList1: TImageList;
|
||||
ThreeColorBase: TcxStyleRepository;
|
||||
SHuangSe: TcxStyle;
|
||||
SkyBlue: TcxStyle;
|
||||
Default: TcxStyle;
|
||||
QHuangSe: TcxStyle;
|
||||
Red: TcxStyle;
|
||||
FontBlue: TcxStyle;
|
||||
TextSHuangSe: TcxStyle;
|
||||
FonePurple: TcxStyle;
|
||||
FoneClMaroon: TcxStyle;
|
||||
FoneRed: TcxStyle;
|
||||
RowColor: TcxStyle;
|
||||
handBlack: TcxStyle;
|
||||
cxBlue: TcxStyle;
|
||||
SHuangSeCu: TcxStyle;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
cxGrid2Level1: TcxGridLevel;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure TV1DblClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure CoNameChange(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
FSTKName: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmProductInfoSel: TfrmProductInfoSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmProductInfoSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
application.MessageBox('网络连接失败!', '提示信息');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmProductInfoSel.CoNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmProductInfoSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
CoName.SetFocus;
|
||||
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmProductInfoSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from BS_Product_Info A');
|
||||
sql.Add(' where isnull(STKNAME,'''')=''' + Trim(FSTKName) + '''');
|
||||
Open;
|
||||
end;
|
||||
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmProductInfoSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
ReadCxGrid('物料类型' + Trim(FSTKName), TV1, '通用窗体');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmProductInfoSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmProductInfoSel.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('物料类型' + Trim(FSTKName), TV1, '通用窗体');
|
||||
end;
|
||||
|
||||
procedure TfrmProductInfoSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
CoName.SetFocus;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmProductInfoSel.TV1DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmProductInfoSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmProductInfoSel := nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
4810
A00通用窗体/U_SalesContractSel.dfm
Normal file
4810
A00通用窗体/U_SalesContractSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
216
A00通用窗体/U_SalesContractSel.pas
Normal file
216
A00通用窗体/U_SalesContractSel.pas
Normal file
|
|
@ -0,0 +1,216 @@
|
|||
unit U_SalesContractSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseHelp, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
||||
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxNavigator,
|
||||
dxDateRanges, dxBarBuiltInMenu, System.ImageList, U_BaseInput, cxButtonEdit,
|
||||
cxDropDownEdit, cxCheckBox, Vcl.Menus;
|
||||
|
||||
type
|
||||
TfrmSalesContractSel = class(TfrmBaseHelp)
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
ADOConnection1: TADOConnection;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
ConNo: TEdit;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
ImageList1: TImageList;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
cxStyle1: TcxStyle;
|
||||
cxGrid1: TcxGrid;
|
||||
TV1: TcxGridDBTableView;
|
||||
VC_SCSCode: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1PRTOrderQty: TcxGridDBColumn;
|
||||
v1OrderUnit: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
TV1Column1: TcxGridDBColumn;
|
||||
TV1Column2: TcxGridDBColumn;
|
||||
TV1Column3: TcxGridDBColumn;
|
||||
TV1Column4: TcxGridDBColumn;
|
||||
TV1Column5: TcxGridDBColumn;
|
||||
TV1Column6: TcxGridDBColumn;
|
||||
ThreeColorBase: TcxStyleRepository;
|
||||
SHuangSe: TcxStyle;
|
||||
SkyBlue: TcxStyle;
|
||||
Default: TcxStyle;
|
||||
QHuangSe: TcxStyle;
|
||||
Red: TcxStyle;
|
||||
FontBlue: TcxStyle;
|
||||
TextSHuangSe: TcxStyle;
|
||||
FonePurple: TcxStyle;
|
||||
FoneClMaroon: TcxStyle;
|
||||
FoneRed: TcxStyle;
|
||||
RowColor: TcxStyle;
|
||||
handBlack: TcxStyle;
|
||||
cxBlue: TcxStyle;
|
||||
SHuangSeCu: TcxStyle;
|
||||
TV1Column7: TcxGridDBColumn;
|
||||
PM_1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
Label2: TLabel;
|
||||
C_Name: TEdit;
|
||||
Label3: TLabel;
|
||||
BuyName: TEdit;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure TV1DblClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure ConNoChange(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
FCoType, FAuthority: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmSalesContractSel: TfrmSalesContractSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmSalesContractSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
application.MessageBox('网络连接失败!', '提示信息');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSalesContractSel.ConNoChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmSalesContractSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
ConNo.SetFocus;
|
||||
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmSalesContractSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* from BS_Contract_Main A inner join BS_Contract_Sub B on A.ConMId=B.ConMId ');
|
||||
sql.Add(' and isnull(A.status,''0'')=''9''');
|
||||
Open;
|
||||
end;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSalesContractSel.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_1, True);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmSalesContractSel.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_1, False);
|
||||
end;
|
||||
|
||||
procedure TfrmSalesContractSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
InitGrid();
|
||||
|
||||
ReadCxGrid(Trim(self.Caption), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmSalesContractSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmSalesContractSel.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(Trim(self.Caption), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmSalesContractSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ConNo.SetFocus;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmSalesContractSel.TV1DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmSalesContractSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmSalesContractSel := nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
4847
A00通用窗体/U_TatClothInfoSel.dfm
Normal file
4847
A00通用窗体/U_TatClothInfoSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
304
A00通用窗体/U_TatClothInfoSel.pas
Normal file
304
A00通用窗体/U_TatClothInfoSel.pas
Normal file
|
|
@ -0,0 +1,304 @@
|
|||
unit U_TatClothInfoSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseHelp, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
||||
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxNavigator,
|
||||
dxDateRanges, dxBarBuiltInMenu, System.ImageList, U_BaseInput, cxTL,
|
||||
cxMaskEdit, cxTLdxBarBuiltInMenu, cxCheckBox, cxInplaceContainer, cxDBTL,
|
||||
cxTLData, math;
|
||||
|
||||
type
|
||||
TfrmTatClothInfoSel = class(TfrmBaseHelp)
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
ADOConnection1: TADOConnection;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
ImageList1: TImageList;
|
||||
cxDBTreeList1: TcxDBTreeList;
|
||||
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||
DS_Tree: TDataSource;
|
||||
CDS_Tree: TClientDataSet;
|
||||
ADOQueryTree: TADOQuery;
|
||||
Panel3: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1SSel: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
v1CYNo: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
Tv1Column11: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
Panel7: TPanel;
|
||||
Panel4: TPanel;
|
||||
Label14: TLabel;
|
||||
LBCPAP1: TLabel;
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
TCBNOR1: TComboBox;
|
||||
Panel1: TPanel;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
Label9: TLabel;
|
||||
Label8: TLabel;
|
||||
C_Code: TEdit;
|
||||
C_Name: TEdit;
|
||||
C_GramWeight: TEdit;
|
||||
C_Width: TEdit;
|
||||
ThreeColorBase: TcxStyleRepository;
|
||||
SHuangSe: TcxStyle;
|
||||
SkyBlue: TcxStyle;
|
||||
Default: TcxStyle;
|
||||
QHuangSe: TcxStyle;
|
||||
Red: TcxStyle;
|
||||
FontBlue: TcxStyle;
|
||||
TextSHuangSe: TcxStyle;
|
||||
FonePurple: TcxStyle;
|
||||
FoneClMaroon: TcxStyle;
|
||||
FoneRed: TcxStyle;
|
||||
RowColor: TcxStyle;
|
||||
handBlack: TcxStyle;
|
||||
cxBlue: TcxStyle;
|
||||
SHuangSeCu: TcxStyle;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure TV1DblClick(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure TCBNOR1Change(Sender: TObject);
|
||||
procedure C_NameChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure cxDBTreeList1DblClick(Sender: TObject);
|
||||
private
|
||||
CurrentPage, RecordsNumber: Integer;
|
||||
procedure InitGrid();
|
||||
procedure InitTree();
|
||||
{ Private declarations }
|
||||
public
|
||||
FCoType: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmTatClothInfoSel: TfrmTatClothInfoSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmTatClothInfoSel.InitTree();
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
|
||||
with ADOQueryTree do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from BS_Cloth_Type where CTType=''梭织'' ');
|
||||
Open;
|
||||
end;
|
||||
|
||||
SCreateCDS(ADOQueryTree, CDS_Tree);
|
||||
SInitCDSData(ADOQueryTree, CDS_Tree);
|
||||
cxDBTreeList1.Items[0].Expand(false);
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
{if Application.MessageBox('网络连接失败,是否要再次连接?','提示',32+4)=IDYES then
|
||||
begin
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected:=false;
|
||||
ConnectionString:=DConString;
|
||||
//ConnectionString:='23242';
|
||||
Connected:=true;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end; }
|
||||
//frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoSel.Button1Click(Sender: TObject);
|
||||
begin
|
||||
if CurrentPage > 1 then
|
||||
CurrentPage := CurrentPage - 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoSel.Button2Click(Sender: TObject);
|
||||
begin
|
||||
if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then
|
||||
CurrentPage := CurrentPage + 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoSel.cxDBTreeList1DblClick(Sender: TObject);
|
||||
begin
|
||||
CurrentPage := 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoSel.C_NameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
C_Code.SetFocus;
|
||||
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoSel.InitGrid();
|
||||
var
|
||||
fwhere, MBCIID, Pwhere: string;
|
||||
begin
|
||||
|
||||
if not CDS_1.IsEmpty then
|
||||
MBCIID := Trim(CDS_1.FieldByName('BCIID').AsString)
|
||||
else
|
||||
MBCIID := '';
|
||||
|
||||
Pwhere := SGetFilters(Panel1, 1, 2);
|
||||
|
||||
if trim(Pwhere) <> '' then
|
||||
begin
|
||||
if fwhere <> '' then
|
||||
fwhere := fwhere + ' and ' + trim(Pwhere)
|
||||
else
|
||||
fwhere := ' where ' + trim(Pwhere);
|
||||
end;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
Filtered := False;
|
||||
sql.Clear;
|
||||
sql.Add(' exec P_BS_CloInfo_Get ');
|
||||
sql.Add(' @CTID=' + quotedstr(Trim(CDS_Tree.fieldbyname('CTID').AsString)));
|
||||
sql.Add(',@pageIndex=' + inttostr(CurrentPage));
|
||||
sql.Add(',@pageSize=' + inttostr(RecordsNumber));
|
||||
sql.Add(',@criteria= ' + quotedstr(fwhere));
|
||||
// ShowMessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
TV1.DataController.Filter.Clear;
|
||||
LBCPAP1.Caption := inttostr(CurrentPage) + '/' + inttostr(ceil(CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber));
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
TV1.DataController.Filter.Clear;
|
||||
end;
|
||||
|
||||
if MBCIID <> '' then
|
||||
CDS_1.Locate('BCIID', MBCIID, []);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
RecordsNumber := 500;
|
||||
CurrentPage := 1;
|
||||
|
||||
ReadCxGrid('单位名称' + Trim(FCoType), TV1, '自定义数据');
|
||||
|
||||
InitTree();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoSel.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('单位名称' + Trim(FCoType), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoSel.TCBNOR1Change(Sender: TObject);
|
||||
begin
|
||||
RecordsNumber := StrToInt(TCBNOR1.Text);
|
||||
CurrentPage := 1;
|
||||
C_Code.SetFocus;
|
||||
InitGrid();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoSel.TV1DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmTatClothInfoSel := nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
3927
A00通用窗体/U_UserSel.dfm
Normal file
3927
A00通用窗体/U_UserSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
199
A00通用窗体/U_UserSel.pas
Normal file
199
A00通用窗体/U_UserSel.pas
Normal file
|
|
@ -0,0 +1,199 @@
|
|||
unit U_UserSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, ComObj, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
dxSkinsCore, dxSkinsDefaultPainters, cxNavigator, dxDateRanges, U_BaseHelp,
|
||||
dxBarBuiltInMenu, System.ImageList, Vcl.ImgList;
|
||||
|
||||
type
|
||||
FdDy = record
|
||||
inc: integer; //客户端套接字句柄
|
||||
FDdys: string[32]; //客户端套接字
|
||||
FdDysName: string[32]; //客户端套接字
|
||||
end;
|
||||
|
||||
TfrmUserSel = class(TfrmBaseHelp)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
Label3: TLabel;
|
||||
UserName: TEdit;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
Label1: TLabel;
|
||||
UserID: TEdit;
|
||||
btnOK: TToolButton;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column2: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
VC_SSel: TcxGridDBColumn;
|
||||
ADOConnection1: TADOConnection;
|
||||
ImageList1: TImageList;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure UserNameChange(Sender: TObject);
|
||||
procedure btnOKClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
Fdept: string;
|
||||
FMultiple: Boolean;
|
||||
end;
|
||||
|
||||
var
|
||||
frmUserSel: TfrmUserSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmUserSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from SY_User where 1=1 ');
|
||||
|
||||
// if Trim(Fdept) <> '' then
|
||||
// begin
|
||||
// sql.Add('and Udept=' + QuotedStr(Trim(Fdept)));
|
||||
// end;
|
||||
Open;
|
||||
end;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmUserSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
application.MessageBox('网络连接失败!', '提示信息');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmUserSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmUserSel := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmUserSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
inherited;
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmUserSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(trim(self.caption), Tv1, '账户选择');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmUserSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
ReadCxGrid(trim(self.Caption), Tv1, '账户选择');
|
||||
if FMultiple then
|
||||
begin
|
||||
VC_SSel.Visible := True;
|
||||
VC_SSel.Hidden := False;
|
||||
end
|
||||
else
|
||||
begin
|
||||
VC_SSel.Visible := False;
|
||||
VC_SSel.Hidden := True;
|
||||
end;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmUserSel.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmUserSel.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmUserSel.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmUserSel.UserNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmUserSel.btnOKClick(Sender: TObject);
|
||||
begin
|
||||
if FMultiple then
|
||||
begin
|
||||
if not CDS_1.Locate('SSel', true, []) then
|
||||
begin
|
||||
Application.MessageBox('请选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
4663
A00通用窗体/U_WBSpecSel.dfm
Normal file
4663
A00通用窗体/U_WBSpecSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
201
A00通用窗体/U_WBSpecSel.pas
Normal file
201
A00通用窗体/U_WBSpecSel.pas
Normal file
|
|
@ -0,0 +1,201 @@
|
|||
unit U_WBSpecSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseHelp, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
||||
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxNavigator,
|
||||
dxDateRanges, dxBarBuiltInMenu, System.ImageList, U_BaseInput, cxButtonEdit,
|
||||
cxCheckBox, Vcl.Menus;
|
||||
|
||||
type
|
||||
TfrmWBSpecSel = class(TfrmBaseHelp)
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
ADOConnection1: TADOConnection;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
WB_Spec: TEdit;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
ImageList1: TImageList;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
v1SPSpec: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
ThreeColorBase: TcxStyleRepository;
|
||||
SHuangSe: TcxStyle;
|
||||
SkyBlue: TcxStyle;
|
||||
Default: TcxStyle;
|
||||
QHuangSe: TcxStyle;
|
||||
Red: TcxStyle;
|
||||
FontBlue: TcxStyle;
|
||||
TextSHuangSe: TcxStyle;
|
||||
FonePurple: TcxStyle;
|
||||
FoneClMaroon: TcxStyle;
|
||||
FoneRed: TcxStyle;
|
||||
RowColor: TcxStyle;
|
||||
handBlack: TcxStyle;
|
||||
cxBlue: TcxStyle;
|
||||
SHuangSeCu: TcxStyle;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
PM_1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure TV1DblClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure WB_SpecChange(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
FSTKName, FAuthority, FYType: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmWBSpecSel: TfrmWBSpecSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmWBSpecSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
application.MessageBox('网络连接失败!', '提示信息');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmWBSpecSel.WB_SpecChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmWBSpecSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
WB_Spec.SetFocus;
|
||||
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmWBSpecSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from Tat_WB_Spec A');
|
||||
// if Trim(FYType) <> '' then
|
||||
// sql.Add(' where Y_Type=' + QuotedStr(FYType));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmWBSpecSel.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_1, true);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmWBSpecSel.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_1, False);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmWBSpecSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
InitGrid();
|
||||
|
||||
ReadCxGrid('单位名称' + Trim(FSTKName), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmWBSpecSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmWBSpecSel.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('单位名称' + Trim(FSTKName), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmWBSpecSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
WB_Spec.SetFocus;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmWBSpecSel.TV1DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmWBSpecSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmWBSpecSel := nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
4685
A00通用窗体/U_YarnInfoSel.dfm
Normal file
4685
A00通用窗体/U_YarnInfoSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
204
A00通用窗体/U_YarnInfoSel.pas
Normal file
204
A00通用窗体/U_YarnInfoSel.pas
Normal file
|
|
@ -0,0 +1,204 @@
|
|||
unit U_YarnInfoSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseHelp, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
||||
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxNavigator,
|
||||
dxDateRanges, dxBarBuiltInMenu, System.ImageList, U_BaseInput, cxButtonEdit,
|
||||
cxCheckBox, Vcl.Menus;
|
||||
|
||||
type
|
||||
TfrmYarnInfoSel = class(TfrmBaseHelp)
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
ADOConnection1: TADOConnection;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Y_Name: TEdit;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
ImageList1: TImageList;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
v1SPName: TcxGridDBColumn;
|
||||
v1SPSpec: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1QtyUnit: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
ThreeColorBase: TcxStyleRepository;
|
||||
SHuangSe: TcxStyle;
|
||||
SkyBlue: TcxStyle;
|
||||
Default: TcxStyle;
|
||||
QHuangSe: TcxStyle;
|
||||
Red: TcxStyle;
|
||||
FontBlue: TcxStyle;
|
||||
TextSHuangSe: TcxStyle;
|
||||
FonePurple: TcxStyle;
|
||||
FoneClMaroon: TcxStyle;
|
||||
FoneRed: TcxStyle;
|
||||
RowColor: TcxStyle;
|
||||
handBlack: TcxStyle;
|
||||
cxBlue: TcxStyle;
|
||||
SHuangSeCu: TcxStyle;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
PM_1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure TV1DblClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure Y_NameChange(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
FSTKName, FAuthority, FYType: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmYarnInfoSel: TfrmYarnInfoSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmYarnInfoSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
application.MessageBox('网络连接失败!', '提示信息');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYarnInfoSel.Y_NameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYarnInfoSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
Y_Name.SetFocus;
|
||||
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmYarnInfoSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from BS_Yarn_Info A');
|
||||
if Trim(FYType) <> '' then
|
||||
sql.Add(' where Y_Type=' + QuotedStr(FYType));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYarnInfoSel.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_1, true);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYarnInfoSel.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_1, False);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYarnInfoSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
InitGrid();
|
||||
|
||||
ReadCxGrid('单位名称' + Trim(FSTKName), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYarnInfoSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmYarnInfoSel.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('单位名称' + Trim(FSTKName), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYarnInfoSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
Y_Name.SetFocus;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmYarnInfoSel.TV1DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmYarnInfoSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmYarnInfoSel := nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
4810
A00通用窗体/U_YarnPurchasePlanSel.dfm
Normal file
4810
A00通用窗体/U_YarnPurchasePlanSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
247
A00通用窗体/U_YarnPurchasePlanSel.pas
Normal file
247
A00通用窗体/U_YarnPurchasePlanSel.pas
Normal file
|
|
@ -0,0 +1,247 @@
|
|||
unit U_YarnPurchasePlanSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseHelp, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
||||
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxNavigator,
|
||||
dxDateRanges, dxBarBuiltInMenu, System.ImageList, U_BaseInput, cxButtonEdit,
|
||||
cxCheckBox, Vcl.Menus, cxCalendar, cxPC;
|
||||
|
||||
type
|
||||
TfrmYarnPurchasePlanSel = class(TfrmBaseHelp)
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
ADOConnection1: TADOConnection;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Y_Spec: TEdit;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
ImageList1: TImageList;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1SPName: TcxGridDBColumn;
|
||||
v1SPSpec: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1QtyUnit: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
ThreeColorBase: TcxStyleRepository;
|
||||
SHuangSe: TcxStyle;
|
||||
SkyBlue: TcxStyle;
|
||||
Default: TcxStyle;
|
||||
QHuangSe: TcxStyle;
|
||||
Red: TcxStyle;
|
||||
FontBlue: TcxStyle;
|
||||
TextSHuangSe: TcxStyle;
|
||||
FonePurple: TcxStyle;
|
||||
FoneClMaroon: TcxStyle;
|
||||
FoneRed: TcxStyle;
|
||||
RowColor: TcxStyle;
|
||||
handBlack: TcxStyle;
|
||||
cxBlue: TcxStyle;
|
||||
SHuangSeCu: TcxStyle;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
PM_1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
Tv1Column8: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
Tv1Column9: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
Y_Name: TEdit;
|
||||
Label3: TLabel;
|
||||
SellName: TEdit;
|
||||
Label4: TLabel;
|
||||
PurNo: TEdit;
|
||||
Label5: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
IsJYTime: TCheckBox;
|
||||
Tv1Column10: TcxGridDBColumn;
|
||||
cxTabControl1: TcxTabControl;
|
||||
ToolButton2: TToolButton;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure TV1DblClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure Y_SpecChange(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
FSTKName, FAuthority: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmYarnPurchasePlanSel: TfrmYarnPurchasePlanSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmYarnPurchasePlanSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
application.MessageBox('网络连接失败!', '提示信息');
|
||||
end;
|
||||
EndDate.DateTime := SGetServerDate(ADOQueryTemp);
|
||||
BegDate.DateTime := EndDate.DateTime - 90;
|
||||
end;
|
||||
|
||||
procedure TfrmYarnPurchasePlanSel.Y_SpecChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYarnPurchasePlanSel.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmYarnPurchasePlanSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
Y_Name.SetFocus;
|
||||
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmYarnPurchasePlanSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.*,B.* ');
|
||||
sql.Add(' from Pur_YarnPlan_Main A');
|
||||
sql.Add(' inner join BS_YarnPurPlan_Sub B on A.PurMId=B.PurMId');
|
||||
sql.Add(' where isnull(A.status,''0'')=''9''');
|
||||
sql.add(' and A.ConDate>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + '''');
|
||||
sql.Add(' and A.ConDate<''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + '''');
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
sql.Add(' and not EXISTS (select X.FromSubID from BS_Yarn_IO X where X.FromSubID=B.PurSId) ');
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
sql.Add(' and EXISTS (select X.FromSubID from BS_Yarn_IO X where X.FromSubID=B.PurSId) ');
|
||||
end;
|
||||
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYarnPurchasePlanSel.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_1, true);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYarnPurchasePlanSel.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_1, False);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYarnPurchasePlanSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
InitGrid();
|
||||
|
||||
ReadCxGrid(self.Caption, TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYarnPurchasePlanSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmYarnPurchasePlanSel.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(self.Caption, TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYarnPurchasePlanSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
Y_Name.SetFocus;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmYarnPurchasePlanSel.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmYarnPurchasePlanSel.TV1DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmYarnPurchasePlanSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmYarnPurchasePlanSel := nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
144
A00通用窗体/getpic.dfm
Normal file
144
A00通用窗体/getpic.dfm
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
object FormGetPic: TFormGetPic
|
||||
Left = 697
|
||||
Top = 183
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsSingle
|
||||
Caption = #33719#21462#22270#29255
|
||||
ClientHeight = 449
|
||||
ClientWidth = 670
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poDesktopCenter
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object Image2: TImage
|
||||
Left = 464
|
||||
Top = 8
|
||||
Width = 160
|
||||
Height = 120
|
||||
end
|
||||
object SpeedButton1: TSpeedButton
|
||||
Left = 500
|
||||
Top = 334
|
||||
Width = 80
|
||||
Height = 22
|
||||
Caption = #25171#24320#22270#29255'...'
|
||||
OnClick = SpeedButton1Click
|
||||
end
|
||||
object SpeedButton2: TSpeedButton
|
||||
Left = 500
|
||||
Top = 380
|
||||
Width = 80
|
||||
Height = 22
|
||||
Caption = #30830#23450
|
||||
Enabled = False
|
||||
OnClick = SpeedButton2Click
|
||||
end
|
||||
object SpeedButton3: TSpeedButton
|
||||
Left = 500
|
||||
Top = 426
|
||||
Width = 80
|
||||
Height = 22
|
||||
Caption = #25918#24323
|
||||
OnClick = SpeedButton3Click
|
||||
end
|
||||
object SpeedButton4: TSpeedButton
|
||||
Left = 500
|
||||
Top = 358
|
||||
Width = 80
|
||||
Height = 22
|
||||
Caption = #22270#29255#21478#23384'...'
|
||||
OnClick = SpeedButton4Click
|
||||
end
|
||||
object SpeedButton5: TSpeedButton
|
||||
Left = 500
|
||||
Top = 404
|
||||
Width = 80
|
||||
Height = 22
|
||||
Caption = #21024#38500
|
||||
OnClick = SpeedButton5Click
|
||||
end
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 5
|
||||
Top = 5
|
||||
Width = 300
|
||||
Height = 400
|
||||
HorzScrollBar.Visible = False
|
||||
VertScrollBar.Visible = False
|
||||
TabOrder = 0
|
||||
object Image1: TImage
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 296
|
||||
Height = 396
|
||||
Cursor = crSizeAll
|
||||
Align = alClient
|
||||
Center = True
|
||||
IncrementalDisplay = True
|
||||
Stretch = True
|
||||
OnMouseDown = Image1MouseDown
|
||||
OnMouseMove = Image1MouseMove
|
||||
ExplicitLeft = -2
|
||||
ExplicitTop = 3
|
||||
ExplicitWidth = 275
|
||||
ExplicitHeight = 436
|
||||
end
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 464
|
||||
Top = 252
|
||||
Width = 81
|
||||
Height = 21
|
||||
Caption = #25171#24320#25668#20687#22836
|
||||
TabOrder = 1
|
||||
OnClick = Button1Click
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 560
|
||||
Top = 252
|
||||
Width = 81
|
||||
Height = 21
|
||||
Caption = #25235#22270
|
||||
TabOrder = 2
|
||||
OnClick = Button2Click
|
||||
end
|
||||
object OpenPictureDialog1: TOpenPictureDialog
|
||||
Left = 336
|
||||
Top = 176
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_YPGL.ADOLink
|
||||
Parameters = <>
|
||||
Left = 504
|
||||
Top = 280
|
||||
end
|
||||
object SaveDialog1: TSavePictureDialog
|
||||
Left = 344
|
||||
Top = 251
|
||||
end
|
||||
object adoqueryImage: TADOQuery
|
||||
Connection = DataLink_YPGL.ADOLink
|
||||
Parameters = <>
|
||||
Left = 488
|
||||
Top = 184
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
ConnectTimeout = 0
|
||||
NATKeepAlive.UseKeepAlive = False
|
||||
NATKeepAlive.IdleTimeMS = 0
|
||||
NATKeepAlive.IntervalMS = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
ReadTimeout = 0
|
||||
Left = 492
|
||||
Top = 134
|
||||
end
|
||||
end
|
||||
669
A00通用窗体/getpic.pas
Normal file
669
A00通用窗体/getpic.pas
Normal file
|
|
@ -0,0 +1,669 @@
|
|||
unit getpic;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, strUtils, Variants, Classes, Graphics, Controls,
|
||||
Forms, Dialogs, ComCtrls, ToolWin, ExtCtrls, jpeg, IniFiles, ExtDlgs, Buttons,
|
||||
StdCtrls, DB, ADODB, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, IdExplicitTLSClientServerBase;
|
||||
|
||||
type
|
||||
TFormGetPic = class(TForm)
|
||||
ScrollBox1: TScrollBox;
|
||||
Image1: TImage;
|
||||
OpenPictureDialog1: TOpenPictureDialog;
|
||||
Image2: TImage;
|
||||
SpeedButton1: TSpeedButton;
|
||||
SpeedButton2: TSpeedButton;
|
||||
SpeedButton3: TSpeedButton;
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
ADOQuery1: TADOQuery;
|
||||
SpeedButton4: TSpeedButton;
|
||||
SaveDialog1: TSavePictureDialog;
|
||||
adoqueryImage: TADOQuery;
|
||||
IdFTP1: TIdFTP;
|
||||
SpeedButton5: TSpeedButton;
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure TwainTwainAcquire(Sender: TObject; const Index: Integer; Image: TBitmap; var Cancel: Boolean);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure Image1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure Image1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
||||
procedure SpeedButton1Click(Sender: TObject);
|
||||
procedure SpeedButton2Click(Sender: TObject);
|
||||
procedure SpeedButton3Click(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure SpeedButton4Click(Sender: TObject);
|
||||
procedure Initimage();
|
||||
procedure SpeedButton5Click(Sender: TObject);
|
||||
private
|
||||
hWndC: THandle;
|
||||
CapturingAVI: bool;
|
||||
{ Private declarations }
|
||||
ClickPos: TPoint;
|
||||
SelectedSource, PicLeft, PicTop, PicWidth, PicHeight: Integer;
|
||||
procedure CreThumb(Width, Height: Integer);
|
||||
function SaveImage(): Boolean;
|
||||
procedure Rotate90(Source: TGraphic; Target: TJpegImage);
|
||||
public
|
||||
FilePath: string;
|
||||
FileName: string;
|
||||
FTFType: string;
|
||||
pat1: string;
|
||||
pic1: string;
|
||||
fkeyNo, FMainId: string;
|
||||
fFlileFlag: string;
|
||||
FWidth, FHeight: INTEGER;
|
||||
{ Public declarations }
|
||||
MyJpeg: TJPEGImage;
|
||||
// JPStream: TMemoryStream;
|
||||
end;
|
||||
|
||||
var
|
||||
FormGetPic: TFormGetPic;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
const
|
||||
WM_CAP_START = WM_USER;
|
||||
|
||||
const
|
||||
WM_CAP_STOP = WM_CAP_START + 68;
|
||||
|
||||
const
|
||||
WM_CAP_DRIVER_CONNECT = WM_CAP_START + 10;
|
||||
|
||||
const
|
||||
WM_CAP_DRIVER_DISCONNECT = WM_CAP_START + 11;
|
||||
|
||||
const
|
||||
WM_CAP_SAVEDIB = WM_CAP_START + 25;
|
||||
|
||||
const
|
||||
WM_CAP_GRAB_FRAME = WM_CAP_START + 60;
|
||||
|
||||
const
|
||||
WM_CAP_SEQUENCE = WM_CAP_START + 62;
|
||||
|
||||
const
|
||||
WM_CAP_FILE_SET_CAPTURE_FILEA = WM_CAP_START + 20;
|
||||
|
||||
const
|
||||
WM_CAP_SEQUENCE_NOFILE = WM_CAP_START + 63;
|
||||
|
||||
const
|
||||
WM_CAP_SET_OVERLAY = WM_CAP_START + 51;
|
||||
|
||||
const
|
||||
WM_CAP_SET_PREVIEW = WM_CAP_START + 50;
|
||||
|
||||
const
|
||||
WM_CAP_SET_CALLBACK_VIDEOSTREAM = WM_CAP_START + 6;
|
||||
|
||||
const
|
||||
WM_CAP_SET_CALLBACK_ERROR = WM_CAP_START + 2;
|
||||
|
||||
const
|
||||
WM_CAP_SET_CALLBACK_STATUSA = WM_CAP_START + 3;
|
||||
|
||||
const
|
||||
WM_CAP_SET_CALLBACK_FRAME = WM_CAP_START + 5;
|
||||
|
||||
const
|
||||
WM_CAP_SET_SCALE = WM_CAP_START + 53;
|
||||
|
||||
const
|
||||
WM_CAP_SET_PREVIEWRATE = WM_CAP_START + 52;
|
||||
|
||||
function capCreateCaptureWindowA(lpszWindowName: PCHAR; dwStyle: longint; x: integer; y: integer; nWidth: integer; nHeight: integer; ParentWin: HWND; nId: integer): HWND; stdcall external 'AVICAP32.DLL';
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TFormGetPic.Rotate90(Source: TGraphic; Target: TJpegImage);
|
||||
var
|
||||
SourceBmp, TargetBmp: TBitmap;
|
||||
r, c: Integer;
|
||||
x, y: Integer;
|
||||
begin
|
||||
SourceBmp := TBitmap.Create;
|
||||
SourceBmp.Assign(Source);
|
||||
TargetBmp := TBitmap.Create;
|
||||
TargetBmp.Width := SourceBmp.Height;
|
||||
TargetBmp.Height := SourceBmp.Width;
|
||||
for r := 0 to SourceBmp.Height - 1 do
|
||||
begin
|
||||
for c := 0 to SourceBmp.Width - 1 do
|
||||
begin
|
||||
//x := (SourceBmp.Height-1) - r; // -90
|
||||
//y := c; //-90
|
||||
x := r; //90
|
||||
y := (SourceBmp.Width - 1) - c; //90
|
||||
// look into Bitmap.ScanLine for faster pixel access
|
||||
TargetBmp.Canvas.Pixels[x, y] := SourceBmp.Canvas.Pixels[c, r];
|
||||
end;
|
||||
end;
|
||||
Target.Assign(TargetBmp);
|
||||
SourceBmp.Free;
|
||||
TargetBmp.Free;
|
||||
end;
|
||||
|
||||
procedure TFormGetPic.Initimage();
|
||||
var
|
||||
jpg: TJpegImage;
|
||||
myStream: TADOBlobStream;
|
||||
sFieldName: string;
|
||||
JPStream: TMemoryStream;
|
||||
begin
|
||||
jpg := TJpegImage.Create();
|
||||
JPStream := TMemoryStream.Create;
|
||||
try
|
||||
|
||||
with adoqueryImage do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File where WBID=' + quotedstr(trim(FMainId)));
|
||||
sql.Add('and TFType=' + quotedstr(trim(FTFType)));
|
||||
open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
|
||||
if not fieldbyname(pic1).IsNull then
|
||||
begin
|
||||
myStream := tadoblobstream.Create(tblobfield(adoqueryImage.fieldbyname(pic1)), bmread);
|
||||
jpg.LoadFromStream(myStream);
|
||||
Image2.Picture.Assign(jpg);
|
||||
myStream.Free;
|
||||
|
||||
try
|
||||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI', 'SERVER', '服务器地址', '127.0.0.1');
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
;
|
||||
end;
|
||||
|
||||
JPStream.Clear;
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
try
|
||||
IdFTP1.Get(fFlileFlag + '\' + Trim(fieldbyname(pat1).AsString), JPStream);
|
||||
except
|
||||
Application.MessageBox('客户图样文件不存在', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox('无法连接文件服务器', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if IdFTP1.Connected then
|
||||
IdFTP1.Quit;
|
||||
JPStream.Position := 0;
|
||||
jpg.LoadFromStream(JPStream);
|
||||
Image1.Picture.Assign(jpg);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
jpg.free;
|
||||
JPStream.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TFormGetPic.SaveImage(): Boolean;
|
||||
var
|
||||
myStream: TADOBlobStream;
|
||||
maxNo: string;
|
||||
fNewFileName: string;
|
||||
begin
|
||||
//取文件后缀 ExtractFileExt(FilePath)
|
||||
|
||||
if fkeyNO = '' then
|
||||
begin
|
||||
fNewFileName := formatdatetime('yyyyMMddhhnnsszzz', now()) + ExtractFileExt(FilePath);
|
||||
fkeyNO := fNewFileName;
|
||||
end;
|
||||
|
||||
result := false;
|
||||
try
|
||||
with adoqueryImage do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File where WBID=' + quotedstr(trim(FMainId)));
|
||||
sql.Add('and TFType=' + quotedstr(trim(FTFType)));
|
||||
open;
|
||||
if RecordCount <= 0 then
|
||||
begin
|
||||
Append;
|
||||
if GetLSNo(ADOQuery1, maxNo, 'FJ', 'TP_File', 4, 1) = False then
|
||||
begin
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
fieldByName('TFID').AsString := maxNo;
|
||||
fieldByName('WBID').AsString := FMainId;
|
||||
end
|
||||
else
|
||||
begin
|
||||
edit;
|
||||
end;
|
||||
fieldByName(pat1).AsString := trim(fkeyNO);
|
||||
fieldByName('Filler').AsString := trim(dName);
|
||||
fieldByName('TFType').AsString := trim(FTFType);
|
||||
myStream := TADOBlobStream.Create(TBlobField(FieldByName(pic1)), bmWrite);
|
||||
MyJpeg.Assign(Image2.Picture.Graphic);
|
||||
MyJpeg.SaveToStream(myStream);
|
||||
myStream.Free;
|
||||
Post;
|
||||
end;
|
||||
|
||||
if FilePath <> '' then
|
||||
begin
|
||||
try
|
||||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI', 'SERVER', '服务器地址', '127.0.0.1');
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
// IdFTP1.Delete(fFlileFlag + '\' + Trim(fNewFileName));
|
||||
IdFTP1.Put(FilePath, fFlileFlag + '\' + Trim(fkeyNO));
|
||||
IdFTP1.Quit;
|
||||
except
|
||||
IdFTP1.Quit;
|
||||
Application.MessageBox('上传客户图样文件失败,请检查文件服务器!', '提示', MB_ICONWARNING);
|
||||
end;
|
||||
end;
|
||||
IdFTP1.Quit;
|
||||
|
||||
result := true;
|
||||
except
|
||||
myStream.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFormGetPic.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
Ini: TIniFile;
|
||||
begin
|
||||
// if Twain.LoadLibrary then
|
||||
// begin
|
||||
// {Load source manager}
|
||||
// Twain.SourceManagerLoaded := TRUE;
|
||||
// {Allow user to select source}
|
||||
// SelectedSource := Twain.SelectSource;
|
||||
// if SelectedSource <> -1 then
|
||||
// begin
|
||||
// Ini := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'scanner.ini');
|
||||
// try
|
||||
// Ini.WriteInteger( 'SCANNER', 'Scanner', SelectedSource);
|
||||
// finally
|
||||
// Ini.Free;
|
||||
// end;
|
||||
// end {if SelectedSource <> -1}
|
||||
// end
|
||||
// else
|
||||
// ShowMessage('未安装扫描仪');
|
||||
end;
|
||||
|
||||
procedure TFormGetPic.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
// if Twain.LoadLibrary then
|
||||
// begin
|
||||
// {Load source manager}
|
||||
// Twain.SourceManagerLoaded := TRUE;
|
||||
//
|
||||
// if SelectedSource <> -1 then
|
||||
// begin
|
||||
// {Load source, select transference method and enable (display interface)}
|
||||
// Twain.Source[SelectedSource].Loaded := TRUE;
|
||||
// Twain.Source[SelectedSource].SetICapUnits(tuInches);
|
||||
// Twain.Source[SelectedSource].SetImagelayoutFrame(PicLeft/25.4, PicTop/25.4, (PicLeft+PicWidth)/25.4, (PicTop+PicHeight)/25.4);
|
||||
// Twain.Source[SelectedSource].SetIYResolution(200);
|
||||
// Twain.Source[SelectedSource].SetIXResolution(200);
|
||||
// Twain.Source[SelectedSource].TransferMode := ttmMemory;
|
||||
// Twain.Source[SelectedSource].EnableSource(FALSE, TRUE);
|
||||
// while Twain.Source[SelectedSource].Enabled do Application.ProcessMessages;
|
||||
// end; {if SelectedSource <> -1}
|
||||
//// Twain.UnloadLibrary;
|
||||
// end
|
||||
// else
|
||||
// ShowMessage('未安装扫描仪');
|
||||
end;
|
||||
|
||||
procedure TFormGetPic.TwainTwainAcquire(Sender: TObject; const Index: Integer; Image: TBitmap; var Cancel: Boolean);
|
||||
begin
|
||||
Image1.Picture.Assign(Image);
|
||||
Cancel := TRUE;
|
||||
CreThumb(150, 150);
|
||||
SpeedButton2.Enabled := TRUE;
|
||||
end;
|
||||
|
||||
procedure TFormGetPic.FormShow(Sender: TObject);
|
||||
var
|
||||
Ini: TIniFile;
|
||||
begin
|
||||
{ Ini := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'scanner.ini');
|
||||
try
|
||||
SelectedSource := Ini.ReadInteger( 'SCANNER', 'Scanner', 0);
|
||||
PicLeft := Ini.ReadInteger( 'SCANNER', 'Left', 0);
|
||||
PicTop := Ini.ReadInteger( 'SCANNER', 'Top', 0);
|
||||
PicWidth := Ini.ReadInteger( 'SCANNER', 'Width', 100);
|
||||
PicHeight := Ini.ReadInteger( 'SCANNER', 'Height', 100);
|
||||
finally
|
||||
Ini.Free;
|
||||
end; }
|
||||
Initimage();
|
||||
end;
|
||||
|
||||
{
|
||||
procedure TFormGetPic.ToolButton6Click(Sender: TObject);
|
||||
var
|
||||
Ini: TIniFile;
|
||||
begin
|
||||
FormGetPos := TFormGetPos.Create(Self);
|
||||
FormGetPos.SpinEdit1.Value := PicLeft;
|
||||
FormGetPos.SpinEdit2.Value := PicTop;
|
||||
FormGetPos.SpinEdit3.Value := PicWidth;
|
||||
FormGetPos.SpinEdit4.Value := PicHeight;
|
||||
if FormGetPos.ShowModal = 1 then
|
||||
begin
|
||||
PicLeft := FormGetPos.SpinEdit1.Value;
|
||||
PicTop := FormGetPos.SpinEdit2.Value;
|
||||
PicWidth := FormGetPos.SpinEdit3.Value;
|
||||
PicHeight := FormGetPos.SpinEdit4.Value;
|
||||
|
||||
Ini := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'scanner.ini');
|
||||
try
|
||||
Ini.WriteInteger( 'SCANNER', 'Left', PicLeft);
|
||||
Ini.WriteInteger( 'SCANNER', 'Top', PicTop);
|
||||
Ini.WriteInteger( 'SCANNER', 'Width', PicWidth);
|
||||
Ini.WriteInteger( 'SCANNER', 'Height', PicHeight);
|
||||
finally
|
||||
Ini.Free;
|
||||
end;
|
||||
end;
|
||||
FormGetPos.Free;
|
||||
end;
|
||||
}
|
||||
|
||||
procedure TFormGetPic.CreThumb(Width, Height: Integer);
|
||||
var
|
||||
Bitmap: TBitmap;
|
||||
Ratio: Double;
|
||||
ARect: TRect;
|
||||
AHeight, AHeightOffset: Integer;
|
||||
AWidth, AWidthOffset: Integer;
|
||||
begin
|
||||
Bitmap := TBitmap.Create;
|
||||
try
|
||||
Ratio := Image1.Picture.Graphic.Width / Image1.Picture.Graphic.Height;
|
||||
if Ratio > 0.75 then
|
||||
begin
|
||||
AHeight := Round(Width / Ratio);
|
||||
AHeightOffset := (Height - AHeight) div 2;
|
||||
AWidth := Width;
|
||||
AWidthOffset := 0;
|
||||
end
|
||||
else
|
||||
begin
|
||||
AWidth := Round(Height * Ratio);
|
||||
AWidthOffset := (Width - AWidth) div 2;
|
||||
AHeight := Height;
|
||||
AHeightOffset := 0;
|
||||
end;
|
||||
Bitmap.Width := Width;
|
||||
Bitmap.Height := Height;
|
||||
Bitmap.Canvas.Brush.Color := clBtnFace;
|
||||
Bitmap.Canvas.FillRect(Rect(0, 0, Width, Height));
|
||||
// StretchDraw original image
|
||||
ARect := Rect(AWidthOffset, AHeightOffset, AWidth + AWidthOffset, AHeight + AHeightOffset);
|
||||
Bitmap.Canvas.StretchDraw(ARect, Image1.Picture.Graphic);
|
||||
// Assign back to the Jpeg, and save to the file
|
||||
Image2.Picture.Assign(Bitmap);
|
||||
// MyJpeg1.Assign(Image2.Picture.Graphic);
|
||||
finally
|
||||
Bitmap.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFormGetPic.FormCreate(Sender: TObject);
|
||||
begin
|
||||
MyJpeg := TJpegImage.Create;
|
||||
// MyJpeg1 := TJpegImage.Create;
|
||||
Button2.Enabled := false;
|
||||
if FWidth = 0 then
|
||||
FWidth := 197;
|
||||
if FHeight = 0 then
|
||||
FHeight := 110;
|
||||
|
||||
end;
|
||||
|
||||
procedure TFormGetPic.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
// MyJpeg1.Free;
|
||||
MyJpeg.Free;
|
||||
end;
|
||||
|
||||
procedure TFormGetPic.Image1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
ClickPos.x := X;
|
||||
ClickPos.y := Y;
|
||||
end;
|
||||
|
||||
procedure TFormGetPic.Image1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
NewPos: TPoint;
|
||||
begin
|
||||
{The left button was pressed}
|
||||
if ssLeft in Shift then
|
||||
begin
|
||||
{Calculate new position}
|
||||
NewPos.X := Image1.Left + X - ClickPos.x;
|
||||
NewPos.Y := Image1.Top + Y - ClickPos.y;
|
||||
if NewPos.x + Image1.Width < ScrollBox1.Width then
|
||||
NewPos.x := ScrollBox1.Width - Image1.Width;
|
||||
if NewPos.y + Image1.Height < ScrollBox1.Height then
|
||||
NewPos.y := ScrollBox1.Height - Image1.Height;
|
||||
if NewPos.X > 0 then
|
||||
NewPos.X := 0;
|
||||
if NewPos.Y > 0 then
|
||||
NewPos.Y := 0;
|
||||
|
||||
Image1.Top := NewPos.Y;
|
||||
Image1.Left := NewPos.X;
|
||||
end {if ssLeft in Shift}
|
||||
end;
|
||||
|
||||
procedure TFormGetPic.SpeedButton1Click(Sender: TObject);
|
||||
var
|
||||
Jpeg: TJPEGImage;
|
||||
begin
|
||||
if OpenPictureDialog1.Execute then
|
||||
begin
|
||||
Image1.Top := 0;
|
||||
Image1.Left := 0;
|
||||
Image1.Picture.LoadFromFile(OpenPictureDialog1.FileName);
|
||||
FilePath := OpenPictureDialog1.FileName;
|
||||
FileName := ExtractFileName(FilePath);
|
||||
|
||||
// Jpeg := TJPEGImage.Create;
|
||||
// Rotate90(Image1.Picture.Graphic, Jpeg);
|
||||
// Image1.Picture.Assign(Jpeg);
|
||||
// Jpeg.Free;
|
||||
|
||||
CreThumb(FWidth, FHeight);
|
||||
SpeedButton2.Enabled := TRUE;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TFormGetPic.SpeedButton2Click(Sender: TObject);
|
||||
begin
|
||||
|
||||
if SaveImage() then
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end
|
||||
else
|
||||
begin
|
||||
application.MessageBox('数据保存失败!', '提示信息', 0)
|
||||
end;
|
||||
// JPStream := TMemoryStream.Create;
|
||||
// MyJPeg.Assign(Image1.Picture.Graphic);
|
||||
// MyJPeg.SaveToStream(JPStream);
|
||||
|
||||
end;
|
||||
|
||||
procedure TFormGetPic.SpeedButton3Click(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 2;
|
||||
end;
|
||||
|
||||
procedure TFormGetPic.Button1Click(Sender: TObject);
|
||||
begin
|
||||
hWndC := 0;
|
||||
try
|
||||
hWndC := capCreateCaptureWindowA('My Own Capture Window', WS_CHILD or WS_VISIBLE, ScrollBox1.Left, ScrollBox1.Top, ScrollBox1.Width, ScrollBox1.Height, FormGetPic.Handle, 0);
|
||||
if hWndC <> 0 then
|
||||
begin
|
||||
SendMessage(hWndC, WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, 0);
|
||||
SendMessage(hWndC, WM_CAP_SET_CALLBACK_ERROR, 0, 0);
|
||||
SendMessage(hWndC, WM_CAP_SET_CALLBACK_STATUSA, 0, 0);
|
||||
SendMessage(hWndC, WM_CAP_DRIVER_CONNECT, 0, 0);
|
||||
SendMessage(hWndC, WM_CAP_SET_SCALE, 1, 0);
|
||||
SendMessage(hWndC, WM_CAP_SET_PREVIEWRATE, 66, 0);
|
||||
//SendMessage(hWndC, WM_CAP_SEQUENCE_NOFILE, 1, 0);
|
||||
SendMessage(hWndC, WM_CAP_SET_OVERLAY, 1, 0);
|
||||
SendMessage(hWndC, WM_CAP_SET_PREVIEW, 1, 0);
|
||||
Button1.Enabled := false;
|
||||
Button2.Enabled := true;
|
||||
end
|
||||
else
|
||||
begin
|
||||
application.MessageBox('连接摄像头失败!', '错误信息', MB_ICONERROR);
|
||||
end;
|
||||
except
|
||||
end;
|
||||
application.ProcessMessages;
|
||||
end;
|
||||
|
||||
procedure TFormGetPic.Button2Click(Sender: TObject);
|
||||
var
|
||||
sFieldName: string;
|
||||
MBMP: TBitmap;
|
||||
MJPG: TJpegImage;
|
||||
begin
|
||||
|
||||
sFieldName := 'D:\抓图';
|
||||
if not DirectoryExists(pchar(sFieldName)) then
|
||||
CreateDirectory(pchar(sFieldName), nil);
|
||||
|
||||
sFieldName := sFieldName + '\' + formatdateTime('yyyyMMddhhnnss', SGetServerDateTime(ADOQuery1));
|
||||
|
||||
FileName := ExtractFileName(sFieldName);
|
||||
if hWndC <> 0 then
|
||||
begin
|
||||
SendMessage(hWndC, WM_CAP_SAVEDIB, 0, longint(pchar(sFieldName + '.BMP')));
|
||||
SendMessage(hWndC, WM_CAP_DRIVER_DISCONNECT, 0, 0);
|
||||
hWndC := 0;
|
||||
application.ProcessMessages;
|
||||
Button1.Enabled := true;
|
||||
Button2.Enabled := false;
|
||||
try
|
||||
MBMP := TBitmap.Create;
|
||||
MJPG := TJpegImage.Create;
|
||||
MBMP.LoadFromFile(pchar(sFieldName + '.BMP'));
|
||||
MJPG.assign(MBMP);
|
||||
Image1.Picture.Bitmap.Assign(MJPG);
|
||||
application.ProcessMessages;
|
||||
MJPG.SaveToFile(pchar(sFieldName + '.JPG'));
|
||||
CreThumb(240, 180);
|
||||
finally
|
||||
MBMP.Free;
|
||||
MJPG.Free;
|
||||
if Fileexists(pchar(sFieldName + '.BMP')) then
|
||||
DeleteFile(pchar(sFieldName + '.BMP'));
|
||||
FilePath := sFieldName + '.JPG';
|
||||
FileName := ExtractFileName(FilePath);
|
||||
end;
|
||||
SpeedButton2.Enabled := true;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFormGetPic.SpeedButton4Click(Sender: TObject);
|
||||
var
|
||||
MJPG: TJpegImage;
|
||||
pathFile: string;
|
||||
begin
|
||||
if Image1.Picture.Graphic = nil then
|
||||
exit;
|
||||
|
||||
MJPG := TJpegImage.Create;
|
||||
try
|
||||
SaveDialog1.FileName := FileName;
|
||||
if SaveDialog1.Execute then
|
||||
begin
|
||||
if SaveDialog1.FileName <> '' then
|
||||
begin
|
||||
pathFile := trim(SaveDialog1.FileName);
|
||||
|
||||
if (RightStr(UPPERCASE(pathFile), 4) <> '.JPG') and (RightStr(UPPERCASE(pathFile), 5) <> '.JPEG') then
|
||||
begin
|
||||
pathFile := pathFile + '.JPG';
|
||||
end;
|
||||
MJPG.Assign(Image1.Picture.Graphic);
|
||||
if fileexists(pathFile) then
|
||||
begin
|
||||
if application.MessageBox(pchar('文件[' + trim(pathFile) + ']已存在,是否要替换它?'), '提示信息', MB_YESNO + mb_iconinformation + MB_DEFBUTTON2) = idyes then
|
||||
MJPG.SaveToFile(pathFile);
|
||||
end
|
||||
else
|
||||
MJPG.SaveToFile(pathFile);
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
MJPG.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFormGetPic.SpeedButton5Click(Sender: TObject);
|
||||
begin
|
||||
|
||||
try
|
||||
with adoqueryImage do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File where WBID=' + quotedstr(trim(fkeyNo)));
|
||||
open;
|
||||
if RecordCount > 0 then
|
||||
begin
|
||||
edit;
|
||||
fieldByName(pat1).Value := null;
|
||||
FieldByName(pic1).Value := null;
|
||||
post;
|
||||
Image1.Picture.Assign(nil);
|
||||
Image2.Picture.Assign(nil);
|
||||
end;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
42
A01基础公司管理/Company.cfg
Normal file
42
A01基础公司管理/Company.cfg
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
-$A8
|
||||
-$B-
|
||||
-$C+
|
||||
-$D+
|
||||
-$E-
|
||||
-$F-
|
||||
-$G+
|
||||
-$H+
|
||||
-$I+
|
||||
-$J-
|
||||
-$K-
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$P+
|
||||
-$Q-
|
||||
-$R-
|
||||
-$S-
|
||||
-$T-
|
||||
-$U-
|
||||
-$V+
|
||||
-$W-
|
||||
-$X+
|
||||
-$YD
|
||||
-$Z1
|
||||
-cg
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
-H+
|
||||
-W+
|
||||
-M
|
||||
-$M16384,1048576
|
||||
-K$00400000
|
||||
-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
|
||||
-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
|
||||
-U"D:\말繫ERP"
|
||||
-O"D:\말繫ERP"
|
||||
-I"D:\말繫ERP"
|
||||
-R"D:\말繫ERP"
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
||||
138
A01基础公司管理/Company.dof
Normal file
138
A01基础公司管理/Company.dof
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
[FileVersion]
|
||||
Version=7.0
|
||||
[Compiler]
|
||||
A=8
|
||||
B=0
|
||||
C=1
|
||||
D=1
|
||||
E=0
|
||||
F=0
|
||||
G=1
|
||||
H=1
|
||||
I=1
|
||||
J=0
|
||||
K=0
|
||||
L=1
|
||||
M=0
|
||||
N=1
|
||||
O=1
|
||||
P=1
|
||||
Q=0
|
||||
R=0
|
||||
S=0
|
||||
T=0
|
||||
U=0
|
||||
V=1
|
||||
W=0
|
||||
X=1
|
||||
Y=1
|
||||
Z=1
|
||||
ShowHints=1
|
||||
ShowWarnings=1
|
||||
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
NamespacePrefix=
|
||||
SymbolDeprecated=1
|
||||
SymbolLibrary=1
|
||||
SymbolPlatform=1
|
||||
UnitLibrary=1
|
||||
UnitPlatform=1
|
||||
UnitDeprecated=1
|
||||
HResultCompat=1
|
||||
HidingMember=1
|
||||
HiddenVirtual=1
|
||||
Garbage=1
|
||||
BoundsError=1
|
||||
ZeroNilCompat=1
|
||||
StringConstTruncated=1
|
||||
ForLoopVarVarPar=1
|
||||
TypedConstVarPar=1
|
||||
AsgToTypedConst=1
|
||||
CaseLabelRange=1
|
||||
ForVariable=1
|
||||
ConstructingAbstract=1
|
||||
ComparisonFalse=1
|
||||
ComparisonTrue=1
|
||||
ComparingSignedUnsigned=1
|
||||
CombiningSignedUnsigned=1
|
||||
UnsupportedConstruct=1
|
||||
FileOpen=1
|
||||
FileOpenUnitSrc=1
|
||||
BadGlobalSymbol=1
|
||||
DuplicateConstructorDestructor=1
|
||||
InvalidDirective=1
|
||||
PackageNoLink=1
|
||||
PackageThreadVar=1
|
||||
ImplicitImport=1
|
||||
HPPEMITIgnored=1
|
||||
NoRetVal=1
|
||||
UseBeforeDef=1
|
||||
ForLoopVarUndef=1
|
||||
UnitNameMismatch=1
|
||||
NoCFGFileFound=1
|
||||
MessageDirective=1
|
||||
ImplicitVariants=1
|
||||
UnicodeToLocale=1
|
||||
LocaleToUnicode=1
|
||||
ImagebaseMultiple=1
|
||||
SuspiciousTypecast=1
|
||||
PrivatePropAccessor=1
|
||||
UnsafeType=0
|
||||
UnsafeCode=0
|
||||
UnsafeCast=0
|
||||
[Linker]
|
||||
MapFile=0
|
||||
OutputObjs=0
|
||||
ConsoleApp=1
|
||||
DebugInfo=0
|
||||
RemoteSymbols=0
|
||||
MinStackSize=16384
|
||||
MaxStackSize=1048576
|
||||
ImageBase=4194304
|
||||
ExeDescription=
|
||||
[Directories]
|
||||
OutputDir=
|
||||
UnitOutputDir=
|
||||
PackageDLLOutputDir=
|
||||
PackageDCPOutputDir=
|
||||
SearchPath=D:\富通ERP
|
||||
Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOffice2k;Rave50CLX;Rave50VCL
|
||||
Conditionals=
|
||||
DebugSourceDirs=
|
||||
UsePackages=0
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=D:\凌志超开发代码\项目代码\振永\客户供应商管理(Company.dll)\testDll.exe
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
[Language]
|
||||
ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=2052
|
||||
CodePage=936
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
[Excluded Packages]
|
||||
c:\program files\borland\delphi7\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package
|
||||
69
A01基础公司管理/Company.dpr
Normal file
69
A01基础公司管理/Company.dpr
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
library Company;
|
||||
|
||||
uses
|
||||
SysUtils,
|
||||
classes,
|
||||
forms,
|
||||
WinTypes,
|
||||
WinProcs,
|
||||
midaslib,
|
||||
U_GetDllForm in 'U_GetDllForm.pas',
|
||||
U_ModuleNote in 'U_ModuleNote.pas' {frmModuleNote},
|
||||
U_DataLink in 'U_DataLink.pas' {DataLink_Company: TDataModule},
|
||||
U_ZDYHelpSel in 'U_ZDYHelpSel.pas' {frmZDYHelpSel},
|
||||
U_iniParam in 'U_iniParam.pas',
|
||||
U_BaseInput in '..\Z99Dependency\design\U_BaseInput.pas' {frmBaseInput},
|
||||
U_BaseList in '..\Z99Dependency\design\U_BaseList.pas' {frmBaseList},
|
||||
U_cxGridCustomCss in '..\Z99Dependency\design\U_cxGridCustomCss.pas',
|
||||
U_globalVar in '..\Z99Dependency\design\U_globalVar.pas',
|
||||
U_WindowFormdesign in '..\Z99Dependency\design\U_WindowFormdesign.pas',
|
||||
U_RTFun in '..\Z99Dependency\ThreeFun\Fun\U_RTFun.pas',
|
||||
U_Factory in 'U_Factory.pas' {frmFactory},
|
||||
U_CustInput in 'U_CustInput.pas' {frmCustInput},
|
||||
U_BaseHelp in '..\Z99Dependency\design\U_BaseHelp.pas' {frmBaseHelp},
|
||||
U_EmployeeList in 'U_EmployeeList.pas' {frmEmployeeList},
|
||||
U_EmployeeBZ in 'U_EmployeeBZ.pas' {frmEmployeeBZ},
|
||||
U_UserSel in '..\A00通用窗体\U_UserSel.pas' {frmUserSel},
|
||||
U_ClothInfoSel in '..\A00通用窗体\U_ClothInfoSel.pas' {frmClothInfoSel},
|
||||
U_CompanySel in '..\A00通用窗体\U_CompanySel.pas' {frmCompanySel},
|
||||
U_AttachmentUpload in '..\A00通用窗体\U_AttachmentUpload.pas' {frmFjList_RZ},
|
||||
U_CompressionFun in '..\Z99Dependency\ThreeFun\Fun\U_CompressionFun.pas',
|
||||
U_BankList in 'U_BankList.pas' {frmBankList},
|
||||
U_LabelMapSet in '..\A00通用窗体\U_LabelMapSet.pas' {frmLabelMapSet},
|
||||
U_LabelPrint in '..\A00通用窗体\U_LabelPrint.pas' {frmLabelPrint},
|
||||
U_JYGL in 'U_JYGL.pas' {frmjygl},
|
||||
U_JYXX in 'U_JYXX.pas' {frmjyxx},
|
||||
U_CYD in 'U_CYD.pas' {frmCYD},
|
||||
U_CYSZ in 'U_CYSZ.pas' {frmCYSZ},
|
||||
U_FLJHD in 'U_FLJHD.pas' {frmFLJHD},
|
||||
U_TradeSalesContractSel in '..\T00贸易通用窗体\U_TradeSalesContractSel.pas' {frmTradeSalesContractSel},
|
||||
U_BaseDataLink in '..\Z99Dependency\design\U_BaseDataLink.pas' {BaseDataLink: TDataModule},
|
||||
uFomat_JSON in '..\Z99Dependency\ThreeFun\Fun\uFomat_JSON.pas',
|
||||
uSZHN_JSON in '..\Z99Dependency\ThreeFun\Fun\uSZHN_JSON.pas';
|
||||
|
||||
{$R *.res}
|
||||
|
||||
procedure DllEnterPoint(dwReason: DWORD); far; stdcall;
|
||||
begin
|
||||
DLLProc := @DLLEnterPoint;
|
||||
DllEnterPoint(DLL_PROCESS_ATTACH);
|
||||
end;
|
||||
|
||||
procedure DLLUnloadProc(Reason: Integer); register;
|
||||
begin
|
||||
// if (Reason = DLL_PROCESS_DETACH) or (Reason=DLL_THREAD_DETACH) then
|
||||
// Application:=NewDllApp;
|
||||
end;
|
||||
|
||||
exports
|
||||
GetDllForm;
|
||||
|
||||
begin
|
||||
try
|
||||
NewDllApp := Application;
|
||||
DLLProc := @DLLUnloadProc;
|
||||
except
|
||||
|
||||
end;
|
||||
end.
|
||||
|
||||
965
A01基础公司管理/Company.dproj
Normal file
965
A01基础公司管理/Company.dproj
Normal file
|
|
@ -0,0 +1,965 @@
|
|||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{E16427F3-666C-4A0D-9F4B-79271477F72C}</ProjectGuid>
|
||||
<MainSource>Company.dpr</MainSource>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<TargetedPlatforms>38017</TargetedPlatforms>
|
||||
<AppType>Library</AppType>
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<ProjectVersion>19.2</ProjectVersion>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Android64' and '$(Base)'=='true') or '$(Base_Android64)'!=''">
|
||||
<Base_Android64>true</Base_Android64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='iOSDevice64' and '$(Base)'=='true') or '$(Base_iOSDevice64)'!=''">
|
||||
<Base_iOSDevice64>true</Base_iOSDevice64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||
<Base_Win32>true</Base_Win32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||
<Base_Win64>true</Base_Win64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Android64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Android64)'!=''">
|
||||
<Cfg_2_Android64>true</Cfg_2_Android64>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='iOSDevice64' and '$(Cfg_2)'=='true') or '$(Cfg_2_iOSDevice64)'!=''">
|
||||
<Cfg_2_iOSDevice64>true</Cfg_2_iOSDevice64>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='OSX64' and '$(Cfg_2)'=='true') or '$(Cfg_2_OSX64)'!=''">
|
||||
<Cfg_2_OSX64>true</Cfg_2_OSX64>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
|
||||
<Cfg_2_Win32>true</Cfg_2_Win32>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<DCC_E>false</DCC_E>
|
||||
<DCC_F>false</DCC_F>
|
||||
<DCC_K>false</DCC_K>
|
||||
<DCC_N>true</DCC_N>
|
||||
<DCC_S>false</DCC_S>
|
||||
<DCC_ImageBase>00400000</DCC_ImageBase>
|
||||
<DCC_DebugInformation>1</DCC_DebugInformation>
|
||||
<DCC_SymbolReferenceInfo>1</DCC_SymbolReferenceInfo>
|
||||
<DCC_UnitSearchPath>D:\富通ERP;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
|
||||
<DCC_UsePackage>vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOffice2k;Rave50CLX;Rave50VCL;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
<GenDll>true</GenDll>
|
||||
<SanitizedProjectName>Company</SanitizedProjectName>
|
||||
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;Data.Win;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Locale>2052</VerInfo_Locale>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Android64)'!=''">
|
||||
<Android_LauncherIcon192>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png</Android_LauncherIcon192>
|
||||
<EnabledSysJars>android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar</EnabledSysJars>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_iOSDevice64)'!=''">
|
||||
<iOS_AppStore1024>$(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png</iOS_AppStore1024>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<DCC_Namespace>System.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
<BT_BuildType>Debug</BT_BuildType>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<Icon_MainIcon>Company_Icon.ico</Icon_MainIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<Icon_MainIcon>Company_Icon.ico</Icon_MainIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
<DCC_DebugInformation>0</DCC_DebugInformation>
|
||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||
<DCC_Optimize>false</DCC_Optimize>
|
||||
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Android64)'!=''">
|
||||
<BT_BuildType>Debug</BT_BuildType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_iOSDevice64)'!=''">
|
||||
<BT_BuildType>Debug</BT_BuildType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_OSX64)'!=''">
|
||||
<BT_BuildType>Debug</BT_BuildType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||
<Debugger_HostApplication>D:\D10W\项目代码\D10clhege\A01基础公司管理\testDll.exe</Debugger_HostApplication>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="$(MainSource)">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="U_GetDllForm.pas"/>
|
||||
<DCCReference Include="U_ModuleNote.pas">
|
||||
<Form>frmModuleNote</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="U_DataLink.pas">
|
||||
<Form>DataLink_Company</Form>
|
||||
<DesignClass>TDataModule</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="U_ZDYHelpSel.pas">
|
||||
<Form>frmZDYHelpSel</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="U_iniParam.pas"/>
|
||||
<DCCReference Include="..\Z99Dependency\design\U_BaseInput.pas">
|
||||
<Form>frmBaseInput</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\Z99Dependency\design\U_BaseList.pas">
|
||||
<Form>frmBaseList</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\Z99Dependency\design\U_cxGridCustomCss.pas"/>
|
||||
<DCCReference Include="..\Z99Dependency\design\U_globalVar.pas"/>
|
||||
<DCCReference Include="..\Z99Dependency\design\U_WindowFormdesign.pas"/>
|
||||
<DCCReference Include="..\Z99Dependency\ThreeFun\Fun\U_RTFun.pas"/>
|
||||
<DCCReference Include="U_Factory.pas">
|
||||
<Form>frmFactory</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="U_CustInput.pas">
|
||||
<Form>frmCustInput</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\Z99Dependency\design\U_BaseHelp.pas">
|
||||
<Form>frmBaseHelp</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="U_EmployeeList.pas">
|
||||
<Form>frmEmployeeList</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="U_EmployeeBZ.pas">
|
||||
<Form>frmEmployeeBZ</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_UserSel.pas">
|
||||
<Form>frmUserSel</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_ClothInfoSel.pas">
|
||||
<Form>frmClothInfoSel</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_CompanySel.pas">
|
||||
<Form>frmCompanySel</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_AttachmentUpload.pas">
|
||||
<Form>frmFjList_RZ</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\Z99Dependency\ThreeFun\Fun\U_CompressionFun.pas"/>
|
||||
<DCCReference Include="U_BankList.pas">
|
||||
<Form>frmBankList</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_LabelMapSet.pas">
|
||||
<Form>frmLabelMapSet</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_LabelPrint.pas">
|
||||
<Form>frmLabelPrint</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="U_JYGL.pas">
|
||||
<Form>frmjygl</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="U_JYXX.pas">
|
||||
<Form>frmjyxx</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="U_CYD.pas">
|
||||
<Form>frmCYD</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="U_CYSZ.pas">
|
||||
<Form>frmCYSZ</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="U_FLJHD.pas">
|
||||
<Form>frmFLJHD</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\T00贸易通用窗体\U_TradeSalesContractSel.pas">
|
||||
<Form>frmTradeSalesContractSel</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\Z99Dependency\design\U_BaseDataLink.pas">
|
||||
<Form>BaseDataLink</Form>
|
||||
<DesignClass>TDataModule</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\Z99Dependency\ThreeFun\Fun\uFomat_JSON.pas"/>
|
||||
<DCCReference Include="..\Z99Dependency\ThreeFun\Fun\uSZHN_JSON.pas"/>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType/>
|
||||
<BorlandProject>
|
||||
<Delphi.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">Company.dpr</Source>
|
||||
</Source>
|
||||
</Delphi.Personality>
|
||||
<Platforms>
|
||||
<Platform value="Android64">True</Platform>
|
||||
<Platform value="iOSDevice64">True</Platform>
|
||||
<Platform value="Linux64">True</Platform>
|
||||
<Platform value="OSX64">True</Platform>
|
||||
<Platform value="Win32">True</Platform>
|
||||
<Platform value="Win64">False</Platform>
|
||||
</Platforms>
|
||||
<Deployment Version="3">
|
||||
<DeployFile LocalName="Company.dll" Configuration="Debug" Class="ProjectOutput">
|
||||
<Platform Name="Win32">
|
||||
<RemoteName>Company.dll</RemoteName>
|
||||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
<DeployClass Name="AdditionalDebugSymbols">
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidClassesDexFile">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>classes</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>classes</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidFileProvider">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\xml</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\xml</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidGDBServer">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidLibnativeArmeabiFile">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>library\lib\armeabi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidLibnativeArmeabiv7aFile">
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidLibnativeMipsFile">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\mips</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>library\lib\mips</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidServiceOutput">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidServiceOutput_Android32">
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidSplashImageDef">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidSplashStyles">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\values</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\values</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidSplashStylesV21">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\values-v21</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\values-v21</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_Colors">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\values</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\values</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_DefaultAppIcon">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon144">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon192">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon36">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-ldpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-ldpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon48">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-mdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-mdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon72">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-hdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-hdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon96">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-xhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_NotificationIcon24">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-mdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-mdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_NotificationIcon36">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-hdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-hdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_NotificationIcon48">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-xhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_NotificationIcon72">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_NotificationIcon96">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage426">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-small</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-small</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage470">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-normal</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-normal</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage640">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-large</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-large</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage960">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xlarge</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-xlarge</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_Strings">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\values</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\values</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="DebugSymbols">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="DependencyFramework">
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.framework</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="OSX64">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.framework</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="DependencyModule">
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="OSX64">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
<Extensions>.dll;.bpl</Extensions>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Required="true" Name="DependencyPackage">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="OSX64">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
<Extensions>.bpl</Extensions>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="File">
|
||||
<Platform Name="Android">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX64">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iOS_AppStore1024">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_AppIcon152">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_AppIcon167">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Launch2x">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_LaunchDark2x">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Notification40">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Setting58">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_SpotLight80">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_AppIcon120">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_AppIcon180">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Launch2x">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Launch3x">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_LaunchDark2x">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_LaunchDark3x">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Notification40">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Notification60">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Setting58">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Setting87">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Spotlight120">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Spotlight80">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectAndroidManifest">
|
||||
<Platform Name="Android">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSDeviceDebug">
|
||||
<Platform Name="iOSDevice32">
|
||||
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSEntitlements"/>
|
||||
<DeployClass Name="ProjectiOSInfoPList"/>
|
||||
<DeployClass Name="ProjectiOSLaunchScreen"/>
|
||||
<DeployClass Name="ProjectiOSResource">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectOSXDebug"/>
|
||||
<DeployClass Name="ProjectOSXEntitlements"/>
|
||||
<DeployClass Name="ProjectOSXInfoPList"/>
|
||||
<DeployClass Name="ProjectOSXResource">
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\Resources</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX64">
|
||||
<RemoteDir>Contents\Resources</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Required="true" Name="ProjectOutput">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Linux64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectOutput_Android32">
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectUWPManifest">
|
||||
<Platform Name="Win32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="UWP_DelphiLogo150">
|
||||
<Platform Name="Win32">
|
||||
<RemoteDir>Assets</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win64">
|
||||
<RemoteDir>Assets</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="UWP_DelphiLogo44">
|
||||
<Platform Name="Win32">
|
||||
<RemoteDir>Assets</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win64">
|
||||
<RemoteDir>Assets</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
|
||||
</Deployment>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
|
||||
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
|
||||
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
|
||||
</Project>
|
||||
BIN
A01基础公司管理/Company.res
Normal file
BIN
A01基础公司管理/Company.res
Normal file
Binary file not shown.
5
A01基础公司管理/Company.skincfg
Normal file
5
A01基础公司管理/Company.skincfg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[ExpressSkins]
|
||||
Default=1
|
||||
ShowNotifications=1
|
||||
Enabled=1
|
||||
dxSkinsDefaultPainters=1
|
||||
BIN
A01基础公司管理/Company_Icon.ico
Normal file
BIN
A01基础公司管理/Company_Icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 766 B |
2
A01基础公司管理/Company_project.tvsconfig
Normal file
2
A01基础公司管理/Company_project.tvsconfig
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0"?>
|
||||
<TgConfig Version="3" SubLevelDisabled="False" />
|
||||
3
A01基础公司管理/Desktop.ini
Normal file
3
A01基础公司管理/Desktop.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[.ShellClassInfo]
|
||||
IconFile=C:\Program Files (x86)\360\360WangPan\new_desktop_win7.ico
|
||||
IconIndex=0
|
||||
4
A01基础公司管理/File.INI
Normal file
4
A01基础公司管理/File.INI
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[生产车间配置]
|
||||
卷条码机台标志=99
|
||||
成品DLL文件=CYZZ.dll
|
||||
成品DLL调用号=11
|
||||
7
A01基础公司管理/FileHelp.ini
Normal file
7
A01基础公司管理/FileHelp.ini
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[FILEPATH]
|
||||
FileClass=YP,AA,BB,HT
|
||||
YP=D:\YP
|
||||
AA=D:\AA
|
||||
BB=D:\BB
|
||||
HT=D:\HT
|
||||
OTHER=D:\OTHER
|
||||
7
A01基础公司管理/JCYData.INI
Normal file
7
A01基础公司管理/JCYData.INI
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[系统配置]
|
||||
串口号=com1
|
||||
波特率=9600
|
||||
校验位=0
|
||||
数据位=8
|
||||
停止位=0
|
||||
频率=100
|
||||
7
A01基础公司管理/JZCRS323C.INI
Normal file
7
A01基础公司管理/JZCRS323C.INI
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[系统配置]
|
||||
串口号=com2
|
||||
波特率=1200
|
||||
校验位=0
|
||||
数据位=8
|
||||
停止位=0
|
||||
频率=100
|
||||
0
A01基础公司管理/JZCRS323CList.txt
Normal file
0
A01基础公司管理/JZCRS323CList.txt
Normal file
23
A01基础公司管理/ProjectGroup1.bpg
Normal file
23
A01基础公司管理/ProjectGroup1.bpg
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#------------------------------------------------------------------------------
|
||||
VERSION = BWS.01
|
||||
#------------------------------------------------------------------------------
|
||||
!ifndef ROOT
|
||||
ROOT = $(MAKEDIR)\..
|
||||
!endif
|
||||
#------------------------------------------------------------------------------
|
||||
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
|
||||
DCC = $(ROOT)\bin\dcc32.exe $**
|
||||
BRCC = $(ROOT)\bin\brcc32.exe $**
|
||||
#------------------------------------------------------------------------------
|
||||
PROJECTS = testDll.exe ProductPrice.dll
|
||||
#------------------------------------------------------------------------------
|
||||
default: $(PROJECTS)
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
testDll.exe: testDll.dpr
|
||||
$(DCC)
|
||||
|
||||
ProductPrice.dll: ProductPrice.dpr
|
||||
$(DCC)
|
||||
|
||||
|
||||
48
A01基础公司管理/ProjectGroup1.groupproj
Normal file
48
A01基础公司管理/ProjectGroup1.groupproj
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{21551F6D-A5A1-4C8F-92C3-3F8D054E75C2}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Projects Include="testDll.dproj">
|
||||
<Dependencies/>
|
||||
</Projects>
|
||||
<Projects Include="Company.dproj">
|
||||
<Dependencies/>
|
||||
</Projects>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Default.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType/>
|
||||
<BorlandProject>
|
||||
<Default.Personality/>
|
||||
</BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Target Name="testDll">
|
||||
<MSBuild Projects="testDll.dproj"/>
|
||||
</Target>
|
||||
<Target Name="testDll:Clean">
|
||||
<MSBuild Projects="testDll.dproj" Targets="Clean"/>
|
||||
</Target>
|
||||
<Target Name="testDll:Make">
|
||||
<MSBuild Projects="testDll.dproj" Targets="Make"/>
|
||||
</Target>
|
||||
<Target Name="Company">
|
||||
<MSBuild Projects="Company.dproj"/>
|
||||
</Target>
|
||||
<Target Name="Company:Clean">
|
||||
<MSBuild Projects="Company.dproj" Targets="Clean"/>
|
||||
</Target>
|
||||
<Target Name="Company:Make">
|
||||
<MSBuild Projects="Company.dproj" Targets="Make"/>
|
||||
</Target>
|
||||
<Target Name="Build">
|
||||
<CallTarget Targets="testDll;Company"/>
|
||||
</Target>
|
||||
<Target Name="Clean">
|
||||
<CallTarget Targets="testDll:Clean;Company:Clean"/>
|
||||
</Target>
|
||||
<Target Name="Make">
|
||||
<CallTarget Targets="testDll:Make;Company:Make"/>
|
||||
</Target>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
|
||||
</Project>
|
||||
2
A01基础公司管理/ProjectGroup1_prjgroup.tvsconfig
Normal file
2
A01基础公司管理/ProjectGroup1_prjgroup.tvsconfig
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0"?>
|
||||
<TgConfig Version="3" SubLevelDisabled="False" />
|
||||
6
A01基础公司管理/SYSTEMSET.ini
Normal file
6
A01基础公司管理/SYSTEMSET.ini
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[SERVER]
|
||||
服务器地址=101.132.143.144
|
||||
服务器地址类型=2002
|
||||
是否自动更新=1
|
||||
软件名称=睿特版本库
|
||||
登陆标题=sss
|
||||
270
A01基础公司管理/U_BankList.dfm
Normal file
270
A01基础公司管理/U_BankList.dfm
Normal file
|
|
@ -0,0 +1,270 @@
|
|||
inherited frmBankList: TfrmBankList
|
||||
Left = 297
|
||||
Top = 109
|
||||
Caption = #38134#34892#36134#25143#31649#29702
|
||||
ClientHeight = 562
|
||||
ClientWidth = 1183
|
||||
KeyPreview = True
|
||||
ExplicitWidth = 1199
|
||||
ExplicitHeight = 601
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar [0]
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1183
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 91
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 1
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 0
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object btnok: TToolButton
|
||||
Left = 142
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 12
|
||||
OnClick = btnokClick
|
||||
end
|
||||
object btnadd: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 2
|
||||
OnClick = btnaddClick
|
||||
end
|
||||
object btndel: TToolButton
|
||||
Left = 284
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 6
|
||||
OnClick = btndelClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 355
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 450
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid [1]
|
||||
Left = 0
|
||||
Top = 81
|
||||
Width = 1183
|
||||
Height = 481
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 2
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DS_1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_Company.Default
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #24207#21495
|
||||
DataBinding.FieldName = 'SerialNo'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = v2Column1PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 50
|
||||
end
|
||||
object Tv2Column3: TcxGridDBColumn
|
||||
Caption = #21517#31216
|
||||
DataBinding.FieldName = 'BankName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 107
|
||||
end
|
||||
object Tv2Column4: TcxGridDBColumn
|
||||
Caption = #21345#21495
|
||||
DataBinding.FieldName = 'BankCardNo'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 150
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Caption = #24065#31181
|
||||
DataBinding.FieldName = 'Currency'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.DropDownListStyle = lsFixedList
|
||||
Properties.Items.Strings = (
|
||||
'CNY'
|
||||
'USD'
|
||||
'EUR')
|
||||
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 85
|
||||
end
|
||||
object Tv2Column5: TcxGridDBColumn
|
||||
Caption = #24320#25143#34892
|
||||
DataBinding.FieldName = 'BankDeposit'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 112
|
||||
end
|
||||
object Tv2Column6: TcxGridDBColumn
|
||||
Caption = #34892#21495
|
||||
DataBinding.FieldName = 'BankNo'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 133
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel [2]
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 1183
|
||||
Height = 43
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 66
|
||||
Top = 15
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #21517#31216
|
||||
end
|
||||
object BKName: TEdit
|
||||
Tag = 2
|
||||
Left = 96
|
||||
Top = 11
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = CustomerChange
|
||||
end
|
||||
end
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Left = 233
|
||||
Top = 208
|
||||
end
|
||||
inherited ADOQueryBaseTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Left = 81
|
||||
Top = 209
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 347
|
||||
Top = 385
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 245
|
||||
Top = 385
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 149
|
||||
Top = 385
|
||||
end
|
||||
object GPM_1: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 552
|
||||
Top = 224
|
||||
end
|
||||
object DS_1: TDataSource
|
||||
DataSet = CDS_1
|
||||
Left = 467
|
||||
Top = 211
|
||||
end
|
||||
object CDS_1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 360
|
||||
Top = 208
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 512
|
||||
Top = 424
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
end
|
||||
322
A01基础公司管理/U_BankList.pas
Normal file
322
A01基础公司管理/U_BankList.pas
Normal file
|
|
@ -0,0 +1,322 @@
|
|||
unit U_BankList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxPC, cxCheckComboBox, cxDropDownEdit, Menus, RM_e_Xls,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
|
||||
dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, U_BaseList;
|
||||
|
||||
type
|
||||
TfrmBankList = class(TfrmBaseList)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
Panel1: TPanel;
|
||||
BKName: TEdit;
|
||||
Label1: TLabel;
|
||||
btnadd: TToolButton;
|
||||
btndel: TToolButton;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
btnok: TToolButton;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
Tv2Column3: TcxGridDBColumn;
|
||||
Tv2Column4: TcxGridDBColumn;
|
||||
Tv2Column5: TcxGridDBColumn;
|
||||
Tv2Column6: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure CustomerChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure v2Column8PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure btnaddClick(Sender: TObject);
|
||||
procedure btndelClick(Sender: TObject);
|
||||
procedure btnokClick(Sender: TObject);
|
||||
procedure v2Column1PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
fFlag: integer;
|
||||
{ Public declarations }
|
||||
RKFlag, FCYID, fmanage: string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmBankList: TfrmBankList;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBankList.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from BS_Bank order by SerialNo ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmBankList := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
inherited;
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
ReadCxGrid(Trim(Self.Caption), Tv2, '财务管理');
|
||||
InitGrid();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.btnokClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(Trim(Self.Caption), Tv2, '财务管理');
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.ToolButton2Click(Sender: TObject);
|
||||
var
|
||||
sql: string;
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
sql := SGetFilters(Panel1, 1, 2);
|
||||
SDofilter(ADOQueryMain, sql);
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid;
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.N1Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
with CDS_1 do
|
||||
begin
|
||||
DisableControls;
|
||||
first;
|
||||
while not eof do
|
||||
begin
|
||||
edit;
|
||||
fieldbyname('ssel').Value := true;
|
||||
post;
|
||||
next;
|
||||
end;
|
||||
First;
|
||||
EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.N2Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
with CDS_1 do
|
||||
begin
|
||||
DisableControls;
|
||||
first;
|
||||
while not eof do
|
||||
begin
|
||||
edit;
|
||||
fieldbyname('ssel').Value := false;
|
||||
post;
|
||||
next;
|
||||
end;
|
||||
First;
|
||||
EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.CustomerChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
fmanage := Trim(DParameters1);
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.v2Column1PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
begin
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
FFieldName := Trim(Tv2.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with CDS_1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value := Trim(mvalue);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate BS_Bank ');
|
||||
sql.Add(' Set ' + FFieldName + '=' + Trim(mvalue));
|
||||
sql.Add(' , Editer=''' + Trim(DName) + '''');
|
||||
sql.Add(' , Edittime=getdate()');
|
||||
sql.Add(' where BKID=' + quotedstr(CDS_1.fieldbyname('BKID').AsString));
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
tv2.Controller.EditingController.ShowEdit();
|
||||
except
|
||||
tv2.Controller.EditingController.ShowEdit();
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
end
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.v2Column8PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
begin
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
FFieldName := Trim(Tv2.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with CDS_1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value := Trim(mvalue);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate BS_Bank ');
|
||||
sql.Add(' Set ' + FFieldName + '=''' + Trim(mvalue) + '''');
|
||||
sql.Add(' , Editer=''' + Trim(DName) + '''');
|
||||
sql.Add(' , Edittime=getdate()');
|
||||
sql.Add(' where BKID=' + quotedstr(CDS_1.fieldbyname('BKID').AsString));
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
tv2.Controller.EditingController.ShowEdit();
|
||||
except
|
||||
tv2.Controller.EditingController.ShowEdit();
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
end
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.btnaddClick(Sender: TObject);
|
||||
var
|
||||
maxId: string;
|
||||
begin
|
||||
BKName.SetFocus;
|
||||
if GetLSNo(ADOQueryCmd, maxId, 'BK', 'BS_Bank', 4, 0) = False then
|
||||
begin
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('insert into BS_Bank(BKID,Filler) values(' + quotedstr(Trim(maxId)) + ',' + quotedstr(Trim(dname)) + ')');
|
||||
ExecSQL;
|
||||
end;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBankList.btndelClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete BS_Bank where BKID=' + QuotedStr(CDS_1.FieldByName('BKID').AsString));
|
||||
ExecSQL;
|
||||
end;
|
||||
CDS_1.Delete;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
285
A01基础公司管理/U_CYD.dfm
Normal file
285
A01基础公司管理/U_CYD.dfm
Normal file
|
|
@ -0,0 +1,285 @@
|
|||
object frmCYD: TfrmCYD
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = #20986#36816#21333
|
||||
ClientHeight = 560
|
||||
ClientWidth = 1265
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object ToolBar1: TToolBar
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1265
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 91
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
GradientEndColor = 15717318
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton2: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 2
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 6
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 142
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 4
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 308
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 1265
|
||||
Height = 522
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
DataController.DataSource = DS_1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.IncSearch = DataLink_Company.SHuangSe
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Styles.Inactive = DataLink_Company.SHuangSe
|
||||
Styles.Selection = DataLink_Company.SHuangSe
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Tag = 9
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 47
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #23458#25143#21333#21495
|
||||
DataBinding.FieldName = 'KHNumber'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #20986#36816#29366#24577
|
||||
DataBinding.FieldName = 'CYstate'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
#37096#20998#20986#36816
|
||||
#20840#37096#20986#36816)
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column8: TcxGridDBColumn
|
||||
Caption = #23458#25143#21517#31216
|
||||
DataBinding.FieldName = 'KHName'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column9: TcxGridDBColumn
|
||||
Caption = #35746#21333#29366#24577
|
||||
DataBinding.FieldName = 'DDstate'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column10: TcxGridDBColumn
|
||||
Caption = #21333#25454#26085#26399
|
||||
DataBinding.FieldName = 'DJdate'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column11: TcxGridDBColumn
|
||||
Caption = #20132#36135#26085#26399
|
||||
DataBinding.FieldName = 'JHdate'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column12: TcxGridDBColumn
|
||||
Caption = #35013#36816#28207#21475
|
||||
DataBinding.FieldName = 'ZYport'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column13: TcxGridDBColumn
|
||||
Caption = #30446#30340#28207#21475
|
||||
DataBinding.FieldName = 'MDport'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #24065#31181
|
||||
DataBinding.FieldName = 'BZ'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'CNY'
|
||||
'USD'
|
||||
'EUR')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #20013#38388#21830
|
||||
DataBinding.FieldName = 'ZJS'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column6: TcxGridDBColumn
|
||||
Caption = #21046#21333#20154
|
||||
DataBinding.FieldName = 'ZDR'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column7: TcxGridDBColumn
|
||||
Caption = #20184#27454#26041#24335
|
||||
DataBinding.FieldName = 'FKFS'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object CDS_1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 512
|
||||
Top = 256
|
||||
end
|
||||
object DS_1: TDataSource
|
||||
DataSet = CDS_1
|
||||
Left = 579
|
||||
Top = 267
|
||||
end
|
||||
object GPM_1: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 400
|
||||
Top = 312
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 161
|
||||
end
|
||||
object ADOQuery2: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 328
|
||||
Top = 272
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 429
|
||||
Top = 177
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 613
|
||||
Top = 145
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 733
|
||||
Top = 145
|
||||
end
|
||||
object ADOCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 784
|
||||
Top = 269
|
||||
end
|
||||
object ADOTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 696
|
||||
Top = 277
|
||||
end
|
||||
end
|
||||
320
A01基础公司管理/U_CYD.pas
Normal file
320
A01基础公司管理/U_CYD.pas
Normal file
|
|
@ -0,0 +1,320 @@
|
|||
unit U_CYD;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
|
||||
System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs,
|
||||
Vcl.ComCtrls, Vcl.ToolWin, dxBarBuiltInMenu, cxClasses, cxGridCustomPopupMenu,
|
||||
cxGridPopupMenu, Data.DB, Datasnap.DBClient, cxGraphics, cxControls,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxStyles, dxSkinsCore,
|
||||
dxSkinsDefaultPainters, cxCustomData, cxFilter, cxData, cxDataStorage, cxEdit,
|
||||
cxNavigator, dxDateRanges, cxDBData, cxCheckBox, cxGridLevel,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridCustomView,
|
||||
cxGrid, Data.Win.ADODB, cxDropDownEdit, dxSkinOffice2013White, dxSkinWXI,
|
||||
dxScrollbarAnnotations;
|
||||
|
||||
type
|
||||
TfrmCYD = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
ToolButton1: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
ToolButton4: TToolButton;
|
||||
CDS_1: TClientDataSet;
|
||||
DS_1: TDataSource;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column8: TcxGridDBColumn;
|
||||
Tv1Column9: TcxGridDBColumn;
|
||||
Tv1Column10: TcxGridDBColumn;
|
||||
Tv1Column11: TcxGridDBColumn;
|
||||
Tv1Column12: TcxGridDBColumn;
|
||||
Tv1Column13: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQuery2: TADOQuery;
|
||||
ADOQuery1: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOCmd: TADOQuery;
|
||||
ADOTemp: TADOQuery;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
private
|
||||
procedure SetXH();
|
||||
function SaveData(): Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
PState: string;
|
||||
FBIOSID: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmCYD: TfrmCYD;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_TradeSalesContractSel, U_CYTradeSalesContractSel;
|
||||
{$R *.dfm}
|
||||
|
||||
function TfrmCYD.SaveData(): Boolean;
|
||||
var
|
||||
maxno: string;
|
||||
fconNO, fmxType, fDate: string;
|
||||
begin
|
||||
try
|
||||
ADOCmd.Connection.BeginTrans;
|
||||
|
||||
with CDS_1 do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
//////////////// 保存主表 //////////////////////
|
||||
if Trim(FBIOSID) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOTemp, maxno, 'BG', 'BS_CYGL_CY', 3, 1) = False then
|
||||
raise Exception.Create('取最大号失败!');
|
||||
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxno := Trim(FBIOSID);
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select * from BS_CYGL_CY where BIOSID=''' + Trim(FBIOSID) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if Trim(FBIOSID) = '' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Updater').Value := Trim(DName);
|
||||
FieldByName('GXdate').Value := SGetServerDateTime(ADOTemp);
|
||||
end;
|
||||
FieldByName('BIOSID').Value := Trim(maxno);
|
||||
// FieldByName('BIOSID').Value := Trim(FFBIOSID);
|
||||
RTSetSaveDataCDS(ADOCmd, Tv1, CDS_1, 'BS_JYGL_CY', 0);
|
||||
FieldByName('FConMId').Value := Trim(CDS_1.fieldbyname('FConMId').AsString);
|
||||
Post;
|
||||
end;
|
||||
with CDS_1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('BIOSID').Value := Trim(maxno);
|
||||
Post;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update BS_Contract_Main ');
|
||||
sql.Add('Set CYZT=''1''');
|
||||
sql.Add('where ConMId=''' + Trim(CDS_1.fieldbyname('FConMId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
ADOCmd.Connection.CommitTrans;
|
||||
Result := True;
|
||||
except
|
||||
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
|
||||
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||
|
||||
Result := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCYD.SetXH();
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
with CDS_1 do
|
||||
begin
|
||||
First;
|
||||
i := 1;
|
||||
while not Eof do
|
||||
begin
|
||||
with CDS_1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('XHNoTemp').Value := i;
|
||||
Post;
|
||||
end;
|
||||
i := i + 1;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
with CDS_1 do
|
||||
begin
|
||||
CDS_1.IndexFieldNames := '';
|
||||
First;
|
||||
i := 1;
|
||||
while not Eof do
|
||||
begin
|
||||
with CDS_1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('XH').Value := FieldByName('XHNoTemp').AsInteger;
|
||||
Post;
|
||||
end;
|
||||
i := i + 1;
|
||||
Next;
|
||||
end;
|
||||
CDS_1.IndexFieldNames := 'XH';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCYD.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmCYD.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmCYD := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCYD.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid(trim(self.caption) + 'Tv1', Tv1, '出运单');
|
||||
with ADOTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from BS_CYGL_CY ');
|
||||
sql.Add('where BIOSID=''' + Trim(FBIOSID) + '''');
|
||||
// sql.Add(' order by SerialNo ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOTemp, CDS_1);
|
||||
SInitCDSData(ADOTemp, CDS_1);
|
||||
end;
|
||||
|
||||
procedure TfrmCYD.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmCYD.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(trim(self.caption) + 'Tv1', Tv1, '出运单');
|
||||
end;
|
||||
|
||||
procedure TfrmCYD.ToolButton2Click(Sender: TObject);
|
||||
var
|
||||
FConMainId, FMPRTCode: string;
|
||||
maxno: string;
|
||||
S, i: Integer;
|
||||
begin
|
||||
|
||||
try
|
||||
frmCYTradeSalesContractSel := TfrmCYTradeSalesContractSel.Create(Application);
|
||||
with frmCYTradeSalesContractSel do
|
||||
begin
|
||||
FLX := '出运';
|
||||
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
while CDS_1.locate('SSel', true, []) do
|
||||
begin
|
||||
|
||||
with self.CDS_1 do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('SSel').Value := false;
|
||||
|
||||
Fieldbyname('KHNumber').AsString := trim(frmCYTradeSalesContractSel.CDS_1.Fieldbyname('BuyConNo').AsString);
|
||||
Fieldbyname('KHName').AsString := trim(frmCYTradeSalesContractSel.CDS_1.Fieldbyname('BuyName').AsString);
|
||||
Fieldbyname('JHdate').AsString := trim(frmCYTradeSalesContractSel.CDS_1.Fieldbyname('DlyDate').AsString);
|
||||
Fieldbyname('ZYport').AsString := trim(frmCYTradeSalesContractSel.CDS_1.Fieldbyname('QIYUN').AsString);
|
||||
Fieldbyname('MDport').AsString := trim(frmCYTradeSalesContractSel.CDS_1.Fieldbyname('MUDI').AsString);
|
||||
Fieldbyname('FConMId').AsString := trim(frmCYTradeSalesContractSel.CDS_1.Fieldbyname('ConMId').AsString);
|
||||
Fieldbyname('BZ').AsString := trim(frmCYTradeSalesContractSel.CDS_1.Fieldbyname('Currency').AsString);
|
||||
Fieldbyname('ZJS').AsString := trim(frmCYTradeSalesContractSel.CDS_1.Fieldbyname('MiddleName').AsString);
|
||||
Fieldbyname('ZDR').AsString := trim(frmCYTradeSalesContractSel.CDS_1.Fieldbyname('Filler').AsString);
|
||||
Fieldbyname('FKFS').AsString := trim(frmCYTradeSalesContractSel.CDS_1.Fieldbyname('Payment').AsString);
|
||||
|
||||
Post;
|
||||
end;
|
||||
|
||||
CDS_1.Edit;
|
||||
CDS_1.fieldbyname('SSel').value := false;
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCYTradeSalesContractSel.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCYD.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
while CDS_1.Locate('SSel', True, []) do
|
||||
begin
|
||||
CDS_1.Delete;
|
||||
end;
|
||||
// SetXH();
|
||||
end;
|
||||
|
||||
procedure TfrmCYD.ToolButton4Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.Locate('CYstate', null, []) = True then
|
||||
begin
|
||||
Application.MessageBox('出运状态不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_1.Locate('CYstate', '', []) = True then
|
||||
begin
|
||||
Application.MessageBox('出运状态不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
1444
A01基础公司管理/U_CYGL.dfm
Normal file
1444
A01基础公司管理/U_CYGL.dfm
Normal file
File diff suppressed because it is too large
Load Diff
1413
A01基础公司管理/U_CYGL.pas
Normal file
1413
A01基础公司管理/U_CYGL.pas
Normal file
File diff suppressed because it is too large
Load Diff
996
A01基础公司管理/U_CYSZ.dfm
Normal file
996
A01基础公司管理/U_CYSZ.dfm
Normal file
|
|
@ -0,0 +1,996 @@
|
|||
object frmCYSZ: TfrmCYSZ
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = #20986#36816#35774#32622
|
||||
ClientHeight = 618
|
||||
ClientWidth = 1400
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object ToolBar1: TToolBar
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1400
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 91
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
GradientEndColor = 15717318
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton4: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 4
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 166
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 1400
|
||||
Height = 347
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clWhite
|
||||
ParentBackground = False
|
||||
TabOrder = 1
|
||||
object Label16: TLabel
|
||||
Left = 27
|
||||
Top = 39
|
||||
Width = 39
|
||||
Height = 12
|
||||
Caption = #26381#21153#21830
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 243
|
||||
Top = 39
|
||||
Width = 78
|
||||
Height = 12
|
||||
Caption = #26381#21153#21830#32852#31995#20154
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 491
|
||||
Top = 39
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #26381#21153#21830#30005#35805
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 731
|
||||
Top = 39
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #26381#21153#21830#22320#22336
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 19
|
||||
Top = 87
|
||||
Width = 52
|
||||
Height = 24
|
||||
Caption = #20986#21475#20844#21496#13#10' '#21517#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 259
|
||||
Top = 87
|
||||
Width = 52
|
||||
Height = 24
|
||||
Caption = #20986#21475#20844#21496#13#10' '#32852#31995#20154
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 504
|
||||
Top = 87
|
||||
Width = 52
|
||||
Height = 24
|
||||
Caption = #20986#21475#20844#21496#13#10' '#30005#35805
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 744
|
||||
Top = 87
|
||||
Width = 52
|
||||
Height = 24
|
||||
Caption = #20986#21475#20844#21496#13#10' '#37038#31665
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 978
|
||||
Top = 87
|
||||
Width = 52
|
||||
Height = 24
|
||||
Caption = #20986#21475#20844#21496#13#10' '#22320#22336
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 19
|
||||
Top = 151
|
||||
Width = 52
|
||||
Height = 24
|
||||
Caption = #25910#36135#20844#21496#13#10' '#21517#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 259
|
||||
Top = 151
|
||||
Width = 52
|
||||
Height = 24
|
||||
Caption = #25910#36135#20844#21496#13#10' '#32852#31995#20154
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 504
|
||||
Top = 151
|
||||
Width = 52
|
||||
Height = 24
|
||||
Caption = #25910#36135#20844#21496#13#10' '#30005#35805
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 744
|
||||
Top = 151
|
||||
Width = 52
|
||||
Height = 24
|
||||
Caption = #25910#36135#20844#21496#13#10' '#37038#31665
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 978
|
||||
Top = 151
|
||||
Width = 52
|
||||
Height = 24
|
||||
Caption = #25910#36135#20844#21496#13#10' '#22320#22336
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label15: TLabel
|
||||
Left = 19
|
||||
Top = 215
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #21830#26816#20449#24687
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label14: TLabel
|
||||
Left = 259
|
||||
Top = 215
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #25176#36816#26085#26399
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label17: TLabel
|
||||
Left = 478
|
||||
Top = 215
|
||||
Width = 78
|
||||
Height = 12
|
||||
Caption = #35013#26588#23436#25104#26085#26399
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label18: TLabel
|
||||
Left = 718
|
||||
Top = 215
|
||||
Width = 78
|
||||
Height = 12
|
||||
Caption = #23454#38469#35013#33337#26085#26399
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label19: TLabel
|
||||
Left = 994
|
||||
Top = 215
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #33337#21517
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label20: TLabel
|
||||
Left = 33
|
||||
Top = 271
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #33322#27425
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label21: TLabel
|
||||
Left = 259
|
||||
Top = 271
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #38598#35013#31665#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label22: TLabel
|
||||
Left = 481
|
||||
Top = 271
|
||||
Width = 78
|
||||
Height = 12
|
||||
Caption = #20184#27454#26102#38388#38388#38548
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label23: TLabel
|
||||
Left = 734
|
||||
Top = 271
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #25253#20851#21333#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label24: TLabel
|
||||
Left = 984
|
||||
Top = 271
|
||||
Width = 39
|
||||
Height = 12
|
||||
Caption = #25552#21333#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label25: TLabel
|
||||
Left = 24
|
||||
Top = 311
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #24635#24212#25910#27454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label27: TLabel
|
||||
Left = 264
|
||||
Top = 311
|
||||
Width = 39
|
||||
Height = 12
|
||||
Caption = #39564#36135#36153
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label28: TLabel
|
||||
Left = 497
|
||||
Top = 311
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #24212#25910#27454#26102#38388
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label29: TLabel
|
||||
Left = 758
|
||||
Top = 311
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #36820#28857
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label30: TLabel
|
||||
Left = 994
|
||||
Top = 311
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #22791#27880
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object fwsContact: TEdit
|
||||
Tag = 2
|
||||
Left = 327
|
||||
Top = 35
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 0
|
||||
end
|
||||
object fwsPhone: TEdit
|
||||
Tag = 2
|
||||
Left = 562
|
||||
Top = 35
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 1
|
||||
end
|
||||
object fwsaddress: TEdit
|
||||
Tag = 2
|
||||
Left = 802
|
||||
Top = 35
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 2
|
||||
end
|
||||
object CKfirmContact: TEdit
|
||||
Tag = 2
|
||||
Left = 327
|
||||
Top = 91
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 3
|
||||
end
|
||||
object CKfirmPhone: TEdit
|
||||
Tag = 2
|
||||
Left = 562
|
||||
Top = 91
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 4
|
||||
end
|
||||
object CKfirmmailbox: TEdit
|
||||
Tag = 2
|
||||
Left = 802
|
||||
Top = 91
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 5
|
||||
end
|
||||
object CKfirmaddress: TEdit
|
||||
Tag = 2
|
||||
Left = 1036
|
||||
Top = 91
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 6
|
||||
end
|
||||
object SHfirmContact: TEdit
|
||||
Tag = 2
|
||||
Left = 327
|
||||
Top = 155
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 7
|
||||
end
|
||||
object SHfirmPhone: TEdit
|
||||
Tag = 2
|
||||
Left = 562
|
||||
Top = 155
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 8
|
||||
end
|
||||
object SHfirmmailbox: TEdit
|
||||
Tag = 2
|
||||
Left = 802
|
||||
Top = 155
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 9
|
||||
end
|
||||
object SHfirmaddress: TEdit
|
||||
Tag = 2
|
||||
Left = 1036
|
||||
Top = 155
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 10
|
||||
end
|
||||
object SJInformation: TEdit
|
||||
Tag = 2
|
||||
Left = 77
|
||||
Top = 211
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 11
|
||||
end
|
||||
object TYdate: TDateTimePicker
|
||||
Tag = 2
|
||||
Left = 327
|
||||
Top = 209
|
||||
Width = 140
|
||||
Height = 22
|
||||
BevelInner = bvNone
|
||||
Date = 40916.000000000000000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 0.670856296288548000
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 12
|
||||
end
|
||||
object ZGfinishdate: TDateTimePicker
|
||||
Tag = 2
|
||||
Left = 562
|
||||
Top = 209
|
||||
Width = 140
|
||||
Height = 22
|
||||
BevelInner = bvNone
|
||||
Date = 40916.000000000000000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 0.670856296288548000
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 13
|
||||
OnChange = ZGfinishdateChange
|
||||
end
|
||||
object SJshipmentdate: TDateTimePicker
|
||||
Tag = 2
|
||||
Left = 802
|
||||
Top = 209
|
||||
Width = 140
|
||||
Height = 22
|
||||
BevelInner = bvNone
|
||||
Date = 40916.000000000000000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 0.670856296288548000
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 14
|
||||
end
|
||||
object boat: TEdit
|
||||
Tag = 2
|
||||
Left = 1036
|
||||
Top = 211
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 15
|
||||
end
|
||||
object Voyage: TEdit
|
||||
Tag = 2
|
||||
Left = 77
|
||||
Top = 267
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 16
|
||||
end
|
||||
object containerNO: TEdit
|
||||
Tag = 2
|
||||
Left = 327
|
||||
Top = 267
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 17
|
||||
end
|
||||
object AccessoriesNO: TEdit
|
||||
Tag = 2
|
||||
Left = 562
|
||||
Top = 267
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 18
|
||||
OnChange = AccessoriesNOChange
|
||||
end
|
||||
object CustomsNO: TEdit
|
||||
Tag = 2
|
||||
Left = 802
|
||||
Top = 267
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 19
|
||||
end
|
||||
object TDNO: TEdit
|
||||
Tag = 2
|
||||
Left = 1036
|
||||
Top = 267
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 20
|
||||
end
|
||||
object Service: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 77
|
||||
Top = 35
|
||||
Width = 140
|
||||
Height = 21
|
||||
Hint = 'Servicecode'
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 21
|
||||
OnBtnUpClick = ServiceBtnUpClick
|
||||
OnBtnDnClick = ServiceBtnDnClick
|
||||
end
|
||||
object CKfirmName: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 77
|
||||
Top = 89
|
||||
Width = 140
|
||||
Height = 21
|
||||
Hint = 'CKfirmNamecode'
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 22
|
||||
OnBtnUpClick = CKfirmNameBtnUpClick
|
||||
OnBtnDnClick = CKfirmNameBtnDnClick
|
||||
end
|
||||
object SHfirmName: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 77
|
||||
Top = 155
|
||||
Width = 140
|
||||
Height = 21
|
||||
Hint = 'SHfirmNamecode'
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 23
|
||||
OnBtnUpClick = SHfirmNameBtnUpClick
|
||||
OnBtnDnClick = SHfirmNameBtnDnClick
|
||||
end
|
||||
object ZYSK: TEdit
|
||||
Tag = 2
|
||||
Left = 77
|
||||
Top = 307
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 24
|
||||
end
|
||||
object YHF: TEdit
|
||||
Tag = 2
|
||||
Left = 328
|
||||
Top = 307
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 25
|
||||
end
|
||||
object FD: TEdit
|
||||
Tag = 2
|
||||
Left = 802
|
||||
Top = 307
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 26
|
||||
end
|
||||
object note: TEdit
|
||||
Tag = 2
|
||||
Left = 1036
|
||||
Top = 306
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 27
|
||||
end
|
||||
object YSKTime: TDateTimePicker
|
||||
Tag = 2
|
||||
Left = 568
|
||||
Top = 306
|
||||
Width = 140
|
||||
Height = 22
|
||||
BevelInner = bvNone
|
||||
Date = 40916.000000000000000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 0.670856296288548000
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 28
|
||||
end
|
||||
end
|
||||
object ToolBar2: TToolBar
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 385
|
||||
Width = 1400
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 75
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
GradientEndColor = 15717318
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
object ToolButton2: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 2
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 6
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
end
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 0
|
||||
Top = 423
|
||||
Width = 1400
|
||||
Height = 195
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object TV3: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
DataController.DataSource = DS_3
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.IncSearch = DataLink_Company.SHuangSe
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Styles.Inactive = DataLink_Company.SHuangSe
|
||||
Styles.Selection = DataLink_Company.SHuangSe
|
||||
object TV3Column12: TcxGridDBColumn
|
||||
Tag = 9
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 42
|
||||
end
|
||||
object TV3Column1: TcxGridDBColumn
|
||||
Caption = #24207#21495
|
||||
DataBinding.FieldName = 'XH'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 52
|
||||
end
|
||||
object TV3Column2: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'ProductNO'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object TV3Column3: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'Productname'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object TV3Column4: TcxGridDBColumn
|
||||
Caption = #27454#21495
|
||||
DataBinding.FieldName = 'KHNO'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object TV3Column5: TcxGridDBColumn
|
||||
Caption = #26465#30721
|
||||
DataBinding.FieldName = 'Barcodes'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object TV3Column6: TcxGridDBColumn
|
||||
Caption = #35746#21333#25968#37327
|
||||
DataBinding.FieldName = 'DDQTY'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object TV3Column7: TcxGridDBColumn
|
||||
Caption = #24050#20986#36816#25968#37327
|
||||
DataBinding.FieldName = 'YShippingQTY'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 79
|
||||
end
|
||||
object TV3Column8: TcxGridDBColumn
|
||||
Caption = #26412#27425#20986#36816#25968#37327
|
||||
DataBinding.FieldName = 'BCdecimalQTY'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV3Column8PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 86
|
||||
end
|
||||
object TV3Column9: TcxGridDBColumn
|
||||
Caption = #20869#35013#25968#37327
|
||||
DataBinding.FieldName = 'BuiltinQTY'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV3Column8PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object TV3Column10: TcxGridDBColumn
|
||||
Caption = #31665#25968
|
||||
DataBinding.FieldName = 'Boxs'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV3Column8PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object TV3Column11: TcxGridDBColumn
|
||||
Caption = #20307#31215
|
||||
DataBinding.FieldName = 'volume'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object TV3Column13: TcxGridDBColumn
|
||||
Caption = #24635#20307#31215
|
||||
DataBinding.FieldName = 'Zvolume'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV3Column8PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object TV3Column14: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'CS_Color'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = TV3
|
||||
end
|
||||
end
|
||||
object GPM_3: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 328
|
||||
Top = 470
|
||||
end
|
||||
object CDS_3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 584
|
||||
Top = 470
|
||||
end
|
||||
object DS_3: TDataSource
|
||||
DataSet = CDS_3
|
||||
Left = 747
|
||||
Top = 470
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 1094
|
||||
Top = 88
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1085
|
||||
Top = 145
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1083
|
||||
Top = 208
|
||||
end
|
||||
object ADOCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 784
|
||||
Top = 269
|
||||
end
|
||||
object ADOTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 720
|
||||
Top = 269
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 685
|
||||
Top = 457
|
||||
end
|
||||
end
|
||||
648
A01基础公司管理/U_CYSZ.pas
Normal file
648
A01基础公司管理/U_CYSZ.pas
Normal file
|
|
@ -0,0 +1,648 @@
|
|||
unit U_CYSZ;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
|
||||
System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs,
|
||||
Vcl.ComCtrls, Vcl.ToolWin, Vcl.ExtCtrls, dxBarBuiltInMenu, Data.DB,
|
||||
Datasnap.DBClient, cxClasses, cxGridCustomPopupMenu, cxGridPopupMenu,
|
||||
cxGraphics, cxControls, cxLookAndFeels, cxLookAndFeelPainters, cxStyles,
|
||||
dxSkinsCore, dxSkinsDefaultPainters, cxCustomData, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, cxNavigator, dxDateRanges, cxDBData, cxGridLevel,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridCustomView,
|
||||
cxGrid, Vcl.StdCtrls, Data.Win.ADODB, cxCheckBox, BtnEdit, cxCalendar,
|
||||
cxTextEdit, math, dxSkinOffice2013White, dxSkinWXI, dxScrollbarAnnotations;
|
||||
|
||||
type
|
||||
TfrmCYSZ = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
ToolButton4: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ToolBar2: TToolBar;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
GPM_3: TcxGridPopupMenu;
|
||||
CDS_3: TClientDataSet;
|
||||
DS_3: TDataSource;
|
||||
cxGrid3: TcxGrid;
|
||||
TV3: TcxGridDBTableView;
|
||||
TV3Column1: TcxGridDBColumn;
|
||||
TV3Column2: TcxGridDBColumn;
|
||||
TV3Column3: TcxGridDBColumn;
|
||||
TV3Column4: TcxGridDBColumn;
|
||||
TV3Column5: TcxGridDBColumn;
|
||||
TV3Column6: TcxGridDBColumn;
|
||||
TV3Column7: TcxGridDBColumn;
|
||||
TV3Column8: TcxGridDBColumn;
|
||||
TV3Column9: TcxGridDBColumn;
|
||||
TV3Column10: TcxGridDBColumn;
|
||||
TV3Column11: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
Label16: TLabel;
|
||||
fwsContact: TEdit;
|
||||
Label1: TLabel;
|
||||
fwsPhone: TEdit;
|
||||
Label2: TLabel;
|
||||
fwsaddress: TEdit;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
CKfirmContact: TEdit;
|
||||
Label6: TLabel;
|
||||
CKfirmPhone: TEdit;
|
||||
Label7: TLabel;
|
||||
CKfirmmailbox: TEdit;
|
||||
Label8: TLabel;
|
||||
CKfirmaddress: TEdit;
|
||||
Label9: TLabel;
|
||||
SHfirmContact: TEdit;
|
||||
Label10: TLabel;
|
||||
Label11: TLabel;
|
||||
SHfirmPhone: TEdit;
|
||||
Label12: TLabel;
|
||||
SHfirmmailbox: TEdit;
|
||||
Label13: TLabel;
|
||||
SHfirmaddress: TEdit;
|
||||
Label15: TLabel;
|
||||
SJInformation: TEdit;
|
||||
Label14: TLabel;
|
||||
TYdate: TDateTimePicker;
|
||||
Label17: TLabel;
|
||||
ZGfinishdate: TDateTimePicker;
|
||||
Label18: TLabel;
|
||||
SJshipmentdate: TDateTimePicker;
|
||||
Label19: TLabel;
|
||||
boat: TEdit;
|
||||
Label20: TLabel;
|
||||
Voyage: TEdit;
|
||||
containerNO: TEdit;
|
||||
Label21: TLabel;
|
||||
Label22: TLabel;
|
||||
AccessoriesNO: TEdit;
|
||||
Label23: TLabel;
|
||||
CustomsNO: TEdit;
|
||||
Label24: TLabel;
|
||||
TDNO: TEdit;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOCmd: TADOQuery;
|
||||
ADOTemp: TADOQuery;
|
||||
ADOQuery1: TADOQuery;
|
||||
TV3Column12: TcxGridDBColumn;
|
||||
Service: TBtnEditC;
|
||||
CKfirmName: TBtnEditC;
|
||||
SHfirmName: TBtnEditC;
|
||||
Label25: TLabel;
|
||||
ZYSK: TEdit;
|
||||
Label27: TLabel;
|
||||
YHF: TEdit;
|
||||
Label28: TLabel;
|
||||
Label29: TLabel;
|
||||
FD: TEdit;
|
||||
Label30: TLabel;
|
||||
note: TEdit;
|
||||
YSKTime: TDateTimePicker;
|
||||
TV3Column13: TcxGridDBColumn;
|
||||
TV3Column14: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure ServiceBtnDnClick(Sender: TObject);
|
||||
procedure CKfirmNameBtnDnClick(Sender: TObject);
|
||||
procedure SHfirmNameChange(Sender: TObject);
|
||||
procedure SHfirmNameBtnDnClick(Sender: TObject);
|
||||
procedure ServiceBtnUpClick(Sender: TObject);
|
||||
procedure CKfirmNameBtnUpClick(Sender: TObject);
|
||||
procedure SHfirmNameBtnUpClick(Sender: TObject);
|
||||
procedure TV3Column8PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure ZGfinishdateChange(Sender: TObject);
|
||||
procedure AccessoriesNOChange(Sender: TObject);
|
||||
private
|
||||
procedure SetXH();
|
||||
function SaveData(): Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
PState: string;
|
||||
Fmainid: string;
|
||||
FFBIOSID: string;
|
||||
FAuthority, FGSTT: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmCYSZ: TfrmCYSZ;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_FLJHD, U_CompanySel;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmCYSZ.ServiceBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
TBtnEditC(Sender).TxtCode := '';
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.ServiceBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmCompanySel := TfrmCompanySel.Create(Application);
|
||||
with frmCompanySel do
|
||||
begin
|
||||
FCoType := '供应商';
|
||||
FLX := '采购合同';
|
||||
FCY := '出运';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
self.Service.TxtCode := Trim(frmCompanySel.CDS_1.fieldbyname('CoCode').AsString);
|
||||
self.Service.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoAbbrName').AsString);
|
||||
self.fwsPhone.Text := Trim(frmCompanySel.CDS_1.fieldbyname('Telephone').AsString);
|
||||
self.fwsaddress.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoAddress').AsString);
|
||||
self.fwsContact.Text := Trim(frmCompanySel.CDS_1.fieldbyname('Contacts').AsString);
|
||||
end;
|
||||
end;
|
||||
|
||||
finally
|
||||
frmCompanySel.Free;
|
||||
end;
|
||||
|
||||
// try
|
||||
// frmCompanySel := TfrmCompanySel.Create(Application);
|
||||
// with frmCompanySel do
|
||||
// begin
|
||||
// FCoType := '客户';
|
||||
// FCY := '出运';
|
||||
// if Self.FAuthority = '录入' then
|
||||
// FAuthority := '理单业务';
|
||||
// if ShowModal = 1 then
|
||||
// begin
|
||||
// self.Service.TxtCode := Trim(frmCompanySel.CDS_1.fieldbyname('CoCode').AsString);
|
||||
// self.Service.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoName').AsString);
|
||||
// self.fwsPhone.Text := Trim(frmCompanySel.CDS_1.fieldbyname('Phone').AsString);
|
||||
// self.fwsaddress.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoAddress').AsString);
|
||||
// end;
|
||||
// end;
|
||||
//
|
||||
// finally
|
||||
// frmCompanySel.Free;
|
||||
// end;
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.SetXH();
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
with CDS_3 do
|
||||
begin
|
||||
First;
|
||||
i := 1;
|
||||
while not Eof do
|
||||
begin
|
||||
with CDS_3 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('XHNoTemp').Value := i;
|
||||
Post;
|
||||
end;
|
||||
i := i + 1;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
with CDS_3 do
|
||||
begin
|
||||
CDS_3.IndexFieldNames := '';
|
||||
First;
|
||||
i := 1;
|
||||
while not Eof do
|
||||
begin
|
||||
with CDS_3 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('XH').Value := FieldByName('XHNoTemp').AsInteger;
|
||||
Post;
|
||||
end;
|
||||
i := i + 1;
|
||||
Next;
|
||||
end;
|
||||
CDS_3.IndexFieldNames := 'XH';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.SHfirmNameBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
TBtnEditC(Sender).TxtCode := '';
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.SHfirmNameBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmCompanySel := TfrmCompanySel.Create(Application);
|
||||
with frmCompanySel do
|
||||
begin
|
||||
FCoType := '客户';
|
||||
FCY := '出运';
|
||||
if Self.FAuthority = '录入' then
|
||||
FAuthority := '理单业务';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
self.SHfirmName.TxtCode := Trim(frmCompanySel.CDS_1.fieldbyname('CoCode').AsString);
|
||||
self.SHfirmName.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoAbbrName').AsString);
|
||||
self.SHfirmContact.Text := Trim(frmCompanySel.CDS_1.fieldbyname('Contacts').AsString);
|
||||
self.SHfirmPhone.Text := Trim(frmCompanySel.CDS_1.fieldbyname('Phone').AsString);
|
||||
self.SHfirmaddress.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoAddress').AsString);
|
||||
end;
|
||||
end;
|
||||
|
||||
finally
|
||||
frmCompanySel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.SHfirmNameChange(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
TBtnEditC(Sender).TxtCode := '';
|
||||
end;
|
||||
|
||||
function TfrmCYSZ.SaveData(): Boolean;
|
||||
var
|
||||
maxno: string;
|
||||
fconNO, fmxType, fDate: string;
|
||||
begin
|
||||
try
|
||||
ADOCmd.Connection.BeginTrans;
|
||||
//////////////// 保存主表 //////////////////////
|
||||
if Trim(Fmainid) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOTemp, maxno, 'CY', 'BS_CYGL_Main', 3, 1) = False then
|
||||
raise Exception.Create('取最大号失败!');
|
||||
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxno := Trim(Fmainid);
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select * from BS_CYGL_Main where mainid=''' + Trim(Fmainid) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if Trim(Fmainid) = '' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
// FieldByName('status').Value := '0';
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Updater').Value := Trim(DName);
|
||||
FieldByName('GXdate').Value := SGetServerDateTime(ADOTemp);
|
||||
end;
|
||||
FieldByName('mainid').Value := Trim(maxno);
|
||||
FieldByName('BIOSID').Value := Trim(FFBIOSID);
|
||||
RTSetsavedata(ADOCmd, 'BS_JYGL_Main', Panel1, 2);
|
||||
FieldByName('Servicecode').Value := Trim(Service.TxtCode);
|
||||
FieldByName('CKfirmNamecode').Value := Trim(CKfirmName.TxtCode);
|
||||
FieldByName('SHfirmNamecode').Value := Trim(SHfirmName.TxtCode);
|
||||
Post;
|
||||
end;
|
||||
// with ADOCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('select * from BS_Contract_Main where ConNo=''' + Trim(ConNo.Text) + '''');
|
||||
// Open;
|
||||
// end;
|
||||
// if ADOCmd.RecordCount > 1 then
|
||||
// raise Exception.Create('合同号重复!');
|
||||
|
||||
Fmainid := Trim(maxno);
|
||||
//////////////// 保存主表 //////////////////////
|
||||
///
|
||||
//////////////// 保存子表 //////////////////////
|
||||
with CDS_3 do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Trim(CDS_3.fieldbyname('SubId').AsString) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOCmd, maxno, 'JS', 'BS_CYGL_sub', 4, 1) = False then
|
||||
begin
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取子流水号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxno := Trim(CDS_3.fieldbyname('SubId').AsString);
|
||||
end;
|
||||
|
||||
// maxno := Trim(CDS_3.fieldbyname('subid').AsString);
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BS_CYGL_sub where subid=''' + Trim(maxno) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if ADOCmd.IsEmpty then
|
||||
Append
|
||||
else
|
||||
Edit;
|
||||
RTSetSaveDataCDS(ADOCmd, Tv3, CDS_3, 'BS_JYGL_sub', 0);
|
||||
FieldByName('mainid').Value := Trim(Fmainid);
|
||||
FieldByName('subid').Value := Trim(maxno);
|
||||
FieldByName('BIOSID').Value := Trim(FFBIOSID);
|
||||
Post;
|
||||
end;
|
||||
with CDS_3 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('subid').Value := Trim(maxno);
|
||||
Post;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
ADOCmd.Connection.CommitTrans;
|
||||
Result := True;
|
||||
except
|
||||
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
|
||||
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||
|
||||
Result := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.AccessoriesNOChange(Sender: TObject);
|
||||
begin
|
||||
YSKTime.DateTime := ZGfinishdate.DateTime + StrToIntdef(AccessoriesNO.text, 0);
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.CKfirmNameBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
TBtnEditC(Sender).TxtCode := '';
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.CKfirmNameBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmCompanySel := TfrmCompanySel.Create(Application);
|
||||
with frmCompanySel do
|
||||
begin
|
||||
FCoType := '我司';
|
||||
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
self.CKfirmName.TxtCode := Trim(frmCompanySel.CDS_1.fieldbyname('CoCode').AsString);
|
||||
self.CKfirmName.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoAbbrName').AsString);
|
||||
self.CKfirmPhone.Text := Trim(frmCompanySel.CDS_1.fieldbyname('Phone').AsString);
|
||||
self.CKfirmaddress.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoAddress').AsString);
|
||||
end;
|
||||
end;
|
||||
|
||||
finally
|
||||
frmCompanySel.Free;
|
||||
end;
|
||||
|
||||
// try
|
||||
// frmCompanySel := TfrmCompanySel.Create(Application);
|
||||
// with frmCompanySel do
|
||||
// begin
|
||||
// FCoType := '客户';
|
||||
// FCY := '出运';
|
||||
// if Self.FAuthority = '录入' then
|
||||
// FAuthority := '理单业务';
|
||||
// if ShowModal = 1 then
|
||||
// begin
|
||||
// self.CKfirmName.TxtCode := Trim(frmCompanySel.CDS_1.fieldbyname('CoCode').AsString);
|
||||
// self.CKfirmName.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoName').AsString);
|
||||
// self.CKfirmPhone.Text := Trim(frmCompanySel.CDS_1.fieldbyname('Phone').AsString);
|
||||
// self.CKfirmaddress.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoAddress').AsString);
|
||||
// end;
|
||||
// end;
|
||||
//
|
||||
// finally
|
||||
// frmCompanySel.Free;
|
||||
// end;
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmCYSZ := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid(trim(self.caption) + 'Tv3', Tv3, '出运信息');
|
||||
with ADOTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from BS_CYGL_Sub ');
|
||||
sql.Add('where mainid=''' + Trim(Fmainid) + '''');
|
||||
// sql.Add(' order by SerialNo ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOTemp, CDS_3);
|
||||
SInitCDSData(ADOTemp, CDS_3);
|
||||
|
||||
with ADOTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BS_CYGL_Main where mainid=''' + Trim(Fmainid) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCSHData(ADOTemp, Panel1, 2);
|
||||
|
||||
if PState = '新增' then
|
||||
begin
|
||||
TYdate.DateTime := SGetServerDateTime(ADOTemp);
|
||||
ZGfinishdate.DateTime := SGetServerDateTime(ADOTemp);
|
||||
SJshipmentdate.DateTime := SGetServerDateTime(ADOTemp);
|
||||
YSKTime.DateTime := SGetServerDateTime(ADOTemp) + 50;
|
||||
// DlyDate.DateTime := ConDate.DateTime;
|
||||
// ZDDate.DateTime := ConDate.DateTime;
|
||||
// ConNo.Text := '自动生成';
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(trim(self.caption) + 'Tv3', Tv3, '出运信息');
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.ToolButton2Click(Sender: TObject);
|
||||
var
|
||||
FConMainId, FMPRTCode: string;
|
||||
maxno: string;
|
||||
S: Integer;
|
||||
begin
|
||||
|
||||
try
|
||||
frmFLJHD := TfrmFLJHD.Create(Application);
|
||||
with frmFLJHD do
|
||||
begin
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
S := self.CDS_3.RecordCount;
|
||||
while Order_Main.locate('SSel', true, []) do
|
||||
begin
|
||||
if GetLSNo(ADOCmd, maxno, 'CS', 'BS_CYGL_Sub', 4, 1) = False then
|
||||
begin
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取子流水号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
S := S + 1;
|
||||
with self.CDS_3 do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('SSel').Value := false;
|
||||
Fieldbyname('XH').value := S;
|
||||
Fieldbyname('ProductNO').value := trim(frmFLJHD.Order_Main.Fieldbyname('C_Code').AsString);
|
||||
Fieldbyname('Productname').value := trim(frmFLJHD.Order_Main.Fieldbyname('C_Name').AsString);
|
||||
Fieldbyname('KHNO').value := trim(frmFLJHD.Order_Main.Fieldbyname('C_StyleNo').AsString);
|
||||
Fieldbyname('Barcodes').value := trim(frmFLJHD.Order_Main.Fieldbyname('C_Barcodes').AsString);
|
||||
Fieldbyname('CS_Color').value := trim(frmFLJHD.Order_Main.Fieldbyname('C_COLOR').AsString);
|
||||
Fieldbyname('DDQTY').value := frmFLJHD.Order_Main.Fieldbyname('OrdQty').AsFloat;
|
||||
// Fieldbyname('Boxs').value := frmFLJHD.Order_Main.Fieldbyname('C_box').AsFloat;
|
||||
Fieldbyname('volume').value := frmFLJHD.Order_Main.Fieldbyname('C_volume').AsFloat;
|
||||
Fieldbyname('BuiltinQTY').value := frmFLJHD.Order_Main.Fieldbyname('C_Crate').AsFloat;
|
||||
Post;
|
||||
end;
|
||||
|
||||
Order_Main.Edit;
|
||||
Order_Main.fieldbyname('SSel').value := false;
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmFLJHD.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_3.IsEmpty then
|
||||
Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
while CDS_3.Locate('SSel', True, []) do
|
||||
begin
|
||||
if Trim(CDS_3.fieldbyname('subid').AsString) <> '' then
|
||||
begin
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete BS_CYGL_sub where subid=''' + Trim(CDS_3.fieldbyname('subid').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
CDS_3.Delete;
|
||||
end;
|
||||
SetXH();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.ToolButton4Click(Sender: TObject);
|
||||
begin
|
||||
if trim(AccessoriesNO.text) = '' then
|
||||
begin
|
||||
Application.MessageBox('付款间隔不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.TV3Column8PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
FBCdecimalQTY, FBoxs, FZvolume, FBuiltinQTY, Fvolume: Double;
|
||||
begin
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue) = '' then
|
||||
begin
|
||||
mvalue := '0';
|
||||
end;
|
||||
FFieldName := Trim(Tv3.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
|
||||
with CDS_3 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).value := Trim(mvalue);
|
||||
Post;
|
||||
end;
|
||||
|
||||
with CDS_3 do
|
||||
begin
|
||||
FBCdecimalQTY := Fieldbyname('BCdecimalQTY').AsFloat; //本次出运数量
|
||||
FBuiltinQTY := Fieldbyname('BuiltinQTY').AsFloat; //内装箱数
|
||||
Fvolume := Fieldbyname('volume').AsFloat; //体积
|
||||
end;
|
||||
|
||||
FBoxs := RoundFloat(FBCdecimalQTY / FBuiltinQTY, 2); //箱数
|
||||
FZvolume := Fvolume * FBoxs; //总体积
|
||||
with CDS_3 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Boxs').value := FBoxs;
|
||||
FieldByName('Zvolume').value := FZvolume;
|
||||
Post;
|
||||
end;
|
||||
|
||||
tv3.Controller.EditingController.ShowEdit();
|
||||
end;
|
||||
|
||||
procedure TfrmCYSZ.ZGfinishdateChange(Sender: TObject);
|
||||
begin
|
||||
// YSKTime.DateTime := ZGfinishdate.DateTime + 50;
|
||||
YSKTime.DateTime := ZGfinishdate.DateTime + StrToIntdef(AccessoriesNO.text, 0);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
4998
A01基础公司管理/U_CYTradeSalesContractSel.dfm
Normal file
4998
A01基础公司管理/U_CYTradeSalesContractSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
375
A01基础公司管理/U_CYTradeSalesContractSel.pas
Normal file
375
A01基础公司管理/U_CYTradeSalesContractSel.pas
Normal file
|
|
@ -0,0 +1,375 @@
|
|||
unit U_CYTradeSalesContractSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseHelp, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
||||
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxNavigator,
|
||||
dxDateRanges, dxBarBuiltInMenu, System.ImageList, U_BaseInput, cxButtonEdit,
|
||||
cxDropDownEdit, cxCheckBox, Vcl.Menus, cxMemo, cxPC, dxSkinOffice2013White,
|
||||
dxSkinWXI, dxScrollbarAnnotations;
|
||||
|
||||
type
|
||||
TfrmCYTradeSalesContractSel = class(TfrmBaseHelp)
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
ADOConnection1: TADOConnection;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
ConNo: TEdit;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
ImageList1: TImageList;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
cxStyle1: TcxStyle;
|
||||
cxGrid1: TcxGrid;
|
||||
TV1: TcxGridDBTableView;
|
||||
VC_SCSCode: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1PRTOrderQty: TcxGridDBColumn;
|
||||
v1OrderUnit: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
TV1Column1: TcxGridDBColumn;
|
||||
TV1Column2: TcxGridDBColumn;
|
||||
TV1Column3: TcxGridDBColumn;
|
||||
TV1Column4: TcxGridDBColumn;
|
||||
TV1Column5: TcxGridDBColumn;
|
||||
TV1Column6: TcxGridDBColumn;
|
||||
ThreeColorBase: TcxStyleRepository;
|
||||
SHuangSe: TcxStyle;
|
||||
SkyBlue: TcxStyle;
|
||||
Default: TcxStyle;
|
||||
QHuangSe: TcxStyle;
|
||||
Red: TcxStyle;
|
||||
FontBlue: TcxStyle;
|
||||
TextSHuangSe: TcxStyle;
|
||||
FonePurple: TcxStyle;
|
||||
FoneClMaroon: TcxStyle;
|
||||
FoneRed: TcxStyle;
|
||||
RowColor: TcxStyle;
|
||||
handBlack: TcxStyle;
|
||||
cxBlue: TcxStyle;
|
||||
SHuangSeCu: TcxStyle;
|
||||
TV1Column7: TcxGridDBColumn;
|
||||
PM_1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
Label2: TLabel;
|
||||
C_Name: TEdit;
|
||||
Label3: TLabel;
|
||||
BuyName: TEdit;
|
||||
TV1Column8: TcxGridDBColumn;
|
||||
TV1Column9: TcxGridDBColumn;
|
||||
TV1Column10: TcxGridDBColumn;
|
||||
TV1Column11: TcxGridDBColumn;
|
||||
TV1Column12: TcxGridDBColumn;
|
||||
TV1Column13: TcxGridDBColumn;
|
||||
TV1Column14: TcxGridDBColumn;
|
||||
BuyConNo: TEdit;
|
||||
Label4: TLabel;
|
||||
TV1Column15: TcxGridDBColumn;
|
||||
cxTabControl1: TcxTabControl;
|
||||
TV1Column16: TcxGridDBColumn;
|
||||
TV1Column17: TcxGridDBColumn;
|
||||
TV1Column18: TcxGridDBColumn;
|
||||
TV1Column19: TcxGridDBColumn;
|
||||
TV1Column20: TcxGridDBColumn;
|
||||
TV1Column21: TcxGridDBColumn;
|
||||
TV1Column22: TcxGridDBColumn;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure TV1DblClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure ConNoChange(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure SetStatus();
|
||||
{ Private declarations }
|
||||
public
|
||||
FCoType, FAuthority, FConNo, FC_Code, FLX: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmCYTradeSalesContractSel: TfrmCYTradeSalesContractSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_TradeSalesContractSel;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmCYTradeSalesContractSel.SetStatus();
|
||||
begin
|
||||
// btnCopy.Enabled := false;
|
||||
// tbadd.Enabled := false;
|
||||
// TBEdit.Enabled := False;
|
||||
// TBDel.Enabled := False;
|
||||
// TBTJ.Enabled := False;
|
||||
// TBTJCX.Enabled := False;
|
||||
// tchk.Enabled := false;
|
||||
// tnochk.Enabled := false;
|
||||
// TWC.Enabled := False;
|
||||
// TNowc.Enabled := False;
|
||||
// TBDel.Enabled := False;
|
||||
ToolButton1.Enabled := False;
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
ToolButton1.Enabled := true;
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
ToolButton1.Enabled := true;
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCYTradeSalesContractSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
application.MessageBox('网络连接失败!', '提示信息');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCYTradeSalesContractSel.ConNoChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCYTradeSalesContractSel.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
// inherited;
|
||||
SetStatus();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCYTradeSalesContractSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
// ConNo.SetFocus;
|
||||
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmCYTradeSalesContractSel.InitGrid();
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from SY_User where UserName=' + quotedstr(Trim(DName)));
|
||||
Open;
|
||||
end;
|
||||
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
if FLX = '出运' then
|
||||
begin
|
||||
sql.Add('select A.* from BS_Contract_Main A ');
|
||||
end
|
||||
else
|
||||
begin
|
||||
sql.Add('select A.*,B.* from BS_Contract_Main A inner join BS_Contract_Sub B on A.ConMId=B.ConMId ');
|
||||
end;
|
||||
|
||||
sql.Add(' where isnull(A.status,''0'')=''9''');
|
||||
sql.Add(' and A.ConType in (''内销'',''外销'') ');
|
||||
if trim(fconNo) <> '' then
|
||||
sql.Add(' and conNo=' + quotedstr(fconNo));
|
||||
if trim(fC_Code) <> '' then
|
||||
sql.Add(' and C_Code=' + quotedstr(fC_Code));
|
||||
|
||||
if FLX = '出运' then
|
||||
begin
|
||||
if (ADOQueryTemp.fieldbyname('Udept').AsString = '业务部') and (Trim(DName) <> 'ADMIN') and (Trim(DName) <> '吴津') then
|
||||
begin
|
||||
sql.Add('and A.Filler =''' + Trim(DName) + ''' ');
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if FLX = '采购合同' then
|
||||
begin
|
||||
if (ADOQueryTemp.fieldbyname('Udept').AsString = '业务部') and (Trim(DName) <> '刘丽平') then
|
||||
begin
|
||||
sql.Add('and A.Filler =''' + Trim(DName) + ''' ');
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if ADOQueryTemp.fieldbyname('Udept').AsString = '业务部' then
|
||||
begin
|
||||
sql.Add('and A.Filler =''' + Trim(DName) + ''' ');
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
if FLX = '采购合同' then
|
||||
begin
|
||||
// case cxTabControl1.TabIndex of
|
||||
// 0:
|
||||
// begin
|
||||
// sql.Add(' and isnull(CGstatus,''0'')=''0'' ');
|
||||
// end;
|
||||
// 1:
|
||||
// begin
|
||||
// sql.Add(' and isnull(CGstatus,''0'')=''1'' ');
|
||||
//
|
||||
// end;
|
||||
// end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if FLX = '出运' then
|
||||
begin
|
||||
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
sql.Add(' and isnull(CYZT,''0'')=''0'' ');
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
sql.Add(' and isnull(CYZT,''0'')=''1'' ');
|
||||
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
sql.Add(' and isnull(JHDstatus,''0'')=''0'' ');
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
sql.Add(' and isnull(JHDstatus,''0'')=''1'' ');
|
||||
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
if FLX <> '出运' then
|
||||
sql.Add('order by B.SerialNo');
|
||||
|
||||
|
||||
// showmessage(sql.text);
|
||||
Open;
|
||||
end;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCYTradeSalesContractSel.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_1, True);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCYTradeSalesContractSel.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_1, False);
|
||||
end;
|
||||
|
||||
procedure TfrmCYTradeSalesContractSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
// if FLX = '出运' then
|
||||
// begin
|
||||
// cxTabControl1.Visible := false;
|
||||
// end;
|
||||
SetStatus();
|
||||
InitGrid();
|
||||
|
||||
ReadCxGrid(Trim(self.Caption), TV1, '自定义数据1');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCYTradeSalesContractSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmCYTradeSalesContractSel.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(Trim(self.Caption), TV1, '自定义数据1');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCYTradeSalesContractSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmCYTradeSalesContractSel.TV1DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmCYTradeSalesContractSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmCYTradeSalesContractSel := nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
245
A01基础公司管理/U_Company.dfm
Normal file
245
A01基础公司管理/U_Company.dfm
Normal file
|
|
@ -0,0 +1,245 @@
|
|||
inherited frmCompany: TfrmCompany
|
||||
Left = 347
|
||||
Top = 169
|
||||
Caption = #20844#21496#31649#29702
|
||||
ClientHeight = 611
|
||||
ClientWidth = 1366
|
||||
FormStyle = fsMDIChild
|
||||
Position = poScreenCenter
|
||||
Visible = True
|
||||
ExplicitWidth = 1382
|
||||
ExplicitHeight = 650
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar [0]
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1366
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 91
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
GradientEndColor = 15717318
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 1
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object btnFind: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 0
|
||||
OnClick = btnFindClick
|
||||
end
|
||||
object btnAdd: TToolButton
|
||||
Left = 142
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
ImageIndex = 9
|
||||
OnClick = btnAddClick
|
||||
end
|
||||
object btnEdit: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 3
|
||||
OnClick = btnEditClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 284
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 5
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object ToolButton5: TToolButton
|
||||
Left = 355
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #38468#20214
|
||||
ImageIndex = 22
|
||||
OnClick = ToolButton5Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 426
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 521
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid [1]
|
||||
Left = 0
|
||||
Top = 77
|
||||
Width = 1366
|
||||
Height = 534
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DS_1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.IncSearch = DataLink_Company.SHuangSe
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Styles.Inactive = DataLink_Company.SHuangSe
|
||||
Styles.Selection = DataLink_Company.SHuangSe
|
||||
object v2Column2: TcxGridDBColumn
|
||||
Caption = #20844#21496#32534#21495
|
||||
DataBinding.FieldName = 'CoCode'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 86
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Caption = #20844#21496#21517#31216
|
||||
DataBinding.FieldName = 'CoName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 127
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #20844#21496#31616#31216
|
||||
DataBinding.FieldName = 'CoAbbrName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 151
|
||||
end
|
||||
object v2Column10: TcxGridDBColumn
|
||||
Caption = #20844#21496#22320#22336
|
||||
DataBinding.FieldName = 'CoAddress'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 173
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel [2]
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 1366
|
||||
Height = 39
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clWhite
|
||||
ParentBackground = False
|
||||
TabOrder = 2
|
||||
object Label3: TLabel
|
||||
Left = 202
|
||||
Top = 13
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20844#21496#21517#31216
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 22
|
||||
Top = 13
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20844#21496#32534#21495
|
||||
end
|
||||
object CoName: TEdit
|
||||
Tag = 2
|
||||
Left = 266
|
||||
Top = 9
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
end
|
||||
object CoCode: TEdit
|
||||
Tag = 2
|
||||
Left = 85
|
||||
Top = 9
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Left = 337
|
||||
Top = 152
|
||||
end
|
||||
inherited ADOQueryBaseTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Left = 201
|
||||
Top = 145
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 613
|
||||
Top = 177
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 709
|
||||
Top = 185
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 533
|
||||
Top = 137
|
||||
end
|
||||
object GPM_1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 312
|
||||
Top = 296
|
||||
end
|
||||
object DS_1: TDataSource
|
||||
DataSet = CDS_1
|
||||
Left = 499
|
||||
Top = 283
|
||||
end
|
||||
object CDS_1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 424
|
||||
Top = 264
|
||||
end
|
||||
end
|
||||
231
A01基础公司管理/U_Company.pas
Normal file
231
A01基础公司管理/U_Company.pas
Normal file
|
|
@ -0,0 +1,231 @@
|
|||
unit U_Company;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, ComObj, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
cxNavigator, U_BaseList, dxSkinsCore, dxSkinsDefaultPainters, dxDateRanges,
|
||||
dxBarBuiltInMenu;
|
||||
|
||||
type
|
||||
TfrmCompany = class(TfrmBaseList)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
btnAdd: TToolButton;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v2Column2: TcxGridDBColumn;
|
||||
v2Column10: TcxGridDBColumn;
|
||||
btnEdit: TToolButton;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Panel1: TPanel;
|
||||
Label3: TLabel;
|
||||
Label1: TLabel;
|
||||
CoName: TEdit;
|
||||
CoCode: TEdit;
|
||||
btnFind: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton5: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure btnEditClick(Sender: TObject);
|
||||
procedure btnAddClick(Sender: TObject);
|
||||
procedure btnFindClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure ToolButton5Click(Sender: TObject);
|
||||
private
|
||||
fFlileFlag: string;
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
FAuthority: string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmCompany: TfrmCompany;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp, U_CustomerInput, U_AttachmentUpload;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmCompany.InitGrid();
|
||||
var
|
||||
FCoCode: string;
|
||||
begin
|
||||
if not CDS_1.IsEmpty then
|
||||
FCoCode := CDS_1.FieldByName('CoCode').AsString;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from BS_Company where CoType=''我司'' and Valid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
CDS_1.Locate('CoCode', FCoCode, []);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCompany.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
// frmCustomer:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCompany.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
inherited;
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmCompany.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmCompany.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
|
||||
if Trim(CDS_1.fieldbyname('COID').AsString) <> '' then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('update BS_Company set Valid=''N'' where COID=''' + Trim(CDS_1.fieldbyname('COID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
CDS_1.Delete;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCompany.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
ReadCxGrid(trim(self.Caption), Tv1, '客户管理');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCompany.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCompany.btnEditClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
try
|
||||
frmCustomerInput := TfrmCustomerInput.Create(Application);
|
||||
with frmCustomerInput do
|
||||
begin
|
||||
fFlileFlag := self.fFlileFlag;
|
||||
FCOID := Trim(Self.CDS_1.fieldbyname('COID').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCustomerInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCompany.ToolButton5Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmAttachmentUpload := TfrmAttachmentUpload.Create(Application);
|
||||
with frmAttachmentUpload do
|
||||
begin
|
||||
// FEditAuthority := True;
|
||||
if (Trim(FAuthority) = '录入') or (Trim(FAuthority) = '管理') then
|
||||
FEditAuthority := True;
|
||||
fkeyNO := Trim(Self.CDS_1.fieldbyname('Coid').AsString);
|
||||
fType := '客户';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmAttachmentUpload.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCompany.btnFindClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCompany.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(trim(self.caption), Tv1, '客户管理');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCompany.btnAddClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmCustomerInput := TfrmCustomerInput.Create(Application);
|
||||
with frmCustomerInput do
|
||||
begin
|
||||
FCOID := '';
|
||||
fFlileFlag := self.fFlileFlag;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCustomerInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
543
A01基础公司管理/U_CustInput.dfm
Normal file
543
A01基础公司管理/U_CustInput.dfm
Normal file
|
|
@ -0,0 +1,543 @@
|
|||
object frmCustInput: TfrmCustInput
|
||||
Left = 261
|
||||
Top = 149
|
||||
Caption = #23458#25143#36164#26009#24405#20837
|
||||
ClientHeight = 643
|
||||
ClientWidth = 922
|
||||
Color = clWhite
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = True
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 922
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 75
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton3: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 922
|
||||
Height = 261
|
||||
Align = alTop
|
||||
BevelInner = bvNone
|
||||
BevelOuter = bvNone
|
||||
BorderStyle = bsNone
|
||||
Color = clWhite
|
||||
Ctl3D = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentColor = False
|
||||
ParentCtl3D = False
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
object Label2: TLabel
|
||||
Left = 12
|
||||
Top = 35
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #23458#25143#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 236
|
||||
Top = 35
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #23458#25143#20840#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 39
|
||||
Top = 180
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #22791#27880
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 462
|
||||
Top = 35
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #23458#25143#31616#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 39
|
||||
Top = 109
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #22320#22336
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 262
|
||||
Top = 61
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #22269#23478
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 15
|
||||
Top = 61
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #23458#25143#31561#32423
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 684
|
||||
Top = 35
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #23458#25143#31867#22411
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 462
|
||||
Top = 60
|
||||
Width = 52
|
||||
Height = 15
|
||||
Caption = #19978#32423#21333#20301
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = 'Times New Roman'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 684
|
||||
Top = 62
|
||||
Width = 54
|
||||
Height = 12
|
||||
Caption = #30005' '#35805
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 13
|
||||
Top = 89
|
||||
Width = 54
|
||||
Height = 12
|
||||
Caption = #20256' '#30495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 236
|
||||
Top = 85
|
||||
Width = 54
|
||||
Height = 12
|
||||
Caption = #31867' '#21035
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object CoName: TEdit
|
||||
Tag = 2
|
||||
Left = 294
|
||||
Top = 31
|
||||
Width = 140
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
end
|
||||
object CoNote: TMemo
|
||||
Tag = 2
|
||||
Left = 72
|
||||
Top = 176
|
||||
Width = 818
|
||||
Height = 57
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 3
|
||||
end
|
||||
object CoAbbrName: TEdit
|
||||
Tag = 2
|
||||
Left = 520
|
||||
Top = 30
|
||||
Width = 140
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
end
|
||||
object CoCode: TEdit
|
||||
Tag = 2
|
||||
Left = 71
|
||||
Top = 31
|
||||
Width = 140
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
end
|
||||
object CoAddress: TMemo
|
||||
Tag = 2
|
||||
Left = 71
|
||||
Top = 105
|
||||
Width = 819
|
||||
Height = 57
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 4
|
||||
end
|
||||
object CoLevel: TComboBox
|
||||
Tag = 2
|
||||
Left = 71
|
||||
Top = 56
|
||||
Width = 140
|
||||
Height = 22
|
||||
Style = csDropDownList
|
||||
TabOrder = 5
|
||||
Items.Strings = (
|
||||
'A'
|
||||
'B'
|
||||
'C')
|
||||
end
|
||||
object cocountry: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 294
|
||||
Top = 57
|
||||
Width = 140
|
||||
Height = 20
|
||||
Hint = 'CoCountry/'#22269#23478
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 6
|
||||
OnBtnUpClick = cocountryBtnUpClick
|
||||
OnBtnDnClick = cocountryBtnDnClick
|
||||
end
|
||||
object CoBusinessType: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 742
|
||||
Top = 33
|
||||
Width = 140
|
||||
Height = 20
|
||||
Hint = 'CoBusinessType/'#23458#25143#31867#22411
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 7
|
||||
OnBtnUpClick = cocountryBtnUpClick
|
||||
OnBtnDnClick = cocountryBtnDnClick
|
||||
end
|
||||
object ParentCoName: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 520
|
||||
Top = 56
|
||||
Width = 140
|
||||
Height = 20
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 8
|
||||
OnBtnUpClick = ParentCoNameBtnUpClick
|
||||
OnBtnDnClick = cocountryBtnDnClick
|
||||
end
|
||||
object Phone: TEdit
|
||||
Tag = 2
|
||||
Left = 742
|
||||
Top = 58
|
||||
Width = 140
|
||||
Height = 20
|
||||
TabOrder = 9
|
||||
end
|
||||
object fax: TEdit
|
||||
Tag = 2
|
||||
Left = 71
|
||||
Top = 82
|
||||
Width = 140
|
||||
Height = 20
|
||||
TabOrder = 10
|
||||
end
|
||||
object GYSType: TEdit
|
||||
Tag = 2
|
||||
Left = 294
|
||||
Top = 81
|
||||
Width = 140
|
||||
Height = 20
|
||||
TabOrder = 11
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 299
|
||||
Width = 922
|
||||
Height = 344
|
||||
Align = alClient
|
||||
Caption = 'Panel1'
|
||||
TabOrder = 2
|
||||
object Panel3: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 920
|
||||
Height = 342
|
||||
Align = alClient
|
||||
Caption = 'Panel1'
|
||||
TabOrder = 0
|
||||
object ToolBar3: TToolBar
|
||||
Tag = 1
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 918
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 91
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton2: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #35774#20026#40664#35748
|
||||
ImageIndex = 15
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton6: TToolButton
|
||||
Left = 95
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 2
|
||||
OnClick = ToolButton6Click
|
||||
end
|
||||
object ToolButton7: TToolButton
|
||||
Left = 166
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 6
|
||||
OnClick = ToolButton7Click
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 1
|
||||
Top = 39
|
||||
Width = 918
|
||||
Height = 302
|
||||
Align = alClient
|
||||
BorderStyle = cxcbsNone
|
||||
TabOrder = 1
|
||||
object TV2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DSLXR
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #40664#35748
|
||||
DataBinding.FieldName = 'IsDefault'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #32852#31995#20154
|
||||
DataBinding.FieldName = 'Contacts'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.CharCase = ecUpperCase
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 77
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #32844#20301
|
||||
DataBinding.FieldName = 'position'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Caption = #32852#31995#30005#35805
|
||||
DataBinding.FieldName = 'Telephone'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.CharCase = ecUpperCase
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 86
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #25163#26426#21495
|
||||
DataBinding.FieldName = 'PhoneNumber'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.CharCase = ecUpperCase
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 109
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'EMAIL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object TV2Column2: TcxGridDBColumn
|
||||
Caption = #24494#20449#21495
|
||||
DataBinding.FieldName = 'WeChat'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = TV2
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 971
|
||||
Top = 192
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 830
|
||||
Top = 192
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 933
|
||||
Top = 121
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 294
|
||||
Top = 502
|
||||
end
|
||||
object CDS_LXR: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 377
|
||||
Top = 503
|
||||
end
|
||||
object DSLXR: TDataSource
|
||||
DataSet = CDS_LXR
|
||||
Left = 464
|
||||
Top = 511
|
||||
end
|
||||
end
|
||||
522
A01基础公司管理/U_CustInput.pas
Normal file
522
A01基础公司管理/U_CustInput.pas
Normal file
|
|
@ -0,0 +1,522 @@
|
|||
unit U_CustInput;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDropDownEdit, BtnEdit, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
cxNavigator, dxSkinsCore, dxSkinsDefaultPainters, dxDateRanges,
|
||||
dxBarBuiltInMenu, U_BaseList;
|
||||
|
||||
type
|
||||
TfrmCustInput = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
ToolButton3: TToolButton;
|
||||
CDS_LXR: TClientDataSet;
|
||||
DSLXR: TDataSource;
|
||||
ScrollBox1: TScrollBox;
|
||||
Label2: TLabel;
|
||||
Label6: TLabel;
|
||||
Label7: TLabel;
|
||||
CoName: TEdit;
|
||||
CoNote: TMemo;
|
||||
Label1: TLabel;
|
||||
CoAbbrName: TEdit;
|
||||
CoCode: TEdit;
|
||||
Panel1: TPanel;
|
||||
Label4: TLabel;
|
||||
Label8: TLabel;
|
||||
CoAddress: TMemo;
|
||||
Panel3: TPanel;
|
||||
ToolBar3: TToolBar;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton6: TToolButton;
|
||||
ToolButton7: TToolButton;
|
||||
cxGrid2: TcxGrid;
|
||||
TV2: TcxGridDBTableView;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
Label10: TLabel;
|
||||
CoLevel: TComboBox;
|
||||
TV2Column2: TcxGridDBColumn;
|
||||
cocountry: TBtnEditC;
|
||||
Label3: TLabel;
|
||||
CoBusinessType: TBtnEditC;
|
||||
Label5: TLabel;
|
||||
ParentCoName: TBtnEditC;
|
||||
Label9: TLabel;
|
||||
Phone: TEdit;
|
||||
Label11: TLabel;
|
||||
fax: TEdit;
|
||||
Label12: TLabel;
|
||||
GYSType: TEdit;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure ToolButton6Click(Sender: TObject);
|
||||
procedure ToolButton7Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure cocountryBtnDnClick(Sender: TObject);
|
||||
procedure cocountryBtnUpClick(Sender: TObject);
|
||||
procedure ParentCoNameBtnUpClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
function SaveData(): Boolean;
|
||||
public
|
||||
fkhType: string;
|
||||
{ Public declarations }
|
||||
FCOID: string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmCustInput: TfrmCustInput;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp, U_YGSel, U_CompanySel;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmCustInput.InitGrid();
|
||||
begin
|
||||
try
|
||||
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from BS_Company where CoType=''客户'' and COID=''' + Trim(FCOID) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCSHData(ADOQueryMain, ScrollBox1, 2);
|
||||
ParentCoName.TxtCode := ADOQueryMain.FieldByName('ParentCoCode').AsString;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from BS_Company_contact where COID=' + quotedstr(Trim(FCOID)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryMain, CDS_LXR);
|
||||
SInitCDSData(ADOQueryMain, CDS_LXR);
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustInput.ParentCoNameBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmCompanySel := TfrmCompanySel.Create(Application);
|
||||
with frmCompanySel do
|
||||
begin
|
||||
FCoType := '客户';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
ParentCoName.Text := Trim(CDS_1.fieldbyname('CoAbbrName').AsString);
|
||||
ParentCoName.TxtCode := Trim(CDS_1.fieldbyname('CoCode').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCompanySel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustInput.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
|
||||
frmCustInput := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCustInput.cocountryBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
TBtnEditC(Sender).TxtCode := '';
|
||||
end;
|
||||
|
||||
procedure TfrmCustInput.cocountryBtnUpClick(Sender: TObject);
|
||||
var
|
||||
fsj: string;
|
||||
FWZ: Integer;
|
||||
begin
|
||||
fsj := Trim(TEdit(Sender).Hint);
|
||||
FWZ := Pos('/', fsj);
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := Copy(fsj, 1, FWZ - 1);
|
||||
flagname := Copy(fsj, FWZ + 1, Length(fsj) - FWZ);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustInput.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmCustInput.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(trim(self.Caption) + 'TV2', Tv2, '供应商管理');
|
||||
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TfrmCustInput.FormShow(Sender: TObject);
|
||||
var
|
||||
i: integer;
|
||||
a: string;
|
||||
begin
|
||||
ReadCxGrid(trim(self.Caption) + 'TV2', Tv2, '供应商管理');
|
||||
InitGrid();
|
||||
if trim(FCOID) = '' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' exec P_BS_Com_Get_No @Str=''K'' ');
|
||||
Open;
|
||||
end;
|
||||
CoCode.Text := trim(ADOQueryTemp.FieldByName('NewCoCode').asstring);
|
||||
end;
|
||||
|
||||
|
||||
//已审核的也要能修改保存,不能修改主表内容,只能改下面两部分
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select * from BS_Company where CoId=' + quotedstr(FCoId));
|
||||
Open;
|
||||
end;
|
||||
if trim(ADOQueryTemp.FieldByName('Status').asstring) = '1' then
|
||||
begin
|
||||
ScrollBox1.Enabled := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustInput.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
function TfrmCustInput.SaveData(): Boolean;
|
||||
var
|
||||
MaxId, MaxSubId, FCoCode, FCCID: string;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if Trim(FCOID) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd, MaxId, 'CO', 'BS_Company', 4, 1) = False then
|
||||
begin
|
||||
Result := False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if trim(CoCode.Text) = '' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' exec P_BS_Com_Get_No @Str=''K'' ');
|
||||
Open;
|
||||
end;
|
||||
CoCode.Text := trim(ADOQueryTemp.FieldByName('NewCoCode').asstring);
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
MaxId := Trim(FCOID);
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BS_Company where COID=''' + Trim(FCOID) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FCOID) = '' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('FillId').Value := Trim(DCode);
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
FieldByName('Saleser').Value := trim(DName);
|
||||
FieldByName('SalesId').Value := trim(DCode);
|
||||
FieldByName('status').Value := '0';
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('EditId').Value := Trim(DCode);
|
||||
FieldByName('Editer').Value := Trim(DName);
|
||||
FieldByName('Edittime').Value := SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('COID').Value := Trim(MaxId);
|
||||
RTSetsavedata(ADOQueryCmd, 'BS_Company', ScrollBox1, 2);
|
||||
FieldByName('CoType').Value := '客户';
|
||||
FieldByName('ParentCoCode').Value := ParentCoName.TxtCode;
|
||||
Post;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BS_Company where CoCode=' + quotedstr(trim(CoCode.Text)));
|
||||
Open;
|
||||
end;
|
||||
// if ADOQueryCmd.RecordCount > 1 then
|
||||
// begin
|
||||
// ADOQueryCmd.Connection.RollbackTrans;
|
||||
// Application.MessageBox('编号重复!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('select * from BS_Company where CoName=' + quotedstr(trim(CoName.Text)));
|
||||
// sql.Add(' and CoType=''客户'' ');
|
||||
// Open;
|
||||
// end;
|
||||
// if ADOQueryCmd.RecordCount > 1 then
|
||||
// begin
|
||||
// ADOQueryCmd.Connection.RollbackTrans;
|
||||
// Application.MessageBox('名称重复!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
//
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('select * from BS_Company where CoAbbrName=' + quotedstr(trim(CoAbbrName.Text)));
|
||||
// sql.Add(' and CoType=''客户'' ');
|
||||
// Open;
|
||||
// end;
|
||||
// if ADOQueryCmd.RecordCount > 1 then
|
||||
// begin
|
||||
// ADOQueryCmd.Connection.RollbackTrans;
|
||||
// Application.MessageBox('简称重复!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
////////////// 联系人 ///////////////////
|
||||
if not CDS_LXR.IsEmpty then
|
||||
begin
|
||||
with CDS_LXR do
|
||||
begin
|
||||
CDS_LXR.First;
|
||||
while not Eof do
|
||||
begin
|
||||
FCCID := Trim(CDS_LXR.fieldbyname('CCID').AsString);
|
||||
if Trim(FCCID) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd, MaxSubId, 'CCS', 'BS_Company_contact', 4, 1) = False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取系人最大ID失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
MaxSubId := trim(FCCID);
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BS_Company_contact where CCID=' + quotedstr(Trim(MaxSubId)));
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FCCID) = '' then
|
||||
begin
|
||||
Append;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
end;
|
||||
FieldByName('CCID').Value := Trim(MaxSubId);
|
||||
FieldByName('COID').Value := Trim(MaxId);
|
||||
RTSetSaveDataCDS(ADOQueryCmd, Tv2, CDS_LXR, 'BS_Company_contact', 0);
|
||||
Post;
|
||||
end;
|
||||
with CDS_LXR do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('CCID').Value := Trim(MaxSubId);
|
||||
Post;
|
||||
end;
|
||||
CDS_LXR.Next;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
////////////// 联系人 ///////////////////
|
||||
//////////////// 更新名称 ////////////////////////
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('exec P_Com_Up_Code @COID=' + quotedstr(Trim(MaxId)));
|
||||
// ExecSQL;
|
||||
// end;
|
||||
//////////////// 更新名称 ////////////////////////
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
FCCID := Trim(MaxSubId);
|
||||
Result := True;
|
||||
except
|
||||
Result := false;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustInput.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
|
||||
if Trim(CoAbbrName.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('简称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(CoName.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
ModalResult := 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustInput.ToolButton6Click(Sender: TObject);
|
||||
var
|
||||
maxno: string;
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd, maxno, 'CC', 'BS_Company_contact', 4, 1) = False then
|
||||
begin
|
||||
Application.MessageBox('取系人最大ID失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_LXR.IsEmpty then
|
||||
begin
|
||||
with CDS_LXR do
|
||||
begin
|
||||
Append;
|
||||
fieldbyname('CCID').Value := trim(maxno);
|
||||
fieldbyname('IsDefault').Value := true;
|
||||
Post;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
with CDS_LXR do
|
||||
begin
|
||||
Append;
|
||||
fieldbyname('CCID').Value := trim(maxno);
|
||||
fieldbyname('IsDefault').Value := false;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCustInput.ToolButton7Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_LXR.IsEmpty then
|
||||
Exit;
|
||||
if Trim(CDS_LXR.fieldbyname('CCID').AsString) <> '' then
|
||||
begin
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from BS_Company_contact where CCID=''' + Trim(CDS_LXR.fieldbyname('CCID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
CDS_LXR.Delete;
|
||||
if CDS_LXR.IsEmpty = false then
|
||||
begin
|
||||
if CDS_LXR.Locate('IsDefault', true, []) = false then
|
||||
begin
|
||||
CDS_LXR.first;
|
||||
CDS_LXR.edit;
|
||||
CDS_LXR.FieldByName('IsDefault').value := true;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCustInput.ToolButton2Click(Sender: TObject);
|
||||
var
|
||||
DwFlag: string;
|
||||
begin
|
||||
DwFlag := trim(CDS_LXR.FieldByName('CCID').AsString);
|
||||
if CDS_LXR.Locate('IsDefault', true, []) then
|
||||
begin
|
||||
CDS_LXR.edit;
|
||||
CDS_LXR.FieldByName('IsDefault').value := false;
|
||||
end;
|
||||
if CDS_LXR.Locate('CCID', DwFlag, []) then
|
||||
begin
|
||||
CDS_LXR.edit;
|
||||
CDS_LXR.FieldByName('IsDefault').value := true;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
556
A01基础公司管理/U_Customer.dfm
Normal file
556
A01基础公司管理/U_Customer.dfm
Normal file
|
|
@ -0,0 +1,556 @@
|
|||
inherited frmCustomer: TfrmCustomer
|
||||
Left = 347
|
||||
Top = 169
|
||||
Caption = #23458#25143#36164#26009#31649#29702
|
||||
ClientHeight = 611
|
||||
ClientWidth = 1366
|
||||
FormStyle = fsMDIChild
|
||||
Position = poScreenCenter
|
||||
Visible = True
|
||||
ExplicitWidth = 1382
|
||||
ExplicitHeight = 650
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar [0]
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1366
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 103
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
GradientEndColor = 15717318
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 1
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object btnFind: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 0
|
||||
OnClick = btnFindClick
|
||||
end
|
||||
object btnAdd: TToolButton
|
||||
Left = 142
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
ImageIndex = 9
|
||||
OnClick = btnAddClick
|
||||
end
|
||||
object btnEdit: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 3
|
||||
OnClick = btnEditClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 284
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 5
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object btnSaleser: TToolButton
|
||||
Left = 355
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25351#23450#19994#21153#21592
|
||||
ImageIndex = 15
|
||||
OnClick = btnSaleserClick
|
||||
end
|
||||
object btnTallyer: TToolButton
|
||||
Left = 462
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25351#23450#29702#21333
|
||||
ImageIndex = 15
|
||||
OnClick = btnTallyerClick
|
||||
end
|
||||
object btnChk: TToolButton
|
||||
Left = 557
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23457#26680
|
||||
ImageIndex = 12
|
||||
OnClick = btnChkClick
|
||||
end
|
||||
object btnReChk: TToolButton
|
||||
Left = 628
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25764#38144#23457#26680
|
||||
ImageIndex = 11
|
||||
OnClick = btnReChkClick
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 723
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #38468#20214
|
||||
ImageIndex = 22
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 794
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 889
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel [1]
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 1366
|
||||
Height = 39
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clWhite
|
||||
ParentBackground = False
|
||||
TabOrder = 1
|
||||
object Label3: TLabel
|
||||
Left = 190
|
||||
Top = 13
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #23458#25143#20840#31216
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 22
|
||||
Top = 13
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #23458#25143#32534#21495
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 350
|
||||
Top = 13
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #19994#21153#21592
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 502
|
||||
Top = 13
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #22269#23478
|
||||
end
|
||||
object CoName: TEdit
|
||||
Tag = 2
|
||||
Left = 242
|
||||
Top = 9
|
||||
Width = 90
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnChange = CoCodeChange
|
||||
OnKeyPress = CoCodeKeyPress
|
||||
end
|
||||
object CoCode: TEdit
|
||||
Tag = 2
|
||||
Left = 73
|
||||
Top = 9
|
||||
Width = 90
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = CoCodeChange
|
||||
OnKeyPress = CoCodeKeyPress
|
||||
end
|
||||
object Saleser: TEdit
|
||||
Tag = 2
|
||||
Left = 390
|
||||
Top = 9
|
||||
Width = 90
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = CoCodeChange
|
||||
OnKeyPress = CoCodeKeyPress
|
||||
end
|
||||
object cocountry: TEdit
|
||||
Tag = 2
|
||||
Left = 529
|
||||
Top = 9
|
||||
Width = 90
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = CoCodeChange
|
||||
OnKeyPress = CoCodeKeyPress
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid [2]
|
||||
Left = 0
|
||||
Top = 99
|
||||
Width = 1366
|
||||
Height = 309
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
OnFocusedRecordChanged = Tv1FocusedRecordChanged
|
||||
DataController.DataSource = DS_1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.IncSearch = DataLink_Company.SHuangSe
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Styles.Inactive = DataLink_Company.SHuangSe
|
||||
Styles.Selection = DataLink_Company.SHuangSe
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 48
|
||||
end
|
||||
object v2Column2: TcxGridDBColumn
|
||||
Caption = #23458#25143#32534#21495
|
||||
DataBinding.FieldName = 'CoCode'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 86
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Caption = #23458#25143#20840#31216
|
||||
DataBinding.FieldName = 'CoName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Focusing = False
|
||||
Width = 127
|
||||
end
|
||||
object v2Column15: TcxGridDBColumn
|
||||
Caption = #23458#25143#31616#31216
|
||||
DataBinding.FieldName = 'CoAbbrName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 100
|
||||
end
|
||||
object v2Column10: TcxGridDBColumn
|
||||
Caption = #19994#21153#21592
|
||||
DataBinding.FieldName = 'Saleser'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 84
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #20844#21496#22320#22336
|
||||
DataBinding.FieldName = 'CoAddress'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'CoNote'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 163
|
||||
end
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Caption = #22269#23478
|
||||
DataBinding.FieldName = 'cocountry'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 99
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #23458#25143#31561#32423
|
||||
DataBinding.FieldName = 'CoLevel'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #30331#35760#26102#38388
|
||||
DataBinding.FieldName = 'Filltime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #30331#35760#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #29702#21333
|
||||
DataBinding.FieldName = 'Tallyer'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 99
|
||||
end
|
||||
object Tv1Column7: TcxGridDBColumn
|
||||
Caption = #19978#32423#21333#20301
|
||||
DataBinding.FieldName = 'ParentCoName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 86
|
||||
end
|
||||
object Tv1Column6: TcxGridDBColumn
|
||||
Caption = #23458#25143#31867#22411
|
||||
DataBinding.FieldName = 'CoBusinessType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column8: TcxGridDBColumn
|
||||
Caption = #30005#35805
|
||||
DataBinding.FieldName = 'Phone'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column9: TcxGridDBColumn
|
||||
Caption = #20256#30495
|
||||
DataBinding.FieldName = 'fax'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column10: TcxGridDBColumn
|
||||
Caption = #31867#21035
|
||||
DataBinding.FieldName = 'GYSType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel [3]
|
||||
Left = 0
|
||||
Top = 408
|
||||
Width = 1366
|
||||
Height = 203
|
||||
Align = alBottom
|
||||
Caption = 'Panel2'
|
||||
TabOrder = 3
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 1364
|
||||
Height = 201
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DS_2
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_Company.Default
|
||||
object v3Column3: TcxGridDBColumn
|
||||
Caption = #40664#35748
|
||||
DataBinding.FieldName = 'IsDefault'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #32852#31995#20154
|
||||
DataBinding.FieldName = 'Contacts'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.CharCase = ecUpperCase
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #32844#20301
|
||||
DataBinding.FieldName = 'position'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.CharCase = ecUpperCase
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #32852#31995#30005#35805
|
||||
DataBinding.FieldName = 'Telephone'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.CharCase = ecUpperCase
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 99
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #25163#26426#21495
|
||||
DataBinding.FieldName = 'PhoneNumber'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.CharCase = ecUpperCase
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 102
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Caption = 'EMAIL'
|
||||
DataBinding.FieldName = 'Email'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.CharCase = ecUpperCase
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 108
|
||||
end
|
||||
object v3Column2: TcxGridDBColumn
|
||||
Caption = #24494#20449#21495
|
||||
DataBinding.FieldName = 'WeChat'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 169
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl [4]
|
||||
Left = 0
|
||||
Top = 77
|
||||
Width = 1366
|
||||
Height = 22
|
||||
Align = alTop
|
||||
TabOrder = 4
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 9
|
||||
Properties.TabIndex = 0
|
||||
Properties.Tabs.Strings = (
|
||||
#26410#23457#26680
|
||||
#24050#23457#26680
|
||||
#20840#37096)
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 22
|
||||
ClientRectRight = 1366
|
||||
ClientRectTop = 19
|
||||
end
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Left = 177
|
||||
Top = 240
|
||||
end
|
||||
inherited ADOQueryBaseTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Left = 196
|
||||
Top = 146
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 613
|
||||
Top = 145
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 733
|
||||
Top = 145
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 797
|
||||
Top = 153
|
||||
end
|
||||
object GPM_1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 448
|
||||
Top = 264
|
||||
end
|
||||
object DS_1: TDataSource
|
||||
DataSet = CDS_1
|
||||
Left = 579
|
||||
Top = 267
|
||||
end
|
||||
object CDS_1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 512
|
||||
Top = 256
|
||||
end
|
||||
object CDS_2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 384
|
||||
Top = 460
|
||||
end
|
||||
object DS_2: TDataSource
|
||||
DataSet = CDS_2
|
||||
Left = 459
|
||||
Top = 467
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
Left = 430
|
||||
Top = 186
|
||||
end
|
||||
object GPM_2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 320
|
||||
Top = 456
|
||||
end
|
||||
end
|
||||
581
A01基础公司管理/U_Customer.pas
Normal file
581
A01基础公司管理/U_Customer.pas
Normal file
|
|
@ -0,0 +1,581 @@
|
|||
unit U_Customer;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, ComObj, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
cxNavigator, U_BaseList, dxSkinsCore, dxSkinsDefaultPainters, dxDateRanges,
|
||||
dxBarBuiltInMenu, cxPC;
|
||||
|
||||
type
|
||||
TfrmCustomer = class(TfrmBaseList)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
btnFind: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
Label3: TLabel;
|
||||
CoName: TEdit;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
btnAdd: TToolButton;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column2: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
Label1: TLabel;
|
||||
CoCode: TEdit;
|
||||
v2Column10: TcxGridDBColumn;
|
||||
btnEdit: TToolButton;
|
||||
Label2: TLabel;
|
||||
Saleser: TEdit;
|
||||
cocountry: TEdit;
|
||||
Label4: TLabel;
|
||||
v2Column15: TcxGridDBColumn;
|
||||
CDS_2: TClientDataSet;
|
||||
DS_2: TDataSource;
|
||||
btnSaleser: TToolButton;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
OpenDialog1: TOpenDialog;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Panel2: TPanel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
v3Column3: TcxGridDBColumn;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
v3Column2: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
cxTabControl1: TcxTabControl;
|
||||
btnChk: TToolButton;
|
||||
btnReChk: TToolButton;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
btnTallyer: TToolButton;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
GPM_2: TcxGridPopupMenu;
|
||||
ToolButton3: TToolButton;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
Tv1Column8: TcxGridDBColumn;
|
||||
Tv1Column9: TcxGridDBColumn;
|
||||
Tv1Column10: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure btnFindClick(Sender: TObject);
|
||||
procedure btnEditClick(Sender: TObject);
|
||||
procedure btnAddClick(Sender: TObject);
|
||||
procedure TBuserClick(Sender: TObject);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure btnSaleserClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure CoCodeKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure btnChkClick(Sender: TObject);
|
||||
procedure btnReChkClick(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure btnTallyerClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure CoCodeChange(Sender: TObject);
|
||||
private
|
||||
fFlileFlag: string;
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
procedure SetStatus();
|
||||
public
|
||||
FAuthority: string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmCustomer: TfrmCustomer;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp, U_CustomerInput, U_CustInput, U_UserSel,
|
||||
U_AttachmentUpload;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmCustomer.SetStatus();
|
||||
begin
|
||||
btnSaleser.Enabled := false; //指定
|
||||
btnTallyer.Enabled := false; //指定
|
||||
btnChk.Enabled := false; //审核
|
||||
btnReChk.Enabled := false; //撤销
|
||||
|
||||
btnAdd.Enabled := false; //新增
|
||||
btnEdit.Enabled := false; //修改
|
||||
TBDel.Enabled := false; //删除
|
||||
|
||||
if Trim(FAuthority) = '管理' then
|
||||
begin
|
||||
btnSaleser.Enabled := true;
|
||||
btnTallyer.Enabled := true;
|
||||
btnAdd.Enabled := true;
|
||||
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
btnEdit.Enabled := true;
|
||||
TBDel.Enabled := true;
|
||||
btnChk.Enabled := true;
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
btnEdit.Enabled := true;
|
||||
btnReChk.Enabled := true;
|
||||
end;
|
||||
2:
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
btnAdd.Enabled := true;
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
btnEdit.Enabled := true;
|
||||
TBDel.Enabled := true;
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
|
||||
end;
|
||||
2:
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.InitGrid();
|
||||
var
|
||||
WSql, FCoCode: string;
|
||||
begin
|
||||
WSql := SGetFilters(Panel1, 1, 2);
|
||||
if trim(WSql) <> '' then
|
||||
begin
|
||||
WSql := ' and ' + trim(WSql);
|
||||
end;
|
||||
if not CDS_1.IsEmpty then
|
||||
FCoCode := CDS_1.FieldByName('CoCode').AsString;
|
||||
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from BS_Company ');
|
||||
sql.Add(' where 1=1 ' + (WSql));
|
||||
sql.Add(' and CoType=''客户'' and Valid=''Y'' ');
|
||||
|
||||
if Trim(FAuthority) = '录入' then
|
||||
begin
|
||||
sql.Add(' and ( SalesId=' + quotedstr(trim(DCode)) + ' or exists (select * from [dbo].[F_Tool_SplitString](TallyId,'','') X where X.RTValue =' + quotedstr(trim(DCode)) + '))');
|
||||
end;
|
||||
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
sql.Add(' and status=''0''');
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
sql.Add(' and status=''1''');
|
||||
end;
|
||||
end;
|
||||
SQL.Add(' ORDER BY CoCode ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
CDS_1.Locate('CoCode', FCoCode, []);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmCustomer := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
inherited;
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
if not CDS_1.Locate('SSel', true, []) then
|
||||
begin
|
||||
Application.MessageBox('请选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
|
||||
if Trim(CDS_1.fieldbyname('COID').AsString) <> '' then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BS_Com_Del @COID=' + quotedstr(trim(CDS_1.fieldbyname('COID').AsString)));
|
||||
sql.Add(',@DCode=' + quotedstr(trim(DCode)));
|
||||
sql.Add(',@DName=' + quotedstr(trim(DName)));
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
CDS_1.Delete;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
fFlileFlag := UserDataFlag + 'HX';
|
||||
FAuthority := self.fParameters1;
|
||||
ReadCxGrid(trim(self.caption) + 'Tv1', Tv1, '客户管理');
|
||||
ReadCxGrid(trim(self.caption) + 'Tv2', Tv2, '客户管理');
|
||||
SetStatus();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(trim(self.caption) + 'Tv1', Tv1, '客户管理');
|
||||
WriteCxGrid(trim(self.caption) + 'Tv2', Tv2, '客户管理');
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.btnFindClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmAttachmentUpload := TfrmAttachmentUpload.Create(Application);
|
||||
with frmAttachmentUpload do
|
||||
begin
|
||||
if (Trim(FAuthority) = '录入') or (Trim(FAuthority) = '管理') then
|
||||
FEditAuthority := True;
|
||||
fkeyNO := Trim(Self.CDS_1.fieldbyname('Coid').AsString);
|
||||
fType := '客户';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmAttachmentUpload.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.CoCodeChange(Sender: TObject);
|
||||
begin
|
||||
|
||||
btnFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.CoCodeKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
SetStatus();
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.btnEditClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
try
|
||||
frmCustInput := TfrmCustInput.Create(Application);
|
||||
with frmCustInput do
|
||||
begin
|
||||
fFlileFlag := self.fFlileFlag;
|
||||
FCOID := Trim(Self.CDS_1.fieldbyname('COID').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCustInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.btnTallyerClick(Sender: TObject);
|
||||
var
|
||||
MTallyId, MTallyer: string;
|
||||
begin
|
||||
MTallyId := '';
|
||||
MTallyer := '';
|
||||
if not CDS_1.Locate('SSel', true, []) then
|
||||
begin
|
||||
Application.MessageBox('请选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
frmUserSel := TfrmUserSel.Create(Application);
|
||||
with frmUserSel do
|
||||
begin
|
||||
Fdept := '理单';
|
||||
FMultiple := True;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
while frmUserSel.CDS_1.Locate('SSel', True, []) do
|
||||
begin
|
||||
MTallyId := MTallyId + Trim(CDS_1.FieldByName('UserID').AsString) + ',';
|
||||
MTallyer := MTallyer + Trim(CDS_1.FieldByName('UserName').AsString) + ',';
|
||||
frmUserSel.CDS_1.Delete;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmUserSel.Free;
|
||||
end;
|
||||
if MTallyId = '' then
|
||||
Exit;
|
||||
MTallyId := copy(MTallyId, 1, Length(MTallyId) - 1);
|
||||
MTallyer := copy(MTallyer, 1, Length(MTallyer) - 1);
|
||||
while CDS_1.Locate('SSel', True, []) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('update BS_Company set TallyId=' + quotedstr(trim(MTallyId)));
|
||||
sql.Add(' ,Tallyer=' + quotedstr(trim(MTallyer)));
|
||||
sql.Add(' where COID=''' + Trim(CDS_1.fieldbyname('COID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
CDS_1.Delete;
|
||||
end;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.btnChkClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
if not CDS_1.Locate('SSel', true, []) then
|
||||
begin
|
||||
Application.MessageBox('请选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
with CDS_1 do
|
||||
begin
|
||||
DisableControls;
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
if fieldbyname('SSel').AsBoolean then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update BS_Company SET status=''1'',Chktime=getdate(),Chker=' + quotedstr(trim(DName)));
|
||||
sql.Add('where CoID=' + quotedstr(trim(CDS_1.fieldbyname('CoID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
First;
|
||||
EnableControls;
|
||||
end;
|
||||
application.MessageBox('审核成功!', '提示信息');
|
||||
TBRafresh.Click;
|
||||
except
|
||||
application.MessageBox('审核失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.btnReChkClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
if not CDS_1.Locate('SSel', true, []) then
|
||||
begin
|
||||
Application.MessageBox('请选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
with CDS_1 do
|
||||
begin
|
||||
DisableControls;
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
if fieldbyname('SSel').AsBoolean then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update BS_Company SET status=''0'',Chktime=null,Chker=null ');
|
||||
sql.Add('where CoID=' + quotedstr(trim(CDS_1.fieldbyname('CoID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
First;
|
||||
EnableControls;
|
||||
end;
|
||||
application.MessageBox('撤销审核成功!', '提示信息');
|
||||
TBRafresh.Click;
|
||||
except
|
||||
application.MessageBox('撤销审核失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.btnAddClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmCustInput := TfrmCustInput.Create(Application);
|
||||
with frmCustInput do
|
||||
begin
|
||||
FCOID := '';
|
||||
fFlileFlag := self.fFlileFlag;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCustInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.TBuserClick(Sender: TObject);
|
||||
var
|
||||
FuserName: string;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from BS_Company_contact where COID=' + quotedstr(Trim(CDS_1.FieldByName('COID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryTemp, CDS_2);
|
||||
SInitCDSData(ADOQueryTemp, CDS_2);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.btnSaleserClick(Sender: TObject);
|
||||
var
|
||||
MSaleser, MSalesId: string;
|
||||
begin
|
||||
try
|
||||
frmUserSel := TfrmUserSel.Create(Application);
|
||||
with frmUserSel do
|
||||
begin
|
||||
Fdept := '业务';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
MSalesId := Trim(CDS_1.fieldbyname('UserID').AsString);
|
||||
MSaleser := Trim(CDS_1.fieldbyname('UserName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmUserSel.Free;
|
||||
end;
|
||||
|
||||
if MSalesId = '' then
|
||||
Exit;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('update BS_Company set Saleser=' + quotedstr(trim(MSaleser)));
|
||||
sql.Add(' ,SalesId=' + quotedstr(trim(MSalesId)));
|
||||
sql.Add(' where COID=''' + Trim(CDS_1.fieldbyname('COID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
initgrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCustomer.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FAuthority := trim(fParameters1);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
219
A01基础公司管理/U_CustomerInput.dfm
Normal file
219
A01基础公司管理/U_CustomerInput.dfm
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
object frmCustomerInput: TfrmCustomerInput
|
||||
Left = 261
|
||||
Top = 149
|
||||
Caption = #20844#21496#24405#20837
|
||||
ClientHeight = 335
|
||||
ClientWidth = 751
|
||||
Color = clWhite
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = True
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 751
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 75
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton3: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 751
|
||||
Height = 297
|
||||
Align = alClient
|
||||
BevelInner = bvNone
|
||||
BevelOuter = bvNone
|
||||
BorderStyle = bsNone
|
||||
Color = clWhite
|
||||
Ctl3D = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentColor = False
|
||||
ParentCtl3D = False
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
object Label2: TLabel
|
||||
Left = 16
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20844#21496#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 253
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20844#21496#21517#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label39: TLabel
|
||||
Left = 16
|
||||
Top = 57
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20844#21496#22320#22336
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 17
|
||||
Top = 101
|
||||
Width = 54
|
||||
Height = 12
|
||||
Caption = #22791' '#27880
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 495
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20844#21496#31616#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object CoName: TEdit
|
||||
Tag = 2
|
||||
Left = 311
|
||||
Top = 12
|
||||
Width = 150
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object CoCode: TEdit
|
||||
Tag = 2
|
||||
Left = 73
|
||||
Top = 12
|
||||
Width = 150
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object CoAddress: TEdit
|
||||
Tag = 2
|
||||
Left = 73
|
||||
Top = 55
|
||||
Width = 621
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
end
|
||||
object CoNote: TMemo
|
||||
Tag = 2
|
||||
Left = 77
|
||||
Top = 97
|
||||
Width = 636
|
||||
Height = 52
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 3
|
||||
end
|
||||
object CoAbbrName: TEdit
|
||||
Tag = 2
|
||||
Left = 553
|
||||
Top = 10
|
||||
Width = 141
|
||||
Height = 20
|
||||
TabOrder = 4
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 331
|
||||
Top = 200
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 158
|
||||
Top = 192
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 237
|
||||
Top = 193
|
||||
end
|
||||
end
|
||||
278
A01基础公司管理/U_CustomerInput.pas
Normal file
278
A01基础公司管理/U_CustomerInput.pas
Normal file
|
|
@ -0,0 +1,278 @@
|
|||
unit U_CustomerInput;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, StrUtils, SysUtils, Variants, Classes, Graphics, Controls,
|
||||
Forms, Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB,
|
||||
ADODB, cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDropDownEdit, BtnEdit, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
cxNavigator, dxSkinsCore, dxSkinsDefaultPainters, dxDateRanges,
|
||||
dxBarBuiltInMenu, U_BaseList, cxContainer, dxCore, cxDateUtils, cxImage,
|
||||
cxDBEdit, IdExplicitTLSClientServerBase;
|
||||
|
||||
type
|
||||
TfrmCustomerInput = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ToolButton3: TToolButton;
|
||||
ScrollBox1: TScrollBox;
|
||||
Label2: TLabel;
|
||||
Label6: TLabel;
|
||||
Label39: TLabel;
|
||||
CoName: TEdit;
|
||||
CoCode: TEdit;
|
||||
CoAddress: TEdit;
|
||||
Label7: TLabel;
|
||||
CoNote: TMemo;
|
||||
CoAbbrName: TEdit;
|
||||
Label3: TLabel;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure CoareaBtnDnClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
function SaveData(): Boolean;
|
||||
public
|
||||
fFlileFlag: string;
|
||||
fkhType: string;
|
||||
{ Public declarations }
|
||||
FCOID: string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmCustomerInput: TfrmCustomerInput;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp, getpic, U_YWYSel;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmCustomerInput.InitGrid();
|
||||
begin
|
||||
try
|
||||
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from BS_Company where CoType=''我司'' and COID=''' + Trim(FCOID) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCSHData(ADOQueryMain, ScrollBox1, 2);
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomerInput.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
|
||||
frmCustomerInput := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomerInput.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomerInput.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomerInput.FormShow(Sender: TObject);
|
||||
begin
|
||||
|
||||
InitGrid();
|
||||
|
||||
if CoCode.Text <> '' then
|
||||
exit;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' exec P_BS_Com_Get_No @Str=''W'' ');
|
||||
Open;
|
||||
end;
|
||||
CoCode.Text := trim(ADOQueryTemp.FieldByName('NewCoCode').asstring);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCustomerInput.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
function TfrmCustomerInput.SaveData(): Boolean;
|
||||
var
|
||||
MaxId, MaxSubId, FCoCode, FCCID, MaxCFID: string;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if Trim(FCOID) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd, MaxId, 'CO', 'BS_Company', 4, 1) = False then
|
||||
begin
|
||||
Result := False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if trim(CoCode.Text) = '' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' exec P_BS_Com_Get_No @Str=''W'' ');
|
||||
Open;
|
||||
end;
|
||||
CoCode.Text := trim(ADOQueryTemp.FieldByName('NewCoCode').asstring);
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
MaxId := Trim(FCOID);
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BS_Company where COID=''' + Trim(FCOID) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FCOID) = '' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value := Trim(DName);
|
||||
FieldByName('Edittime').Value := SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('COID').Value := Trim(MaxId);
|
||||
RTSetsavedata(ADOQueryCmd, 'BS_Company', ScrollBox1, 2);
|
||||
FieldByName('CoType').Value := '我司';
|
||||
Post;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BS_Company where CoCode=' + quotedstr(trim(CoCode.Text)));
|
||||
sql.Add('and Valid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryCmd.RecordCount > 1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('编号重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BS_Company where CoName=' + quotedstr(trim(CoName.Text)));
|
||||
sql.Add('and Valid=''Y'' ');
|
||||
sql.Add(' and CoType=''我司'' ');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryCmd.RecordCount > 1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('名称重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BS_Company where CoAbbrName=' + quotedstr(trim(CoAbbrName.Text)));
|
||||
sql.Add(' and CoType=''我司'' ');
|
||||
sql.Add('and Valid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryCmd.RecordCount > 1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('简称重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
//////////////// 更新名称 ////////////////////////
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('exec P_Com_Up_Code @COID=' + quotedstr(Trim(MaxId)));
|
||||
// ExecSQL;
|
||||
// end;
|
||||
//////////////// 更新名称 ////////////////////////
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
FCCID := Trim(MaxSubId);
|
||||
Result := True;
|
||||
except
|
||||
Result := false;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomerInput.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
if Trim(CoAbbrName.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('简称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(CoName.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomerInput.CoareaBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
TBtnEditC(Sender).TxtCode := '';
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
14281
A01基础公司管理/U_DataLink.dfm
Normal file
14281
A01基础公司管理/U_DataLink.dfm
Normal file
File diff suppressed because it is too large
Load Diff
129
A01基础公司管理/U_DataLink.pas
Normal file
129
A01基础公司管理/U_DataLink.pas
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
unit U_DataLink;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
||||
Windows, Messages, forms, OleCtnrs, DateUtils, cxClasses, dxSkinsCore,
|
||||
dxSkinsDefaultPainters, System.ImageList, Vcl.ExtCtrls, SyncObjs,
|
||||
dxSkinOffice2013White, dxSkinWXI, U_BaseDataLink, dxCore, cxLocalization,
|
||||
cxImageList, cxGraphics, dxSkinsForm;
|
||||
|
||||
type
|
||||
TMyThread = class(TThread)
|
||||
protected
|
||||
procedure Execute; override;
|
||||
end;
|
||||
|
||||
var
|
||||
DConString: string; {全局连接字符串}
|
||||
server, dtbase, user, pswd: string; {数据库连接参数}
|
||||
DCurHandle: hwnd; //当前窗体句柄
|
||||
DName: string; //#用户名#//
|
||||
DCode: string; //#用户编号#//
|
||||
Ddatabase: string; //#数据库名称#//
|
||||
DTitCaption: string; //#主窗体名称#//
|
||||
fDllFileName: string;
|
||||
DParameters1, DParameters2, DParameters3, DParameters4, DParameters5: string; // 外部参数;
|
||||
DParameters6, DParameters7, DParameters8, DParameters9, DParameters10: string; //外部参数;
|
||||
OldDllApp: Tapplication; //保存原有句柄
|
||||
NewDllApp: Tapplication; //当前句柄
|
||||
MainApplication: Tapplication;
|
||||
DFormCode: integer; //当前窗口号
|
||||
IsDelphiLanguage: integer;
|
||||
DServerDate: TdateTime; //服务器时间
|
||||
DCompany: string; //公司
|
||||
PicSvr: string;
|
||||
UserDataFlag: string;
|
||||
|
||||
type
|
||||
TDataLink_Company = class(TBaseDataLink)
|
||||
AdoDataLink: TADOQuery;
|
||||
ADOLink: TADOConnection;
|
||||
ThreeImgList: TImageList;
|
||||
ThreeLookAndFeelCol: TcxLookAndFeelController;
|
||||
ThreeColorBase: TcxStyleRepository;
|
||||
SHuangSe: TcxStyle;
|
||||
SkyBlue: TcxStyle;
|
||||
Default: TcxStyle;
|
||||
QHuangSe: TcxStyle;
|
||||
Red: TcxStyle;
|
||||
FontBlue: TcxStyle;
|
||||
TextSHuangSe: TcxStyle;
|
||||
FonePurple: TcxStyle;
|
||||
FoneClMaroon: TcxStyle;
|
||||
FoneRed: TcxStyle;
|
||||
RowColor: TcxStyle;
|
||||
handBlack: TcxStyle;
|
||||
cxBlue: TcxStyle;
|
||||
SHuangSeCu: TcxStyle;
|
||||
ImageList_new32: TImageList;
|
||||
Timer_link: TTimer;
|
||||
procedure DataModuleDestroy(Sender: TObject);
|
||||
procedure DataModuleCreate(Sender: TObject);
|
||||
procedure Timer_linkTimer(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
TMakebar = procedure(ucData: pchar; nDataLen: integer; nErrLevel: integer; nMask: integer; nBarEdition: integer; szBmpFileName: pchar; nScale: integer); stdcall;
|
||||
|
||||
TMixtext = procedure(szSrcBmpFileName: PChar; szDstBmpFileName: PChar; sztext: PChar; fontsize, txtheight, hmargin, vmargin, txtcntoneline: integer); stdcall;
|
||||
|
||||
var
|
||||
DataLink_Company: TDataLink_Company;
|
||||
CriticalSection: TCriticalSection; {声明临界}
|
||||
|
||||
implementation
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TMyThread.Execute;
|
||||
begin
|
||||
FreeOnTerminate := True;
|
||||
CriticalSection.Enter;
|
||||
try
|
||||
with DataLink_Company.AdoDataLink do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select getdate()');
|
||||
open;
|
||||
end;
|
||||
except
|
||||
try
|
||||
with DataLink_Company.ADOLink do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
LoginPrompt := false;
|
||||
Connected := true;
|
||||
end;
|
||||
except
|
||||
|
||||
end;
|
||||
end;
|
||||
CriticalSection.Leave;
|
||||
end;
|
||||
|
||||
procedure TDataLink_Company.DataModuleCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
CriticalSection := TCriticalSection.Create;
|
||||
end;
|
||||
|
||||
procedure TDataLink_Company.DataModuleDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
CriticalSection.Free;
|
||||
DataLink_Company := nil;
|
||||
end;
|
||||
|
||||
procedure TDataLink_Company.Timer_linkTimer(Sender: TObject);
|
||||
begin
|
||||
TMyThread.Create(False);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
70
A01基础公司管理/U_DeptTypeHelp.dfm
Normal file
70
A01基础公司管理/U_DeptTypeHelp.dfm
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
object frmDeptTypeHelp: TfrmDeptTypeHelp
|
||||
Left = 526
|
||||
Top = 238
|
||||
Caption = #37096#38376#36873#25321#21015#34920
|
||||
ClientHeight = 485
|
||||
ClientWidth = 355
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object cxDBTreeList1: TcxDBTreeList
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 225
|
||||
Height = 485
|
||||
Align = alLeft
|
||||
Bands = <
|
||||
item
|
||||
end>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.ParentField = 'DPParent'
|
||||
DataController.KeyField = 'DPID'
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OptionsBehavior.CopyCaptionsToClipboard = False
|
||||
OptionsBehavior.ExpandOnDblClick = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.CellAutoHeight = True
|
||||
OptionsView.Headers = False
|
||||
RootValue = -1
|
||||
Styles.Inactive = DataLink_StaffManage.Red
|
||||
Styles.Selection = DataLink_StaffManage.Red
|
||||
Styles.IncSearch = DataLink_StaffManage.Red
|
||||
TabOrder = 0
|
||||
OnDblClick = cxDBTreeList1DblClick
|
||||
ExplicitHeight = 486
|
||||
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||
DataBinding.FieldName = 'DPName'
|
||||
Width = 210
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
Position.BandIndex = 0
|
||||
Summary.FooterSummaryItems = <>
|
||||
Summary.GroupFooterSummaryItems = <>
|
||||
end
|
||||
end
|
||||
object ADOConnection1: TADOConnection
|
||||
LoginPrompt = False
|
||||
Left = 288
|
||||
Top = 60
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ADOQueryHelp
|
||||
Left = 280
|
||||
Top = 188
|
||||
end
|
||||
object ADOQueryHelp: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
Parameters = <>
|
||||
Left = 288
|
||||
Top = 136
|
||||
end
|
||||
end
|
||||
73
A01基础公司管理/U_DeptTypeHelp.pas
Normal file
73
A01基础公司管理/U_DeptTypeHelp.pas
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
unit U_DeptTypeHelp;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, DB, ADODB, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxTLdxBarBuiltInMenu, dxSkinsCore,
|
||||
dxSkinsDefaultPainters;
|
||||
|
||||
type
|
||||
TfrmDeptTypeHelp = class(TForm)
|
||||
ADOConnection1: TADOConnection;
|
||||
DataSource1: TDataSource;
|
||||
ADOQueryHelp: TADOQuery;
|
||||
cxDBTreeList1: TcxDBTreeList;
|
||||
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure cxDBTreeList1DblClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmDeptTypeHelp: TfrmDeptTypeHelp;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink;
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmDeptTypeHelp.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cxDBTreeList1.Align := alclient;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
//ConnectionString:='';
|
||||
Connected := true;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDeptTypeHelp.FormShow(Sender: TObject);
|
||||
begin
|
||||
with ADOQueryHelp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from SY_Dept order by DPlevel,DPOrder,DPName');
|
||||
// SQL.Add('select * from CP_Type order by CPlevel,CPOrder,CPName');
|
||||
Open;
|
||||
end;
|
||||
cxDBTreeList1.Items[0].Expand(false);
|
||||
end;
|
||||
|
||||
procedure TfrmDeptTypeHelp.cxDBTreeList1DblClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryHelp.IsEmpty then
|
||||
exit;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
439
A01基础公司管理/U_EmployeeBZ.dfm
Normal file
439
A01基础公司管理/U_EmployeeBZ.dfm
Normal file
|
|
@ -0,0 +1,439 @@
|
|||
inherited frmEmployeeBZ: TfrmEmployeeBZ
|
||||
Top = 39
|
||||
Caption = #21592#24037#29677#32452#31649#29702
|
||||
ClientHeight = 509
|
||||
ClientWidth = 1000
|
||||
ExplicitWidth = 1016
|
||||
ExplicitHeight = 548
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar [0]
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1000
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 75
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 1
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object PanelZD: TPanel [1]
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 225
|
||||
Height = 471
|
||||
Align = alLeft
|
||||
TabOrder = 1
|
||||
object ToolBar2: TToolBar
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 223
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 91
|
||||
Caption = 'ToolBar2'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBAddZD: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #28155#21152#29677#32452
|
||||
ImageIndex = 9
|
||||
OnClick = TBAddZDClick
|
||||
end
|
||||
object TBDelZD: TToolButton
|
||||
Left = 95
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500#29677#32452
|
||||
ImageIndex = 3
|
||||
OnClick = TBDelZDClick
|
||||
end
|
||||
end
|
||||
object cxGridZD: TcxGrid
|
||||
Left = 1
|
||||
Top = 39
|
||||
Width = 223
|
||||
Height = 431
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object TVZD: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = cxStyle1
|
||||
object TVZDZdyName: TcxGridDBColumn
|
||||
Caption = #29677#32452#21517#31216
|
||||
DataBinding.FieldName = 'ZdyName'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 130
|
||||
end
|
||||
end
|
||||
object cxGridZDLevel1: TcxGridLevel
|
||||
GridView = TVZD
|
||||
end
|
||||
end
|
||||
end
|
||||
object cxSplitter1: TcxSplitter [2]
|
||||
Left = 225
|
||||
Top = 38
|
||||
Width = 8
|
||||
Height = 471
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
Control = PanelZD
|
||||
end
|
||||
object PanelMain: TPanel [3]
|
||||
Left = 233
|
||||
Top = 38
|
||||
Width = 767
|
||||
Height = 471
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object PanelTop: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 765
|
||||
Height = 225
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 0
|
||||
object LabelTop: TLabel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 761
|
||||
Height = 12
|
||||
Align = alTop
|
||||
Caption = #26410#20998#37197#29677#32452#21592#24037
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ExplicitWidth = 91
|
||||
end
|
||||
object cxGridTop: TcxGrid
|
||||
Left = 2
|
||||
Top = 49
|
||||
Width = 761
|
||||
Height = 174
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TvTop: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
OnCellDblClick = TvTopCellDblClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = cxStyle1
|
||||
object TvTopEECode: TcxGridDBColumn
|
||||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'UserID'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object TvTopEEName: TcxGridDBColumn
|
||||
Caption = #22995#21517
|
||||
DataBinding.FieldName = 'UserName'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 88
|
||||
end
|
||||
object TvTopDept: TcxGridDBColumn
|
||||
Caption = #37096#38376
|
||||
DataBinding.FieldName = 'Udept'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 90
|
||||
end
|
||||
end
|
||||
object cxGridTopLevel1: TcxGridLevel
|
||||
GridView = TvTop
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 2
|
||||
Top = 14
|
||||
Width = 761
|
||||
Height = 35
|
||||
Align = alTop
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 18
|
||||
Top = 13
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #22995#21517
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 141
|
||||
Top = 13
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #37096#38376
|
||||
end
|
||||
object EEName: TEdit
|
||||
Tag = 2
|
||||
Left = 43
|
||||
Top = 9
|
||||
Width = 83
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnKeyPress = EENameKeyPress
|
||||
end
|
||||
object Dept: TEdit
|
||||
Tag = 2
|
||||
Left = 168
|
||||
Top = 9
|
||||
Width = 75
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnKeyPress = EENameKeyPress
|
||||
end
|
||||
end
|
||||
end
|
||||
object cxSplitter2: TcxSplitter
|
||||
Left = 1
|
||||
Top = 226
|
||||
Width = 765
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
Control = PanelTop
|
||||
end
|
||||
object PanelTip: TPanel
|
||||
Left = 1
|
||||
Top = 234
|
||||
Width = 765
|
||||
Height = 24
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 2
|
||||
object LabelTip: TLabel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 765
|
||||
Height = 24
|
||||
Align = alClient
|
||||
Alignment = taCenter
|
||||
AutoSize = False
|
||||
Caption = #25805#20316#35828#26126#65306#21452#20987#19978#26041#26410#20998#37197#29677#32452#21592#24037#8594#21152#20837#24038#20391#36873#20013#29677#32452#65307#21452#20987#19979#26041#24050#20998#37197#29677#32452#21592#24037#8594#31227#20986#29677#32452
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clNavy
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
Layout = tlCenter
|
||||
end
|
||||
end
|
||||
object PanelBottom: TPanel
|
||||
Left = 1
|
||||
Top = 258
|
||||
Width = 765
|
||||
Height = 212
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 1
|
||||
object LabelBottom: TLabel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 761
|
||||
Height = 12
|
||||
Align = alTop
|
||||
Caption = #24050#20998#37197#29677#32452#21592#24037
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ExplicitWidth = 91
|
||||
end
|
||||
object cxGridBottom: TcxGrid
|
||||
Left = 2
|
||||
Top = 14
|
||||
Width = 761
|
||||
Height = 196
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TvBottom: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
OnCellDblClick = TvBottomCellDblClick
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = cxStyle1
|
||||
object TvBottomEECode: TcxGridDBColumn
|
||||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'UserID'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object TvBottomEEName: TcxGridDBColumn
|
||||
Caption = #22995#21517
|
||||
DataBinding.FieldName = 'UserName'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 88
|
||||
end
|
||||
object TvBottomDept: TcxGridDBColumn
|
||||
Caption = #37096#38376
|
||||
DataBinding.FieldName = 'Udept'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 90
|
||||
end
|
||||
end
|
||||
object cxGridBottomLevel1: TcxGridLevel
|
||||
GridView = TvBottom
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
end
|
||||
inherited ADOQueryBaseTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Left = 385
|
||||
Top = 129
|
||||
end
|
||||
object ADOQueryZD: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 464
|
||||
Top = 200
|
||||
end
|
||||
object ADOQueryTop: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 344
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryBottom: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 428
|
||||
Top = 200
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Top
|
||||
Left = 497
|
||||
Top = 201
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = CDS_Bottom
|
||||
Left = 530
|
||||
Top = 201
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = CDS_ZD
|
||||
Left = 563
|
||||
Top = 201
|
||||
end
|
||||
object CDS_Top: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 601
|
||||
Top = 136
|
||||
end
|
||||
object CDS_Bottom: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 642
|
||||
Top = 200
|
||||
end
|
||||
object CDS_ZD: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
AfterScroll = CDS_ZDAfterScroll
|
||||
Left = 643
|
||||
Top = 152
|
||||
end
|
||||
object cxStyleRepository1: TcxStyleRepository
|
||||
Left = 48
|
||||
Top = 96
|
||||
PixelsPerInch = 96
|
||||
object cxStyle1: TcxStyle
|
||||
AssignedValues = [svFont]
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = [fsBold]
|
||||
end
|
||||
end
|
||||
end
|
||||
367
A01基础公司管理/U_EmployeeBZ.pas
Normal file
367
A01基础公司管理/U_EmployeeBZ.pas
Normal file
|
|
@ -0,0 +1,367 @@
|
|||
unit U_EmployeeBZ;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGrid, DBClient, cxSplitter,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, U_BaseList, dxSkinsCore,
|
||||
dxSkinsDefaultPainters, dxScrollbarAnnotations, dxDateRanges;
|
||||
|
||||
type
|
||||
TfrmEmployeeBZ = class(TfrmBaseList)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
PanelZD: TPanel;
|
||||
ToolBar2: TToolBar;
|
||||
TBAddZD: TToolButton;
|
||||
TBDelZD: TToolButton;
|
||||
cxGridZD: TcxGrid;
|
||||
TVZD: TcxGridDBTableView;
|
||||
TVZDZdyName: TcxGridDBColumn;
|
||||
cxGridZDLevel1: TcxGridLevel;
|
||||
cxSplitter1: TcxSplitter;
|
||||
PanelMain: TPanel;
|
||||
PanelTop: TPanel;
|
||||
LabelTop: TLabel;
|
||||
cxGridTop: TcxGrid;
|
||||
TvTop: TcxGridDBTableView;
|
||||
TvTopEECode: TcxGridDBColumn;
|
||||
TvTopEEName: TcxGridDBColumn;
|
||||
TvTopDept: TcxGridDBColumn;
|
||||
cxGridTopLevel1: TcxGridLevel;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label4: TLabel;
|
||||
EEName: TEdit;
|
||||
Dept: TEdit;
|
||||
cxSplitter2: TcxSplitter;
|
||||
PanelTip: TPanel;
|
||||
LabelTip: TLabel;
|
||||
PanelBottom: TPanel;
|
||||
LabelBottom: TLabel;
|
||||
cxGridBottom: TcxGrid;
|
||||
TvBottom: TcxGridDBTableView;
|
||||
TvBottomEECode: TcxGridDBColumn;
|
||||
TvBottomEEName: TcxGridDBColumn;
|
||||
TvBottomDept: TcxGridDBColumn;
|
||||
cxGridBottomLevel1: TcxGridLevel;
|
||||
ADOQueryZD: TADOQuery;
|
||||
ADOQueryTop: TADOQuery;
|
||||
ADOQueryBottom: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
DataSource2: TDataSource;
|
||||
DataSource3: TDataSource;
|
||||
CDS_Top: TClientDataSet;
|
||||
CDS_Bottom: TClientDataSet;
|
||||
CDS_ZD: TClientDataSet;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
cxStyle1: TcxStyle;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBAddZDClick(Sender: TObject);
|
||||
procedure TBDelZDClick(Sender: TObject);
|
||||
procedure TvTopCellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure TvBottomCellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure CDS_ZDAfterScroll(DataSet: TDataSet);
|
||||
procedure EENameKeyPress(Sender: TObject; var Key: Char);
|
||||
private
|
||||
FIniting: Boolean;
|
||||
function GetZDName(): string;
|
||||
procedure InitZD();
|
||||
procedure InitTop();
|
||||
procedure InitBottom();
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmEmployeeBZ: TfrmEmployeeBZ;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp;
|
||||
|
||||
const
|
||||
SUserDept = 'Udept in (''包装车间'',''裁剪车间'',''缝纫车间'',''检验车间'')';
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmEmployeeBZ.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmEmployeeBZ := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
inherited;
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
function TfrmEmployeeBZ.GetZDName(): string;
|
||||
begin
|
||||
Result := '';
|
||||
if CDS_ZD.Active and (not CDS_ZD.IsEmpty) then
|
||||
Result := Trim(CDS_ZD.FieldByName('ZdyName').AsString);
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.InitZD();
|
||||
begin
|
||||
FIniting := True;
|
||||
try
|
||||
ADOQueryZD.DisableControls;
|
||||
with ADOQueryZD do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select ZdyNo,ZdyName from KH_ZDY where Type=''BZNAME'' order by ZdyNo');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryZD, CDS_ZD);
|
||||
SInitCDSData(ADOQueryZD, CDS_ZD);
|
||||
finally
|
||||
ADOQueryZD.EnableControls;
|
||||
FIniting := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.InitTop();
|
||||
begin
|
||||
try
|
||||
ADOQueryTop.DisableControls;
|
||||
with ADOQueryTop do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from SY_User where ' + SUserDept);
|
||||
SQL.Add(' and (bzname is null or bzname='''')');
|
||||
if Trim(EEName.Text) <> '' then
|
||||
SQL.Add(' and UserName like ''%' + Trim(EEName.Text) + '%''');
|
||||
if Trim(Dept.Text) <> '' then
|
||||
SQL.Add(' and Udept like ''%' + Trim(Dept.Text) + '%''');
|
||||
SQL.Add(' order by UserID');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryTop, CDS_Top);
|
||||
SInitCDSData(ADOQueryTop, CDS_Top);
|
||||
finally
|
||||
ADOQueryTop.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.InitBottom();
|
||||
var
|
||||
fbz: string;
|
||||
begin
|
||||
fbz := GetZDName();
|
||||
if fbz <> '' then
|
||||
LabelBottom.Caption := '已分配班组员工(' + fbz + ')'
|
||||
else
|
||||
LabelBottom.Caption := '已分配班组员工';
|
||||
try
|
||||
ADOQueryBottom.DisableControls;
|
||||
with ADOQueryBottom do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from SY_User where ' + SUserDept);
|
||||
SQL.Add(' and bzname is not null and bzname<>''''');
|
||||
if fbz <> '' then
|
||||
SQL.Add(' and bzname=''' + fbz + '''');
|
||||
SQL.Add(' order by bzname,UserID');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryBottom, CDS_Bottom);
|
||||
SInitCDSData(ADOQueryBottom, CDS_Bottom);
|
||||
finally
|
||||
ADOQueryBottom.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.CDS_ZDAfterScroll(DataSet: TDataSet);
|
||||
begin
|
||||
if FIniting then
|
||||
Exit;
|
||||
InitBottom();
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.EENameKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
InitTop();
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
InitZD();
|
||||
InitTop();
|
||||
InitBottom();
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
EEName.Clear;
|
||||
Dept.Clear;
|
||||
InitZD();
|
||||
InitTop();
|
||||
InitBottom();
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.TBAddZDClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'BZNAME';
|
||||
flagname := '班组名称';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
InitZD();
|
||||
InitBottom();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.TBDelZDClick(Sender: TObject);
|
||||
var
|
||||
fbz, fno, fsj: string;
|
||||
icount: Integer;
|
||||
begin
|
||||
if not (CDS_ZD.Active and (not CDS_ZD.IsEmpty)) then
|
||||
Exit;
|
||||
fbz := Trim(CDS_ZD.FieldByName('ZdyName').AsString);
|
||||
fno := Trim(CDS_ZD.FieldByName('ZdyNo').AsString);
|
||||
if (fbz = '') or (fno = '') then
|
||||
Exit;
|
||||
icount := 0;
|
||||
with ADOQueryBaseTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select count(*) as icount from SY_User where bzname=''' + fbz + '''');
|
||||
Open;
|
||||
icount := FieldByName('icount').AsInteger;
|
||||
Close;
|
||||
end;
|
||||
if icount > 0 then
|
||||
begin
|
||||
fsj := '该班组下还有' + IntToStr(icount) + '名员工,删除班组将把这些员工移出班组,是否继续?';
|
||||
if Application.MessageBox(PChar(fsj), '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if Application.MessageBox('确定要删除该班组吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
ADOQueryBaseCmd.Connection.BeginTrans;
|
||||
with ADOQueryBaseCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('update SY_User set bzname=null where bzname=''' + fbz + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryBaseCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('delete KH_ZDY where ZdyNo=''' + fno + ''' and Type=''BZNAME''');
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryBaseCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('删除班组失败!', '提示信息', 0);
|
||||
Exit;
|
||||
end;
|
||||
InitZD();
|
||||
InitTop();
|
||||
InitBottom();
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.TvTopCellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
var
|
||||
fbz, fsj: string;
|
||||
begin
|
||||
if CDS_Top.IsEmpty then
|
||||
Exit;
|
||||
fbz := GetZDName();
|
||||
if fbz = '' then
|
||||
begin
|
||||
Application.MessageBox('请先在左侧选择班组!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
fsj := '确定要将该员工分配到班组[' + fbz + ']吗?';
|
||||
if Application.MessageBox(PChar(fsj), '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
try
|
||||
with ADOQueryBaseCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('update SY_User set bzname=''' + fbz + '''');
|
||||
SQL.Add(' where UserID=''' + Trim(CDS_Top.FieldByName('UserID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
except
|
||||
Application.MessageBox('分配班组失败!', '提示信息', 0);
|
||||
Exit;
|
||||
end;
|
||||
InitTop();
|
||||
InitBottom();
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.TvBottomCellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
if CDS_Bottom.IsEmpty then
|
||||
Exit;
|
||||
if Application.MessageBox('确定要移出该员工的班组吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
try
|
||||
with ADOQueryBaseCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('update SY_User set bzname=null');
|
||||
SQL.Add(' where UserID=''' + Trim(CDS_Bottom.FieldByName('UserID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
except
|
||||
Application.MessageBox('移出班组失败!', '提示信息', 0);
|
||||
Exit;
|
||||
end;
|
||||
InitTop();
|
||||
InitBottom();
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
end.
|
||||
155
A01基础公司管理/U_EmployeeBZ.pas.tmp
Normal file
155
A01基础公司管理/U_EmployeeBZ.pas.tmp
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
unit U_EmployeeBZ;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGrid, DBClient, cxSplitter,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, U_BaseList, dxSkinsCore,
|
||||
dxSkinsDefaultPainters, dxScrollbarAnnotations, dxDateRanges;
|
||||
|
||||
type
|
||||
TfrmEmployeeBZ = class(TfrmBaseList)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
PanelZD: TPanel;
|
||||
ToolBar2: TToolBar;
|
||||
TBAddZD: TToolButton;
|
||||
cxGridZD: TcxGrid;
|
||||
TVZD: TcxGridDBTableView;
|
||||
TVZDZdyName: TcxGridDBColumn;
|
||||
cxGridZDLevel1: TcxGridLevel;
|
||||
cxSplitter1: TcxSplitter;
|
||||
PanelMain: TPanel;
|
||||
PanelTop: TPanel;
|
||||
LabelTop: TLabel;
|
||||
cxGridTop: TcxGrid;
|
||||
TvTop: TcxGridDBTableView;
|
||||
TvTopEECode: TcxGridDBColumn;
|
||||
TvTopEEName: TcxGridDBColumn;
|
||||
TvTopDept: TcxGridDBColumn;
|
||||
cxGridTopLevel1: TcxGridLevel;
|
||||
cxSplitter2: TcxSplitter;
|
||||
PanelTip: TPanel;
|
||||
LabelTip: TLabel;
|
||||
PanelBottom: TPanel;
|
||||
LabelBottom: TLabel;
|
||||
cxGridBottom: TcxGrid;
|
||||
TvBottom: TcxGridDBTableView;
|
||||
TvBottomEECode: TcxGridDBColumn;
|
||||
TvBottomEEName: TcxGridDBColumn;
|
||||
TvBottomDept: TcxGridDBColumn;
|
||||
cxGridBottomLevel1: TcxGridLevel;
|
||||
ADOQueryZD: TADOQuery;
|
||||
ADOQueryTop: TADOQuery;
|
||||
ADOQueryBottom: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
DataSource2: TDataSource;
|
||||
DataSource3: TDataSource;
|
||||
CDS_Top: TClientDataSet;
|
||||
CDS_Bottom: TClientDataSet;
|
||||
CDS_ZD: TClientDataSet;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
cxStyle1: TcxStyle;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBAddZDClick(Sender: TObject);
|
||||
procedure TVZDCellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure TvTopCellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure TvBottomCellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
private
|
||||
function GetZDName(): string;
|
||||
procedure InitZD();
|
||||
procedure InitTop();
|
||||
procedure InitBottom();
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmEmployeeBZ: TfrmEmployeeBZ;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmEmployeeBZ.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmEmployeeBZ := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
inherited;
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
function TfrmEmployeeBZ.GetZDName(): string;
|
||||
begin
|
||||
Result := '';
|
||||
if CDS_ZD.Active and (not CDS_ZD.IsEmpty) then
|
||||
Result := Trim(CDS_ZD.FieldByName('ZdyName').AsString);
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.InitZD();
|
||||
begin
|
||||
try
|
||||
ADOQueryZD.DisableControls;
|
||||
with ADOQueryZD do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select ZdyNo,ZdyName from KH_ZDY where Type=''BZNAME'' order by ZdyNo');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryZD, CDS_ZD);
|
||||
SInitCDSData(ADOQueryZD, CDS_ZD);
|
||||
finally
|
||||
ADOQueryZD.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.InitTop();
|
||||
begin
|
||||
try
|
||||
ADOQueryTop.DisableControls;
|
||||
with ADOQueryTop do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from SY_Employee where bzname is null or bzname=''''');
|
||||
SQL.Add(' order by EECode');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryTop, CDS_Top);
|
||||
SInitCDSData(ADOQueryTop, CDS_Top);
|
||||
finally
|
||||
ADOQueryTop.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeBZ.InitBottom();
|
||||
var
|
||||
fbz: string;
|
||||
begin
|
||||
fbz := GetZDName();
|
||||
if fbz <> '' then
|
||||
LabelBottom.Caption := '
|
||||
250
A01基础公司管理/U_EmployeeInPut.dfm
Normal file
250
A01基础公司管理/U_EmployeeInPut.dfm
Normal file
|
|
@ -0,0 +1,250 @@
|
|||
object frmYGInPut: TfrmYGInPut
|
||||
Left = 191
|
||||
Top = 31
|
||||
Caption = #21592#24037#26723#26696#24405#20837
|
||||
ClientHeight = 532
|
||||
ClientWidth = 1144
|
||||
Color = clWhite
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1144
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 75
|
||||
Caption = 'ToolBar1'
|
||||
Color = clBtnFace
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
EdgeInner = esNone
|
||||
EdgeOuter = esNone
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBSave: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 16
|
||||
OnClick = TBSaveClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 2
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 146
|
||||
Top = 0
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 6
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 221
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 1144
|
||||
Height = 494
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Header = cxStyle1
|
||||
object v1RuZhiDate: TcxGridDBColumn
|
||||
Caption = #20837#32844#26085#26399
|
||||
DataBinding.FieldName = 'EntryDate'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object v1YGNo: TcxGridDBColumn
|
||||
Tag = 1
|
||||
Caption = #21592#24037#32534#21495
|
||||
DataBinding.FieldName = 'EECode'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 75
|
||||
end
|
||||
object v1YGName: TcxGridDBColumn
|
||||
Caption = #22995#21517
|
||||
DataBinding.FieldName = 'EEName'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 88
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #31867#21035
|
||||
DataBinding.FieldName = 'EEType'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
#27491#24335
|
||||
#20020#26102)
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #37096#38376
|
||||
DataBinding.FieldName = 'Dept'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1GangWei: TcxGridDBColumn
|
||||
Caption = #23703#20301
|
||||
DataBinding.FieldName = 'Post'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 82
|
||||
end
|
||||
object v1SFZNo: TcxGridDBColumn
|
||||
Caption = #29983#26085
|
||||
DataBinding.FieldName = 'Birthday'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object v1YGSex: TcxGridDBColumn
|
||||
Caption = #24615#21035
|
||||
DataBinding.FieldName = 'Sex'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.DropDownListStyle = lsEditFixedList
|
||||
Properties.Items.Strings = (
|
||||
#30007
|
||||
#22899)
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 85
|
||||
end
|
||||
object v1Phone: TcxGridDBColumn
|
||||
Caption = #25163#26426
|
||||
DataBinding.FieldName = 'Phone'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 91
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #36523#20221#35777
|
||||
DataBinding.FieldName = 'IdCard'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 73
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #36523#20221#35777#21040#26399#26085#26399
|
||||
DataBinding.FieldName = 'IDCardEndData'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 115
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #23478#24237#20303#22336
|
||||
DataBinding.FieldName = 'HomeAddress'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 104
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #32452#21495
|
||||
DataBinding.FieldName = 'groupNO'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object ADOTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 496
|
||||
Top = 157
|
||||
end
|
||||
object ADOCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 341
|
||||
Top = 135
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Sub
|
||||
Left = 666
|
||||
Top = 145
|
||||
end
|
||||
object Order_Sub: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 760
|
||||
Top = 178
|
||||
end
|
||||
object cxStyleRepository1: TcxStyleRepository
|
||||
Left = 616
|
||||
Top = 80
|
||||
PixelsPerInch = 96
|
||||
object cxStyle1: TcxStyle
|
||||
AssignedValues = [svFont]
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = [fsBold]
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 566
|
||||
Top = 201
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 408
|
||||
Top = 301
|
||||
end
|
||||
end
|
||||
352
A01基础公司管理/U_EmployeeInPut.pas
Normal file
352
A01基础公司管理/U_EmployeeInPut.pas
Normal file
|
|
@ -0,0 +1,352 @@
|
|||
unit U_EmployeeInPut;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, cxMemo,
|
||||
cxRichEdit, ComCtrls, cxContainer, cxTextEdit, cxMaskEdit, cxButtonEdit,
|
||||
StdCtrls, ToolWin, DBClient, ADODB, ExtCtrls, BtnEdit, cxCalendar, StrUtils,
|
||||
cxDropDownEdit, jpeg, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, cxPC, cxGridCustomPopupMenu, cxGridPopupMenu, Menus,
|
||||
ExtDlgs, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
|
||||
dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, dxSkinOffice2013White,
|
||||
dxSkinWXI, dxScrollbarAnnotations;
|
||||
|
||||
type
|
||||
TfrmYGInPut = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBClose: TToolButton;
|
||||
ADOTemp: TADOQuery;
|
||||
ADOCmd: TADOQuery;
|
||||
TBSave: TToolButton;
|
||||
DataSource1: TDataSource;
|
||||
Order_Sub: TClientDataSet;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1YGName: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1GangWei: TcxGridDBColumn;
|
||||
v1YGSex: TcxGridDBColumn;
|
||||
v1Phone: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
cxStyle1: TcxStyle;
|
||||
v1RuZhiDate: TcxGridDBColumn;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
v1SFZNo: TcxGridDBColumn;
|
||||
v1YGNo: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
ADOQuery1: TADOQuery;
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure v1SYRNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
procedure v1Column2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
private
|
||||
TPInt: Integer;
|
||||
procedure InitData();
|
||||
function SaveData(): Boolean;
|
||||
function SaveMXData(Tv11: TcxGridDBTableView; CDS1: TClientDataSet; FMaxNo, FYOType: string): Boolean;
|
||||
procedure SaveImageOther();
|
||||
procedure InitImage();
|
||||
{ Private declarations }
|
||||
public
|
||||
canshu1: string;
|
||||
PState, CopyInt: Integer;
|
||||
FMainId, FDPID, FDPName: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmYGInPut: TfrmYGInPut;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_ZDYHelp, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmYGInPut.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('员工档案录入2', Tv1, '管理');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmYGInPut.InitData();
|
||||
begin
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from SY_Employee where EEID=''' + Trim(FMainId) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOCmd, Order_Sub);
|
||||
SInitCDSData(ADOCmd, Order_Sub);
|
||||
end;
|
||||
|
||||
procedure TfrmYGInPut.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('员工档案录入2', Tv1, '管理');
|
||||
InitData();
|
||||
end;
|
||||
|
||||
function TfrmYGInPut.SaveData(): Boolean;
|
||||
var
|
||||
maxno, FHZStatus: string;
|
||||
begin
|
||||
Result := False;
|
||||
try
|
||||
ADOCmd.Connection.BeginTrans;
|
||||
with Order_Sub do
|
||||
begin
|
||||
first;
|
||||
while not eof do
|
||||
begin
|
||||
if Trim(Order_Sub.fieldbyname('EEID').AsString) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOCmd, maxno, 'OA', 'SY_Employee', 4, 1) = False then
|
||||
begin
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxno := Trim(Order_Sub.fieldbyname('EEID').AsString);
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select * from SY_Employee where EEID=''' + Trim(maxno) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if ADOCmd.IsEmpty then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select max(CAST( EECode as decimal(18,2) )) as EECode from SY_Employee where PATINDEX(''%[^0-9]%'', EECode)=0');
|
||||
Open;
|
||||
end;
|
||||
|
||||
if Trim(Order_Sub.fieldbyname('EECode').AsString) = '' then
|
||||
begin
|
||||
FieldByName('EECode').Value := '0' + floattostr(strtofloat(Trim(ADOQuery1.fieldbyname('EECode').AsString)) + 1);
|
||||
end
|
||||
else
|
||||
begin
|
||||
FieldByName('EECode').Value := Trim(Order_Sub.fieldbyname('EECode').AsString);
|
||||
end;
|
||||
|
||||
end
|
||||
else
|
||||
begin
|
||||
edit;
|
||||
FieldByName('Editer').Value := Trim(DName);
|
||||
FieldByName('Edittime').Value := SGetServerDateTime(ADOTemp);
|
||||
FieldByName('EECode').Value := Trim(Order_Sub.fieldbyname('EECode').AsString);
|
||||
end;
|
||||
FieldByName('EEID').Value := Trim(maxno);
|
||||
FieldByName('EEType').Value := '正式';
|
||||
fieldbyname('DPID').Value := Trim(FDPID);
|
||||
RTSetSaveDataCDS(ADOCmd, Tv1, Order_Sub, 'SY_Employee', 0);
|
||||
// with ADOQuery1 do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// SQL.Add('select max(CAST( EECode as decimal(18,2) )) as EECode from SY_Employee where PATINDEX(''%[^0-9]%'', EECode)=0');
|
||||
// Open;
|
||||
// end;
|
||||
// FieldByName('EECode').Value := '0' + floattostr( strtofloat(Trim(ADOQuery1.fieldbyname('EECode').AsString)) + 1) ;
|
||||
post;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from SY_Employee where EECode=''' + Trim(Order_Sub.fieldbyname('EECode').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOCmd.RecordCount > 1 then
|
||||
begin
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
application.MessageBox(PChar('员工编号' + trim(ADOCmd.fieldbyname('EECode').AsString) + '已存在'), '提示');
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with Order_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('EEID').Value := Trim(maxno);
|
||||
end;
|
||||
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_EE_in_Account @DataID=''' + Trim(maxno) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOCmd.FieldByName('intReturn').AsInteger = -1 then
|
||||
begin
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox(PChar(ADOCmd.fieldbyname('ShowMsg').AsString), '提示', 0);
|
||||
exit;
|
||||
end;
|
||||
|
||||
next;
|
||||
end;
|
||||
end;
|
||||
ADOCmd.Connection.CommitTrans;
|
||||
Result := True;
|
||||
except
|
||||
;
|
||||
Result := False;
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmYGInPut.SaveMXData(Tv11: TcxGridDBTableView; CDS1: TClientDataSet; FMaxNo, FYOType: string): Boolean;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYGInPut.InitImage();
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYGInPut.TBSaveClick(Sender: TObject);
|
||||
var
|
||||
FSFNO: string;
|
||||
begin
|
||||
ToolBar1.SetFocus;
|
||||
// if Order_Sub.Locate('IdCard', '', []) = true then
|
||||
// begin
|
||||
// application.MessageBox('身份证不能为空', '提示');
|
||||
// exit;
|
||||
// end;
|
||||
if Order_Sub.Locate('EEType', null, []) = true then
|
||||
begin
|
||||
application.messagebox('类别不能为空', '提示');
|
||||
exit;
|
||||
end;
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
ModalResult := 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYGInPut.SaveImageOther();
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYGInPut.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
with Order_Sub do
|
||||
begin
|
||||
Append;
|
||||
fieldbyname('EntryDate').Value := SGetServerDate(ADOTemp);
|
||||
FieldByName('Dept').Value := Trim(FDPName);
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYGInPut.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Sub.IsEmpty then
|
||||
Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
if Trim(Order_Sub.fieldbyname('EEID').AsString) <> '' then
|
||||
begin
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete SY_Employee where EEID=''' + Trim(Order_Sub.fieldbyname('EEID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_EE_in_Account @DataID=''' + Trim(Order_Sub.fieldbyname('EEID').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOCmd.FieldByName('intReturn').AsInteger = -1 then
|
||||
begin
|
||||
Application.MessageBox(PChar(ADOCmd.fieldbyname('ShowMsg').AsString), '提示', 0);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
Order_Sub.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmYGInPut.v1SYRNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
frmZDYHelp := TfrmZDYHelp.Create(self);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'SYRName';
|
||||
flagName := '车间';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
with Order_Sub do
|
||||
begin
|
||||
edit;
|
||||
FieldByName('SYRName').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||
end;
|
||||
end;
|
||||
free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYGInPut.v1Column2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'BZName';
|
||||
flagname := '班组名称';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
with Order_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('BZName').Value := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
613
A01基础公司管理/U_EmployeeList.dfm
Normal file
613
A01基础公司管理/U_EmployeeList.dfm
Normal file
|
|
@ -0,0 +1,613 @@
|
|||
inherited frmEmployeeList: TfrmEmployeeList
|
||||
Top = 39
|
||||
Caption = #21592#24037#26723#26696#21015#34920
|
||||
ClientHeight = 509
|
||||
ClientWidth = 1432
|
||||
ExplicitWidth = 1448
|
||||
ExplicitHeight = 548
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar [0]
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1432
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 18
|
||||
ButtonWidth = 84
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 1
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 0
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 142
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
ImageIndex = 9
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 3
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 284
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 3
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 355
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #37096#38376#35843#25972
|
||||
ImageIndex = 19
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TLZ: TToolButton
|
||||
Left = 450
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #31163#32844
|
||||
ImageIndex = 17
|
||||
OnClick = TLZClick
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 521
|
||||
Top = 0
|
||||
Width = 155
|
||||
Height = 38
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clWhite
|
||||
ParentBackground = False
|
||||
TabOrder = 0
|
||||
DesignSize = (
|
||||
155
|
||||
38)
|
||||
object Label6: TLabel
|
||||
Left = 10
|
||||
Top = 11
|
||||
Width = 48
|
||||
Height = 12
|
||||
Anchors = [akLeft]
|
||||
Caption = #31163#32844#26085#26399
|
||||
end
|
||||
object SJLiZhiDate: TDateTimePicker
|
||||
Left = 60
|
||||
Top = 7
|
||||
Width = 90
|
||||
Height = 20
|
||||
Anchors = [akLeft]
|
||||
Date = 43292.000000000000000000
|
||||
Time = 0.850766331022896300
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object TCXLZ: TToolButton
|
||||
Left = 676
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25764#38144#31163#32844
|
||||
ImageIndex = 11
|
||||
OnClick = TCXLZClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 771
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21592#24037#29031#29255#19978#20256
|
||||
ImageIndex = 15
|
||||
Visible = False
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBView: TToolButton
|
||||
Left = 890
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
ImageIndex = 8
|
||||
OnClick = TBViewClick
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 961
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 20
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 1032
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 1127
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel [1]
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 1432
|
||||
Height = 38
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clWhite
|
||||
ParentBackground = False
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 186
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #22995#21517
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 426
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #24615#21035
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 537
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #23703#20301
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 309
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #37096#38376
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 657
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #36710#38388
|
||||
Visible = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 43
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #21592#24037#32534#21495
|
||||
end
|
||||
object EEName: TEdit
|
||||
Tag = 2
|
||||
Left = 211
|
||||
Top = 8
|
||||
Width = 83
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = EENameChange
|
||||
end
|
||||
object Sex: TComboBox
|
||||
Tag = 1
|
||||
Left = 452
|
||||
Top = 8
|
||||
Width = 70
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
TabOrder = 1
|
||||
OnChange = EENameChange
|
||||
Items.Strings = (
|
||||
#30007
|
||||
#22899
|
||||
'')
|
||||
end
|
||||
object Post: TEdit
|
||||
Tag = 2
|
||||
Left = 564
|
||||
Top = 8
|
||||
Width = 75
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = EENameChange
|
||||
end
|
||||
object Dept: TEdit
|
||||
Tag = 2
|
||||
Left = 336
|
||||
Top = 8
|
||||
Width = 75
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = EENameChange
|
||||
end
|
||||
object SYRName: TEdit
|
||||
Tag = 2
|
||||
Left = 684
|
||||
Top = 8
|
||||
Width = 75
|
||||
Height = 20
|
||||
TabOrder = 4
|
||||
Visible = False
|
||||
OnChange = EENameChange
|
||||
end
|
||||
object EECode: TEdit
|
||||
Tag = 2
|
||||
Left = 91
|
||||
Top = 8
|
||||
Width = 83
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnChange = EENameChange
|
||||
end
|
||||
end
|
||||
object cxDBTreeList1: TcxDBTreeList [2]
|
||||
Left = 0
|
||||
Top = 76
|
||||
Width = 225
|
||||
Height = 433
|
||||
Align = alLeft
|
||||
Bands = <
|
||||
item
|
||||
end>
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.ParentField = 'DPParent'
|
||||
DataController.KeyField = 'DPID'
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OptionsBehavior.CopyCaptionsToClipboard = False
|
||||
OptionsBehavior.ExpandOnDblClick = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.CellAutoHeight = True
|
||||
OptionsView.Headers = False
|
||||
RootValue = -1
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
Styles.Inactive = DataLink_Company.Red
|
||||
Styles.Selection = DataLink_Company.Red
|
||||
Styles.IncSearch = DataLink_Company.Red
|
||||
TabOrder = 2
|
||||
OnDblClick = cxDBTreeList1DblClick
|
||||
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||
DataBinding.FieldName = 'DPName'
|
||||
Width = 210
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
Position.BandIndex = 0
|
||||
Summary.FooterSummaryItems = <>
|
||||
Summary.GroupFooterSummaryItems = <>
|
||||
end
|
||||
end
|
||||
object cxSplitter1: TcxSplitter [3]
|
||||
Left = 225
|
||||
Top = 76
|
||||
Width = 8
|
||||
Height = 433
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
Control = cxDBTreeList1
|
||||
end
|
||||
object TPanel [4]
|
||||
Left = 233
|
||||
Top = 76
|
||||
Width = 1199
|
||||
Height = 433
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 4
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 1195
|
||||
Height = 25
|
||||
Align = alTop
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 3
|
||||
Properties.TabIndex = 0
|
||||
Properties.Tabs.Strings = (
|
||||
#22312#32844
|
||||
#31163#32844
|
||||
#20840#37096)
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 28
|
||||
ClientRectRight = 1195
|
||||
ClientRectTop = 28
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 27
|
||||
Width = 1195
|
||||
Height = 404
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 1
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Header = cxStyle1
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 52
|
||||
end
|
||||
object v1RuZhiDate: TcxGridDBColumn
|
||||
Caption = #20837#32844#26085#26399
|
||||
DataBinding.FieldName = 'EntryDate'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 84
|
||||
end
|
||||
object v1YGNo: TcxGridDBColumn
|
||||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'EECode'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1YGName: TcxGridDBColumn
|
||||
Caption = #22995#21517
|
||||
DataBinding.FieldName = 'EEName'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 88
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #37096#38376
|
||||
DataBinding.FieldName = 'Dept'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #23703#20301
|
||||
DataBinding.FieldName = 'Post'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 82
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #31867#21035
|
||||
DataBinding.FieldName = 'EEType'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1SFZNo: TcxGridDBColumn
|
||||
Caption = #36523#20221#35777#21495
|
||||
DataBinding.FieldName = 'IdCard'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #24615#21035
|
||||
DataBinding.FieldName = 'Sex'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 85
|
||||
end
|
||||
object v1Column29: TcxGridDBColumn
|
||||
Caption = #25163#26426
|
||||
DataBinding.FieldName = 'Phone'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 91
|
||||
end
|
||||
object v1SJLiZhiDate: TcxGridDBColumn
|
||||
Caption = #31163#32844#26085#26399
|
||||
DataBinding.FieldName = 'SJLiZhiDate'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #31163#32844#26102#38388
|
||||
DataBinding.FieldName = 'DepartureDate'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 69
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #36523#20221#35777#21040#26399#26085#26399
|
||||
DataBinding.FieldName = 'IDCardEndData'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 126
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #23478#24237#20303#22336
|
||||
DataBinding.FieldName = 'HomeAddress'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 77
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #32452#21495
|
||||
DataBinding.FieldName = 'groupNO'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
end
|
||||
inherited ADOQueryBaseTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Left = 385
|
||||
Top = 129
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 563
|
||||
Top = 201
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 432
|
||||
Top = 200
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 392
|
||||
Top = 200
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 357
|
||||
Top = 203
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 497
|
||||
Top = 201
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 531
|
||||
Top = 200
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 321
|
||||
Top = 205
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N2Click
|
||||
end
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N1Click
|
||||
end
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = CDS_Tree
|
||||
Left = 147
|
||||
Top = 219
|
||||
end
|
||||
object CDS_Tree: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 96
|
||||
Top = 256
|
||||
end
|
||||
object ADOQueryTree: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 117
|
||||
Top = 145
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 460
|
||||
Top = 200
|
||||
end
|
||||
object cxStyleRepository1: TcxStyleRepository
|
||||
Left = 48
|
||||
Top = 96
|
||||
PixelsPerInch = 96
|
||||
object cxStyle1: TcxStyle
|
||||
AssignedValues = [svFont]
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = [fsBold]
|
||||
end
|
||||
end
|
||||
end
|
||||
629
A01基础公司管理/U_EmployeeList.pas
Normal file
629
A01基础公司管理/U_EmployeeList.pas
Normal file
|
|
@ -0,0 +1,629 @@
|
|||
unit U_EmployeeList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||
cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
|
||||
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, Menus, cxButtonEdit,
|
||||
cxDropDownEdit, cxPC, cxTL, cxMaskEdit, cxInplaceContainer, cxDBTL, cxTLData,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxTLdxBarBuiltInMenu, dxBarBuiltInMenu,
|
||||
cxNavigator, U_BaseList, dxSkinsCore, dxSkinsDefaultPainters, dxDateRanges,
|
||||
dxSkinOffice2013White, dxSkinWXI, dxScrollbarAnnotations;
|
||||
|
||||
type
|
||||
TfrmEmployeeList = class(TfrmBaseList)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBAdd: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
TBExport: TToolButton;
|
||||
Order_Main: TClientDataSet;
|
||||
TBView: TToolButton;
|
||||
Panel1: TPanel;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N2: TMenuItem;
|
||||
N1: TMenuItem;
|
||||
Label1: TLabel;
|
||||
EEName: TEdit;
|
||||
Label2: TLabel;
|
||||
Sex: TComboBox;
|
||||
Label5: TLabel;
|
||||
Post: TEdit;
|
||||
cxDBTreeList1: TcxDBTreeList;
|
||||
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||
DataSource2: TDataSource;
|
||||
CDS_Tree: TClientDataSet;
|
||||
ADOQueryTree: TADOQuery;
|
||||
cxSplitter1: TcxSplitter;
|
||||
cxTabControl1: TcxTabControl;
|
||||
TLZ: TToolButton;
|
||||
ADOQuery1: TADOQuery;
|
||||
TCXLZ: TToolButton;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
cxStyle1: TcxStyle;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1RuZhiDate: TcxGridDBColumn;
|
||||
v1YGName: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column29: TcxGridDBColumn;
|
||||
v1SJLiZhiDate: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
Label4: TLabel;
|
||||
Dept: TEdit;
|
||||
v1SFZNo: TcxGridDBColumn;
|
||||
Label3: TLabel;
|
||||
SYRName: TEdit;
|
||||
Panel2: TPanel;
|
||||
Label6: TLabel;
|
||||
SJLiZhiDate: TDateTimePicker;
|
||||
ToolButton1: TToolButton;
|
||||
v1YGNo: TcxGridDBColumn;
|
||||
Label7: TLabel;
|
||||
EECode: TEdit;
|
||||
ToolButton2: TToolButton;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
ToolButton3: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CheckBox1Click(Sender: TObject);
|
||||
procedure CheckBox2Click(Sender: TObject);
|
||||
procedure TBViewClick(Sender: TObject);
|
||||
procedure CustomerNoNameChange(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure EENameChange(Sender: TObject);
|
||||
procedure cxDBTreeList1DblClick(Sender: TObject);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure TLZClick(Sender: TObject);
|
||||
procedure TCXLZClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
private
|
||||
canshu1: string;
|
||||
DQdate: TDateTime;
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
function DelData(): Boolean;
|
||||
procedure InitTree();
|
||||
procedure GLAge();
|
||||
{ Private declarations }
|
||||
public
|
||||
FFInt, FCloth: Integer;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmEmployeeList: TfrmEmployeeList;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp, U_EmployeeInPut, U_DeptTypeHelp; // U_FjList_RZ,
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmEmployeeList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmEmployeeList := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
inherited;
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
canshu1 := Trim(DParameters1);
|
||||
SJLiZhiDate.Date := SGetServerDate(ADOQueryTemp);
|
||||
cxgrid1.Align := alClient;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' exec P_EE_Get_All :DPID,:LiZhiFlag');
|
||||
Parameters.ParamByName('DPID').Value := Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||
Parameters.ParamByName('LiZhiFlag').Value := cxTabControl1.TabIndex;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryMain, Order_Main);
|
||||
SInitCDSData(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.GLAge();
|
||||
var
|
||||
FXTGLNF, FYGGLNF, FGLYF: Double;
|
||||
begin
|
||||
FXTGLNF := strtofloat(uppercase(formatdateTime('yyyy', SGetServerDate(ADOQueryTemp))));
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select RuZhiDate,YGYearGL from SY_Employee where YGType=''正式'' ');
|
||||
open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
first;
|
||||
while not eof do
|
||||
begin
|
||||
edit;
|
||||
if ADOQueryCmd.fieldbyname('RuZhiDate').asstring = '' then
|
||||
begin
|
||||
fieldbyname('YGYearGL').AsFloat := 0;
|
||||
end
|
||||
else
|
||||
begin
|
||||
FYGGLNF := strtofloat(uppercase(formatdateTime('yyyy', ADOQueryCmd.fieldbyname('RuZhiDate').AsDateTime)));
|
||||
FGLYF := strtofloat(uppercase(formatdateTime('MM', ADOQueryCmd.fieldbyname('RuZhiDate').AsDateTime)));
|
||||
if (FGLYF >= 1) and (FGLYF <= 3) then
|
||||
fieldbyname('YGYearGL').AsFloat := FXTGLNF - FYGGLNF + 1;
|
||||
if (FGLYF > 3) and (FGLYF <= 9) then
|
||||
fieldbyname('YGYearGL').AsFloat := FXTGLNF - FYGGLNF + 0.5;
|
||||
if (FGLYF > 9) and (FGLYF <= 12) then
|
||||
fieldbyname('YGYearGL').AsFloat := FXTGLNF - FYGGLNF;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.InitTree();
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
try
|
||||
ADOQueryTree.DisableControls;
|
||||
with ADOQueryTree do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from SY_Dept order by DPlevel,DPOrder,DPName');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryTree, CDS_Tree);
|
||||
SInitCDSData(ADOQueryTree, CDS_Tree);
|
||||
cxDBTreeList1.Items[0].Expand(True);
|
||||
finally
|
||||
ADOQueryTree.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.InitForm();
|
||||
begin
|
||||
ReadCxGrid('员工档案列表2', Tv1, 'OA管理');
|
||||
InitTree();
|
||||
// GLAge();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.TBFindClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, Order_Main);
|
||||
SInitCDSData(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmYGInPut := TfrmYGInPut.Create(Application);
|
||||
with frmYGInPut do
|
||||
begin
|
||||
PState := 1;
|
||||
FMainId := Trim(Self.Order_Main.fieldbyname('EEID').AsString);
|
||||
FDPID := Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||
FDPName := trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||
frmYGInPut.canshu1 := Trim(Self.canshu1);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
initgrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmYGInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
//if cxTabControl1.TabIndex<>0 then Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
if DelData() then
|
||||
begin
|
||||
Order_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmEmployeeList.DelData(): Boolean;
|
||||
begin
|
||||
try
|
||||
Result := false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Delete SY_Employee where EEID=''' + Trim(Order_Main.fieldbyname('EEID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' Delete TP_File where WBId=''' + Trim(Order_Main.fieldbyname('EEID').AsString) + '''');
|
||||
sql.Add(' and TFType=''YG'' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_EE_in_Account @DataID=''' + Trim(Order_Main.fieldbyname('EEID').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
|
||||
raise Exception.Create(PChar(ADOQueryCmd.fieldbyname('ShowMsg').AsString));
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result := True;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result := False;
|
||||
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then
|
||||
Exit;
|
||||
TcxGridToExcel('员工档案列表', cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitTree();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.TBAddClick(Sender: TObject);
|
||||
var
|
||||
maxno: string;
|
||||
begin
|
||||
try
|
||||
frmYGInPut := TfrmYGInPut.Create(Application);
|
||||
with frmYGInPut do
|
||||
begin
|
||||
PState := 0;
|
||||
FMainId := '';
|
||||
FDPID := Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||
FDPName := trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
initgrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmYGInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
v1SJLiZhiDate.Visible := false;
|
||||
if cxTabControl1.TabIndex <> 0 then
|
||||
v1SJLiZhiDate.Visible := true;
|
||||
InitForm();
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.CheckBox1Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.CheckBox2Click(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.TBViewClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmYGInPut := TfrmYGInPut.Create(Application);
|
||||
with frmYGInPut do
|
||||
begin
|
||||
PState := 1;
|
||||
FMainId := Trim(Self.Order_Main.fieldbyname('EEID').AsString);
|
||||
FDPID := Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||
TBSave.Visible := False;
|
||||
ToolButton1.Visible := False;
|
||||
ToolButton2.Visible := False;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmYGInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.CustomerNoNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, Order_Main);
|
||||
SInitCDSData(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(Order_Main, True);
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(Order_Main, False);
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
v1SJLiZhiDate.Visible := false;
|
||||
if cxTabControl1.TabIndex <> 0 then
|
||||
v1SJLiZhiDate.Visible := true;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
TBView.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.EENameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.cxDBTreeList1DblClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
CDS_Tree.Locate('DPID', Trim(Order_Main.fieldbyname('DPID').AsString), []);
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.TLZClick(Sender: TObject);
|
||||
begin
|
||||
if order_Main.IsEmpty then
|
||||
exit;
|
||||
if CxTabConTrol1.TabIndex <> 0 then
|
||||
exit;
|
||||
if application.MessageBox('确定要执行此操作', '提示', 1) = 2 then
|
||||
exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update SY_Employee set EEType=''离职'',DepartureDate=' + Quotedstr(trim(FormatDateTime('yyyy-MM-dd', SJLiZhiDate.Date))));
|
||||
|
||||
sql.Add(' where EEID=''' + trim(Order_Main.fieldbyname('EEID').AsString) + '''');
|
||||
execsql;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_EE_in_Account @DataID=''' + Trim(Order_Main.fieldbyname('EEID').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
|
||||
raise Exception.Create(PChar(ADOQueryCmd.fieldbyname('ShowMsg').AsString));
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
|
||||
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||
end;
|
||||
|
||||
initGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.TCXLZClick(Sender: TObject);
|
||||
begin
|
||||
if order_Main.IsEmpty then
|
||||
exit;
|
||||
if cxTabControl1.TabIndex <> 1 then
|
||||
exit;
|
||||
if application.MessageBox('确定要撤销离职吗', '提示', 1) = 2 then
|
||||
exit;
|
||||
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update SY_Employee set EEType=''正式'',DepartureDate=NULL');
|
||||
sql.Add(' where EEID=''' + trim(Order_Main.fieldbyname('EEID').AsString) + '''');
|
||||
execsql;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_EE_in_Account @DataID=''' + Trim(Order_Main.fieldbyname('EEID').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
|
||||
raise Exception.Create(PChar(ADOQueryCmd.fieldbyname('ShowMsg').AsString));
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
|
||||
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||
end;
|
||||
initGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
// if Order_Main.IsEmpty then
|
||||
// Exit;
|
||||
// try
|
||||
// frmFjList_RZ := TfrmFjList_RZ.Create(Application);
|
||||
// with frmFjList_RZ do
|
||||
// begin
|
||||
// if Trim(DParameters1) <> '高权限' then
|
||||
// cxButton1.Visible := false;
|
||||
// fkeyNO := Trim(Self.Order_Main.fieldbyname('EEID').AsString);
|
||||
// fType := '员工档案';
|
||||
// if ShowModal = 1 then
|
||||
// begin
|
||||
//
|
||||
// end;
|
||||
// end;
|
||||
// finally
|
||||
// frmFjList_RZ.Free;
|
||||
// end;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.ToolButton2Click(Sender: TObject);
|
||||
var
|
||||
FDPID, FName: string;
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
if Order_Main.Locate('ssel', true, []) = false then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
FDPID := '';
|
||||
FName := '';
|
||||
frmDeptTypeHelp := TfrmDeptTypeHelp.create(self);
|
||||
with frmDeptTypeHelp do
|
||||
begin
|
||||
if showmodal = 1 then
|
||||
begin
|
||||
FDPID := Trim(ADOQueryHelp.fieldbyname('DPID').AsString);
|
||||
FName := Trim(ADOQueryHelp.fieldbyname('DPName').AsString);
|
||||
end;
|
||||
free;
|
||||
end;
|
||||
|
||||
if trim(FDPID) = '' then
|
||||
exit;
|
||||
|
||||
try
|
||||
with Order_Main do
|
||||
begin
|
||||
DisableControls;
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
if fieldbyname('ssel').AsBoolean then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update SY_Employee SET Dept=''' + trim(FName) + ''' ');
|
||||
sql.Add(',DPID=''' + trim(FDPID) + ''' ');
|
||||
sql.Add('where EEID=' + quotedstr(trim(Order_Main.fieldbyname('EEID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
First;
|
||||
EnableControls;
|
||||
end;
|
||||
application.MessageBox('操作成功!', '提示信息');
|
||||
initgrid();
|
||||
except
|
||||
Order_Main.EnableControls;
|
||||
application.MessageBox('操作失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmEmployeeList.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
WriteCxGrid('员工档案列表2', Tv1, 'OA管理');
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
477
A01基础公司管理/U_FLJHD.dfm
Normal file
477
A01基础公司管理/U_FLJHD.dfm
Normal file
|
|
@ -0,0 +1,477 @@
|
|||
object frmFLJHD: TfrmFLJHD
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = #36741#26009#35745#21010#21333
|
||||
ClientHeight = 554
|
||||
ClientWidth = 1268
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object ToolBar2: TToolBar
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1268
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 91
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
GradientEndColor = 15717318
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton4: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 1
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 0
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 142
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 12
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton5: TToolButton
|
||||
Left = 308
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = ToolButton5Click
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 1268
|
||||
Height = 43
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label3: TLabel
|
||||
Left = 355
|
||||
Top = 14
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #35745#21010#21333#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 23
|
||||
Top = 14
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #21046#21333#26085#26399
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 164
|
||||
Top = 14
|
||||
Width = 4
|
||||
Height = 13
|
||||
Caption = '-'
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 587
|
||||
Top = 15
|
||||
Width = 39
|
||||
Height = 12
|
||||
Caption = #21512#21516#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 835
|
||||
Top = 16
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #23458#25143#21333#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object OrderNoM: TEdit
|
||||
Tag = 2
|
||||
Left = 412
|
||||
Top = 10
|
||||
Width = 149
|
||||
Height = 21
|
||||
TabOrder = 0
|
||||
OnChange = ToolButton4Click
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 76
|
||||
Top = 10
|
||||
Width = 85
|
||||
Height = 20
|
||||
Date = 40675.000000000000000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 0.464742650459811600
|
||||
TabOrder = 1
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 176
|
||||
Top = 10
|
||||
Width = 86
|
||||
Height = 20
|
||||
Date = 40675.000000000000000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 0.464761099538009100
|
||||
TabOrder = 2
|
||||
end
|
||||
object BuyConNo: TEdit
|
||||
Tag = 2
|
||||
Left = 893
|
||||
Top = 10
|
||||
Width = 149
|
||||
Height = 21
|
||||
TabOrder = 3
|
||||
OnChange = ToolButton4Click
|
||||
end
|
||||
object ConNoM: TEdit
|
||||
Tag = 2
|
||||
Left = 632
|
||||
Top = 10
|
||||
Width = 149
|
||||
Height = 21
|
||||
TabOrder = 4
|
||||
OnChange = ToolButton4Click
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 81
|
||||
Width = 1268
|
||||
Height = 473
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = AnticipateQTY
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
Styles.IncSearch = DataLink_Company.SHuangSe
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Styles.Inactive = DataLink_Company.SHuangSe
|
||||
Styles.Selection = DataLink_Company.SHuangSe
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 44
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #24207#21495
|
||||
DataBinding.FieldName = 'SerialNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object OrderNo: TcxGridDBColumn
|
||||
Caption = #35745#21010#21333#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 72
|
||||
end
|
||||
object ConNo: TcxGridDBColumn
|
||||
Caption = #21512#21516#21495
|
||||
DataBinding.FieldName = 'ConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 90
|
||||
end
|
||||
object DeliveryDate: TcxGridDBColumn
|
||||
Caption = #20132#36135#26085#26399
|
||||
DataBinding.FieldName = 'DlyDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 93
|
||||
end
|
||||
object C_Code: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'C_Code'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 105
|
||||
end
|
||||
object C_CodeName: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'C_Name'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 82
|
||||
end
|
||||
object C_Spec: TcxGridDBColumn
|
||||
Caption = #35268#26684
|
||||
DataBinding.FieldName = 'C_Spec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 87
|
||||
end
|
||||
object C_Width: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'C_Width'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 70
|
||||
end
|
||||
object C_GramWeight: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'C_GramWeight'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 72
|
||||
end
|
||||
object C_COLOR: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'C_COLOR'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 82
|
||||
end
|
||||
object C_COLORNO: TcxGridDBColumn
|
||||
Caption = #33394#21495
|
||||
DataBinding.FieldName = 'C_COLORNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 84
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'PRTOrderKgQty'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 52
|
||||
end
|
||||
object C_Pattern: TcxGridDBColumn
|
||||
Caption = #33457#22411#21495
|
||||
DataBinding.FieldName = 'C_Pattern'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object C_BKCOLOR: TcxGridDBColumn
|
||||
Caption = #24213#33394
|
||||
DataBinding.FieldName = 'C_BKCOLOR'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object AnticipateQTY: TcxGridDBColumn
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'OrdQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 86
|
||||
end
|
||||
object OrderUnit: TcxGridDBColumn
|
||||
Caption = #25968#37327#21333#20301
|
||||
DataBinding.FieldName = 'OrdUnit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 62
|
||||
end
|
||||
object CustNoName: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'CustName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column11: TcxGridDBColumn
|
||||
Caption = #24211#20301
|
||||
DataBinding.FieldName = 'StkPosition'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column13: TcxGridDBColumn
|
||||
Caption = #24037#33402#31867#22411
|
||||
DataBinding.FieldName = 'processtype'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column14: TcxGridDBColumn
|
||||
Caption = #30333#22383#25209#21495
|
||||
DataBinding.FieldName = 'Clothnumber'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column15: TcxGridDBColumn
|
||||
Caption = #21305#37325
|
||||
DataBinding.FieldName = 'PieceWeight'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column16: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'ORDNOTE'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #20316#19994#21333#21495
|
||||
DataBinding.FieldName = 'operationNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #23458#25143#21333#21495
|
||||
DataBinding.FieldName = 'BuyConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #27454#21495
|
||||
DataBinding.FieldName = 'C_StyleNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #26465#30721
|
||||
DataBinding.FieldName = 'C_Barcodes'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column6: TcxGridDBColumn
|
||||
Caption = #31665#25968
|
||||
DataBinding.FieldName = 'C_box'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column7: TcxGridDBColumn
|
||||
Caption = #20307#31215
|
||||
DataBinding.FieldName = 'C_volume'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 224
|
||||
Top = 296
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 344
|
||||
Top = 312
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 424
|
||||
Top = 320
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 464
|
||||
Top = 168
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 544
|
||||
Top = 176
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 640
|
||||
Top = 192
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 760
|
||||
Top = 232
|
||||
end
|
||||
end
|
||||
228
A01基础公司管理/U_FLJHD.pas
Normal file
228
A01基础公司管理/U_FLJHD.pas
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
unit U_FLJHD;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
|
||||
System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs,
|
||||
Vcl.ComCtrls, Vcl.ToolWin, dxBarBuiltInMenu, cxGraphics, cxControls,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxStyles, dxSkinsCore,
|
||||
dxSkinsDefaultPainters, cxCustomData, cxFilter, cxData, cxDataStorage, cxEdit,
|
||||
cxNavigator, dxDateRanges, Data.DB, cxDBData, cxCheckBox, cxCalendar,
|
||||
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||
cxClasses, cxGridCustomView, cxGrid, Datasnap.DBClient, Vcl.Menus,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, Data.Win.ADODB, Vcl.StdCtrls,
|
||||
Vcl.ExtCtrls;
|
||||
|
||||
type
|
||||
TfrmFLJHD = class(TForm)
|
||||
ToolBar2: TToolBar;
|
||||
ToolButton4: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton5: TToolButton;
|
||||
Panel1: TPanel;
|
||||
Label3: TLabel;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
OrderNoM: TEdit;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
BuyConNo: TEdit;
|
||||
ConNoM: TEdit;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
Order_Main: TClientDataSet;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
OrderNo: TcxGridDBColumn;
|
||||
ConNo: TcxGridDBColumn;
|
||||
DeliveryDate: TcxGridDBColumn;
|
||||
C_Code: TcxGridDBColumn;
|
||||
C_CodeName: TcxGridDBColumn;
|
||||
C_Spec: TcxGridDBColumn;
|
||||
C_Width: TcxGridDBColumn;
|
||||
C_GramWeight: TcxGridDBColumn;
|
||||
C_COLOR: TcxGridDBColumn;
|
||||
C_COLORNO: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
C_Pattern: TcxGridDBColumn;
|
||||
C_BKCOLOR: TcxGridDBColumn;
|
||||
AnticipateQTY: TcxGridDBColumn;
|
||||
OrderUnit: TcxGridDBColumn;
|
||||
CustNoName: TcxGridDBColumn;
|
||||
Tv1Column11: TcxGridDBColumn;
|
||||
Tv1Column13: TcxGridDBColumn;
|
||||
Tv1Column14: TcxGridDBColumn;
|
||||
Tv1Column15: TcxGridDBColumn;
|
||||
Tv1Column16: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure ToolButton5Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure BuyConNoChange(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmFLJHD: TfrmFLJHD;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmFLJHD.InitGrid();
|
||||
begin
|
||||
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
Filtered := False;
|
||||
sql.Clear;
|
||||
sql.Add('select B.*,A.* ');
|
||||
sql.add('from Trade_Plan_sub A');
|
||||
sql.Add('inner join Trade_Plan_Main B on B.mainID=A.mainID ');
|
||||
sql.Add('where B.FillTime>=''' + formatdateTime('yyyy-MM-dd', begdate.Date) + ''' ');
|
||||
sql.Add('and B.FillTime<''' + formatdateTime('yyyy-MM-dd', enddate.Date + 1) + ''' ');
|
||||
// sql.Add('and B.Workshop=' + quotedstr(fWorkshop));
|
||||
|
||||
sql.Add('and isnull(B.flstatus,''0'')=''9''');
|
||||
if OrderNoM.text <> '' then
|
||||
begin
|
||||
sql.Add('and OrderNo like ''%'+ trim(OrderNoM.text)+'%'' ');
|
||||
// sql.Add('%');
|
||||
end;
|
||||
if ConNoM.text <> '' then
|
||||
begin
|
||||
sql.Add('and B.ConNo like ''%'+ trim(ConNoM.text)+'%'' ');
|
||||
// sql.Add(')');
|
||||
end;
|
||||
if BuyConNo.text <> '' then
|
||||
begin
|
||||
sql.Add('and B.BuyConNo like ''%'+ trim(BuyConNo.text)+'%'' ');
|
||||
// sql.Add(')');
|
||||
end;
|
||||
|
||||
// if cxTabControl1.TabIndex = 0 then
|
||||
// sql.Add('and not exists(select PCID from Trade_Plan_Card X where X.subID=A.subID)');
|
||||
// if cxTabControl1.TabIndex = 1 then
|
||||
// sql.Add('and exists(select PCID from Trade_Plan_Card X where X.subID=A.subID)');
|
||||
Open;
|
||||
end;
|
||||
// SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, Order_Main);
|
||||
SInitCDSData(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
// TV1.DataController.Filter.Clear;
|
||||
// ToolButton4.Click;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFLJHD.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNoFiler(Tv1, True); //全选
|
||||
end;
|
||||
|
||||
procedure TfrmFLJHD.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNoFiler(Tv1, False); //全弃
|
||||
end;
|
||||
|
||||
procedure TfrmFLJHD.BuyConNoChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, Order_Main);
|
||||
SInitCDSData(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmFLJHD.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmFLJHD.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmFLJHD := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmFLJHD.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('辅料计划单选择', Tv1, '辅料计划单管理');
|
||||
BegDate.DateTime := SGetServerDate(ADOQueryTemp) - 30;
|
||||
EndDate.DateTime := SGetServerDate(ADOQueryTemp);
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmFLJHD.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
// if ADOQueryMain.Active = False then
|
||||
// Exit;
|
||||
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, Order_Main);
|
||||
SInitCDSData(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFLJHD.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('辅料计划单选择', Tv1, '辅料计划单管理');
|
||||
end;
|
||||
|
||||
procedure TfrmFLJHD.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmFLJHD.ToolButton4Click(Sender: TObject);
|
||||
begin
|
||||
initgrid();
|
||||
end;
|
||||
|
||||
procedure TfrmFLJHD.ToolButton5Click(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
500
A01基础公司管理/U_Factory.dfm
Normal file
500
A01基础公司管理/U_Factory.dfm
Normal file
|
|
@ -0,0 +1,500 @@
|
|||
inherited frmFactory: TfrmFactory
|
||||
Left = 160
|
||||
Top = 149
|
||||
Caption = #20379#24212#21830#36164#26009#31649#29702
|
||||
ClientHeight = 801
|
||||
ClientWidth = 1366
|
||||
FormStyle = fsMDIChild
|
||||
Position = poScreenCenter
|
||||
Visible = True
|
||||
ExplicitWidth = 1382
|
||||
ExplicitHeight = 840
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar [0]
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1366
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 103
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 1
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object btnFind: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 0
|
||||
Visible = False
|
||||
OnClick = btnFindClick
|
||||
end
|
||||
object btnAdd: TToolButton
|
||||
Left = 142
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
ImageIndex = 9
|
||||
OnClick = btnAddClick
|
||||
end
|
||||
object btnEdit: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 3
|
||||
OnClick = btnEditClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 284
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 5
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object btnFollower: TToolButton
|
||||
Left = 355
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25351#23450#36319#21333#21592
|
||||
ImageIndex = 15
|
||||
OnClick = btnFollowerClick
|
||||
end
|
||||
object btnChk: TToolButton
|
||||
Left = 462
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23457#26680
|
||||
ImageIndex = 12
|
||||
OnClick = btnChkClick
|
||||
end
|
||||
object btnReChk: TToolButton
|
||||
Left = 533
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25764#38144#23457#26680
|
||||
ImageIndex = 11
|
||||
OnClick = btnReChkClick
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 628
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #38468#20214
|
||||
ImageIndex = 22
|
||||
OnClick = ToolButton8Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 699
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 794
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel [1]
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 1366
|
||||
Height = 39
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clWhite
|
||||
ParentBackground = False
|
||||
TabOrder = 1
|
||||
object Label3: TLabel
|
||||
Left = 202
|
||||
Top = 13
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #20379#24212#21830#21517#31216
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 22
|
||||
Top = 13
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #20379#24212#21830#32534#21495
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 383
|
||||
Top = 13
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #20379#24212#21830#31616#31216
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 565
|
||||
Top = 13
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #20379#24212#21830#31867#22411
|
||||
end
|
||||
object CoName: TEdit
|
||||
Tag = 2
|
||||
Left = 266
|
||||
Top = 9
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnChange = CoCodeChange
|
||||
OnKeyPress = CoCodeKeyPress
|
||||
end
|
||||
object CoCode: TEdit
|
||||
Tag = 2
|
||||
Left = 85
|
||||
Top = 9
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = CoCodeChange
|
||||
OnKeyPress = CoCodeKeyPress
|
||||
end
|
||||
object CoAbbrName: TEdit
|
||||
Tag = 2
|
||||
Left = 447
|
||||
Top = 9
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = CoCodeChange
|
||||
OnKeyPress = CoCodeKeyPress
|
||||
end
|
||||
object CoBusinessType: TEdit
|
||||
Tag = 2
|
||||
Left = 628
|
||||
Top = 9
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = CoCodeChange
|
||||
OnKeyPress = CoCodeKeyPress
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid [2]
|
||||
Left = 0
|
||||
Top = 99
|
||||
Width = 1366
|
||||
Height = 372
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
OnFocusedRecordChanged = Tv1FocusedRecordChanged
|
||||
DataController.DataSource = DS_1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.IncSearch = DataLink_Company.SHuangSe
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Styles.Inactive = DataLink_Company.SHuangSe
|
||||
Styles.Selection = DataLink_Company.SHuangSe
|
||||
object v2Column5: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object v2Column2: TcxGridDBColumn
|
||||
Caption = #20379#24212#21830#32534#21495
|
||||
DataBinding.FieldName = 'CoCode'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 86
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Caption = #20379#24212#21830#20840#31216
|
||||
DataBinding.FieldName = 'CoName'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 127
|
||||
end
|
||||
object v2Column15: TcxGridDBColumn
|
||||
Caption = #20379#24212#21830#31616#31216
|
||||
DataBinding.FieldName = 'CoAbbrName'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 100
|
||||
end
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Caption = #20379#24212#21830#31867#22411
|
||||
DataBinding.FieldName = 'CoBusinessType'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'CONote'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 163
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #25805#20316#21592
|
||||
DataBinding.FieldName = 'Filler'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v2Column4: TcxGridDBColumn
|
||||
Caption = #36319#21333#21592
|
||||
DataBinding.FieldName = 'Follower'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #19978#32423#21333#20301
|
||||
DataBinding.FieldName = 'ParentCoName'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 108
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #31867#21035
|
||||
DataBinding.FieldName = 'GYSType'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #23454#38469#29983#20135#22320#22336
|
||||
DataBinding.FieldName = 'CoAddress'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 143
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel [3]
|
||||
Left = 0
|
||||
Top = 471
|
||||
Width = 1366
|
||||
Height = 330
|
||||
Align = alBottom
|
||||
Caption = 'Panel1'
|
||||
TabOrder = 3
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 1364
|
||||
Height = 328
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
DataController.DataSource = DS_2
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
object v3Column3: TcxGridDBColumn
|
||||
Caption = #40664#35748
|
||||
DataBinding.FieldName = 'IsDefault'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 76
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Caption = #32852#31995#20154
|
||||
DataBinding.FieldName = 'Contacts'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.CharCase = ecUpperCase
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object Tv2Column2: TcxGridDBColumn
|
||||
Caption = #32852#31995#30005#35805
|
||||
DataBinding.FieldName = 'Telephone'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 96
|
||||
end
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #25163#26426#21495
|
||||
DataBinding.FieldName = 'PhoneNumber'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.CharCase = ecUpperCase
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 93
|
||||
end
|
||||
object Tv2Column3: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'note'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 120
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl [4]
|
||||
Left = 0
|
||||
Top = 77
|
||||
Width = 1366
|
||||
Height = 22
|
||||
Align = alTop
|
||||
TabOrder = 4
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 9
|
||||
Properties.TabIndex = 0
|
||||
Properties.Tabs.Strings = (
|
||||
#26410#23457#26680
|
||||
#24050#23457#26680
|
||||
#20840#37096)
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 22
|
||||
ClientRectRight = 1366
|
||||
ClientRectTop = 19
|
||||
end
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
end
|
||||
inherited ADOQueryBaseTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Left = 137
|
||||
Top = 121
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 501
|
||||
Top = 137
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 613
|
||||
Top = 145
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 277
|
||||
Top = 225
|
||||
end
|
||||
object DS_1: TDataSource
|
||||
DataSet = CDS_1
|
||||
Left = 555
|
||||
Top = 243
|
||||
end
|
||||
object CDS_1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 496
|
||||
Top = 240
|
||||
end
|
||||
object CDS_2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 592
|
||||
Top = 532
|
||||
end
|
||||
object DS_2: TDataSource
|
||||
DataSet = CDS_2
|
||||
Left = 685
|
||||
Top = 555
|
||||
end
|
||||
object GPM_1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 422
|
||||
Top = 246
|
||||
end
|
||||
object GPM_2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 390
|
||||
Top = 542
|
||||
end
|
||||
end
|
||||
611
A01基础公司管理/U_Factory.pas
Normal file
611
A01基础公司管理/U_Factory.pas
Normal file
|
|
@ -0,0 +1,611 @@
|
|||
unit U_Factory;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, ComObj, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
cxNavigator, dxSkinsCore, dxSkinsDefaultPainters, dxDateRanges,
|
||||
dxBarBuiltInMenu, U_BaseList, cxPC, dxScrollbarAnnotations;
|
||||
|
||||
type
|
||||
TfrmFactory = class(TFrmBaseList)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
btnFind: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
Label3: TLabel;
|
||||
CoName: TEdit;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
DS_1: TDataSource;
|
||||
CDS_1: TClientDataSet;
|
||||
btnAdd: TToolButton;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column2: TcxGridDBColumn;
|
||||
Label1: TLabel;
|
||||
CoCode: TEdit;
|
||||
btnEdit: TToolButton;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
CoAbbrName: TEdit;
|
||||
Label4: TLabel;
|
||||
v2Column15: TcxGridDBColumn;
|
||||
CDS_2: TClientDataSet;
|
||||
DS_2: TDataSource;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
Label5: TLabel;
|
||||
v2Column4: TcxGridDBColumn;
|
||||
btnFollower: TToolButton;
|
||||
v2Column5: TcxGridDBColumn;
|
||||
Panel2: TPanel;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
v3Column3: TcxGridDBColumn;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
GPM_2: TcxGridPopupMenu;
|
||||
Tv2Column2: TcxGridDBColumn;
|
||||
Tv2Column3: TcxGridDBColumn;
|
||||
CoBusinessType: TEdit;
|
||||
btnChk: TToolButton;
|
||||
btnReChk: TToolButton;
|
||||
cxTabControl1: TcxTabControl;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton8: TToolButton;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure btnFindClick(Sender: TObject);
|
||||
procedure btnEditClick(Sender: TObject);
|
||||
procedure btnAddClick(Sender: TObject);
|
||||
procedure TBuserClick(Sender: TObject);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure btnFollowerClick(Sender: TObject);
|
||||
procedure FactTypeChange(Sender: TObject);
|
||||
procedure Tv2Column2PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure Tv2Column3PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure CoCodeKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure btnChkClick(Sender: TObject);
|
||||
procedure btnReChkClick(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton8Click(Sender: TObject);
|
||||
procedure CoCodeChange(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
procedure SetStatus();
|
||||
public
|
||||
FAuthority: string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmFactory: TfrmFactory;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp, U_FactoryInput, U_UserSel, U_AttachmentUpload;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmFactory.SetStatus();
|
||||
begin
|
||||
btnFollower.Enabled := false; //指定
|
||||
btnChk.Enabled := false; //审核
|
||||
btnReChk.Enabled := false; //撤销
|
||||
|
||||
btnAdd.Enabled := false; //新增
|
||||
btnEdit.Enabled := false; //修改
|
||||
TBDel.Enabled := false; //删除
|
||||
|
||||
if Trim(FAuthority) = '管理' then
|
||||
begin
|
||||
btnFollower.Enabled := true;
|
||||
btnAdd.Enabled := true;
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
btnEdit.Enabled := true;
|
||||
TBDel.Enabled := true;
|
||||
|
||||
btnChk.Enabled := true;
|
||||
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
|
||||
btnReChk.Enabled := true;
|
||||
|
||||
end;
|
||||
2:
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
btnAdd.Enabled := true;
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
btnEdit.Enabled := true;
|
||||
TBDel.Enabled := true;
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
|
||||
end;
|
||||
2:
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.InitGrid();
|
||||
var
|
||||
WSql, FCoCode: string;
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from SY_User where UserName=' + quotedstr(Trim(DName)));
|
||||
Open;
|
||||
end;
|
||||
|
||||
WSql := SGetFilters(Panel1, 1, 2);
|
||||
if trim(WSql) <> '' then
|
||||
begin
|
||||
WSql := ' and ' + trim(WSql);
|
||||
end;
|
||||
if not CDS_1.IsEmpty then
|
||||
FCoCode := CDS_1.FieldByName('CoCode').AsString;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from BS_Company ');
|
||||
SQL.Add(' where CoType=''供应商'' ' + (WSql));
|
||||
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
sql.Add(' and status=''0'''); //已审核是1,未审核是0
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
sql.Add(' and status=''1''');
|
||||
end;
|
||||
2:
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
if ADOQueryTemp.fieldbyname('Udept').AsString = '业务部' then
|
||||
begin
|
||||
SQL.Add('and GYSType in(''辅料'',''货代'') ');
|
||||
end;
|
||||
SQL.Add(' ORDER BY CoCode ');
|
||||
Open;
|
||||
end;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
CDS_1.Locate('CoCode', FCoCode, []);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmFactory := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.FactTypeChange(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
inherited;
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
if not CDS_1.Locate('SSel', true, []) then
|
||||
begin
|
||||
Application.MessageBox('请选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
while CDS_1.Locate('SSel', true, []) do
|
||||
begin
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BS_Com_Del @COID=' + quotedstr(trim(CDS_1.fieldbyname('COID').AsString)));
|
||||
sql.Add(',@DCode=' + quotedstr(trim(DCode)));
|
||||
sql.Add(',@DName=' + quotedstr(trim(DName)));
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
CDS_1.Delete;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FAuthority := self.fParameters1;
|
||||
ReadCxGrid(trim(self.Caption) + 'TV1', Tv1, '供应商管理');
|
||||
ReadCxGrid(trim(self.Caption) + 'TV2', Tv2, '供应商管理');
|
||||
SetStatus();
|
||||
|
||||
InitGrid();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
|
||||
WriteCxGrid(trim(self.Caption) + 'TV1', Tv1, '供应商管理');
|
||||
WriteCxGrid(trim(self.Caption) + 'TV2', Tv2, '供应商管理');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.btnFindClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.CoCodeChange(Sender: TObject);
|
||||
begin
|
||||
btnFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.CoCodeKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
SetStatus();
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.btnEditClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
try
|
||||
frmFactoryInput := TfrmFactoryInput.Create(Application);
|
||||
with frmFactoryInput do
|
||||
begin
|
||||
FCOID := Trim(Self.CDS_1.fieldbyname('COID').AsString);
|
||||
// CoCode.ReadOnly:=True;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmFactoryInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.btnAddClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmFactoryInput := TfrmFactoryInput.Create(Application);
|
||||
with frmFactoryInput do
|
||||
begin
|
||||
FCOID := '';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmFactoryInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.TBuserClick(Sender: TObject);
|
||||
var
|
||||
FuserName: string;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.Tv2Column2PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
begin
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
FFieldName := Trim(Tv2.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
if Trim(mvalue) = '' then
|
||||
begin
|
||||
mvalue := '0';
|
||||
end;
|
||||
|
||||
with CDS_1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value := mvalue;
|
||||
Post;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('update BS_Company set ' + FFieldName + '=' + quotedstr(Trim(mvalue)));
|
||||
sql.Add('where CoID=' + quotedstr(Trim(CDS_1.fieldbyname('CoID').AsString)));
|
||||
ExecSQL;
|
||||
end;
|
||||
tv2.Controller.EditingController.ShowEdit();
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.Tv2Column3PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
begin
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
FFieldName := Trim(Tv2.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
if Trim(mvalue) = '' then
|
||||
begin
|
||||
mvalue := '0';
|
||||
end;
|
||||
|
||||
with CDS_1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value := mvalue;
|
||||
Post;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('update BS_Company set ' + FFieldName + '=' + quotedstr(Trim(mvalue)));
|
||||
sql.Add('where CoID=' + quotedstr(Trim(CDS_1.fieldbyname('CoID').AsString)));
|
||||
ExecSQL;
|
||||
end;
|
||||
tv2.Controller.EditingController.ShowEdit();
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from BS_Company_contact where COID=' + quotedstr(Trim(CDS_1.FieldByName('COID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryTemp, CDS_2);
|
||||
SInitCDSData(ADOQueryTemp, CDS_2);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.btnFollowerClick(Sender: TObject);
|
||||
var
|
||||
MFollower, MFollowId: string;
|
||||
begin
|
||||
MFollower := '';
|
||||
MFollowId := '';
|
||||
if not CDS_1.Locate('SSel', true, []) then
|
||||
begin
|
||||
Application.MessageBox('请选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
try
|
||||
frmUserSel := TfrmUserSel.Create(Application);
|
||||
with frmUserSel do
|
||||
begin
|
||||
FMultiple := True;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
while frmUserSel.CDS_1.Locate('SSel', True, []) do
|
||||
begin
|
||||
if MFollowId = '' then
|
||||
begin
|
||||
MFollowId := Trim(CDS_1.FieldByName('UserID').AsString);
|
||||
MFollower := Trim(CDS_1.FieldByName('UserName').AsString);
|
||||
end
|
||||
else
|
||||
begin
|
||||
MFollowId := MFollowId + ',' + Trim(CDS_1.FieldByName('UserID').AsString);
|
||||
MFollower := MFollower + ',' + Trim(CDS_1.FieldByName('UserName').AsString);
|
||||
end;
|
||||
|
||||
frmUserSel.CDS_1.Delete;
|
||||
end;
|
||||
|
||||
while Self.CDS_1.Locate('SSel', True, []) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('update BS_Company set FollowId=' + quotedstr(trim(MFollowId)));
|
||||
sql.Add(' ,Follower=' + quotedstr(trim(MFollower)));
|
||||
sql.Add(' where COID=''' + Trim(Self.CDS_1.fieldbyname('COID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
Self.CDS_1.Delete;
|
||||
end;
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmUserSel.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.btnChkClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
if not CDS_1.Locate('SSel', true, []) then
|
||||
begin
|
||||
Application.MessageBox('请选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
with CDS_1 do
|
||||
begin
|
||||
DisableControls;
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
if fieldbyname('SSel').AsBoolean then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update BS_Company SET status=''1'',Chktime=getdate(),Chker=' + quotedstr(trim(DName)));
|
||||
sql.Add('where CoID=' + quotedstr(trim(CDS_1.fieldbyname('CoID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
First;
|
||||
EnableControls;
|
||||
end;
|
||||
application.MessageBox('审核成功!', '提示信息');
|
||||
TBRafresh.Click;
|
||||
except
|
||||
application.MessageBox('审核失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.btnReChkClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
if not CDS_1.Locate('SSel', true, []) then
|
||||
begin
|
||||
Application.MessageBox('请选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
with CDS_1 do
|
||||
begin
|
||||
DisableControls;
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
if fieldbyname('SSel').AsBoolean then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update BS_Company SET status=''0'',Chktime=null,Chker=null ');
|
||||
sql.Add('where CoID=' + quotedstr(trim(CDS_1.fieldbyname('CoID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
First;
|
||||
EnableControls;
|
||||
end;
|
||||
application.MessageBox('撤销审核成功!', '提示信息');
|
||||
TBRafresh.Click;
|
||||
except
|
||||
application.MessageBox('撤销审核失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFactory.ToolButton8Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmAttachmentUpload := TfrmAttachmentUpload.Create(Application);
|
||||
with frmAttachmentUpload do
|
||||
begin
|
||||
if (Trim(FAuthority) = '录入') or (Trim(FAuthority) = '管理') then
|
||||
FEditAuthority := True;
|
||||
fkeyNO := Trim(Self.CDS_1.fieldbyname('Coid').AsString);
|
||||
fType := '客户';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmAttachmentUpload.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
469
A01基础公司管理/U_FactoryInput.dfm
Normal file
469
A01基础公司管理/U_FactoryInput.dfm
Normal file
|
|
@ -0,0 +1,469 @@
|
|||
object frmFactoryInput: TfrmFactoryInput
|
||||
Left = 261
|
||||
Top = 149
|
||||
Caption = #20379#24212#21830#36164#26009#24405#20837
|
||||
ClientHeight = 813
|
||||
ClientWidth = 1283
|
||||
Color = clWhite
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = True
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1283
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 91
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton3: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 166
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 1283
|
||||
Height = 227
|
||||
Align = alTop
|
||||
BevelInner = bvNone
|
||||
BevelOuter = bvNone
|
||||
BorderStyle = bsNone
|
||||
Color = clWhite
|
||||
Ctl3D = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentColor = False
|
||||
ParentCtl3D = False
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
object Label2: TLabel
|
||||
Left = 23
|
||||
Top = 33
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20379#24212#21830#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 239
|
||||
Top = 33
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20379#24212#21830#20840#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 34
|
||||
Top = 187
|
||||
Width = 54
|
||||
Height = 12
|
||||
Caption = #22791' '#27880
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label19: TLabel
|
||||
Left = 672
|
||||
Top = 33
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20379#24212#21830#31867#22411
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 455
|
||||
Top = 33
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20379#24212#21830#31616#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 36
|
||||
Top = 113
|
||||
Width = 52
|
||||
Height = 24
|
||||
Caption = #23454#38469#29983#20135#13#10#32463#33829#22320#22336
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 878
|
||||
Top = 31
|
||||
Width = 52
|
||||
Height = 15
|
||||
Caption = #19978#32423#21333#20301
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = 'Times New Roman'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 23
|
||||
Top = 65
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20379#24212#21830#30005#35805
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 239
|
||||
Top = 65
|
||||
Width = 61
|
||||
Height = 12
|
||||
Caption = #31867' '#21035
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object CoName: TEdit
|
||||
Tag = 2
|
||||
Left = 310
|
||||
Top = 29
|
||||
Width = 123
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
end
|
||||
object CoNote: TMemo
|
||||
Tag = 2
|
||||
Left = 94
|
||||
Top = 167
|
||||
Width = 969
|
||||
Height = 52
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 3
|
||||
end
|
||||
object CoAbbrName: TEdit
|
||||
Tag = 2
|
||||
Left = 527
|
||||
Top = 29
|
||||
Width = 122
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
end
|
||||
object CoCode: TEdit
|
||||
Tag = 2
|
||||
Left = 94
|
||||
Top = 26
|
||||
Width = 123
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
end
|
||||
object CoAddress: TMemo
|
||||
Tag = 2
|
||||
Left = 94
|
||||
Top = 93
|
||||
Width = 969
|
||||
Height = 52
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 4
|
||||
end
|
||||
object CoBusinessType: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 743
|
||||
Top = 29
|
||||
Width = 123
|
||||
Height = 20
|
||||
Hint = 'FactType/'#20379#24212#21830#31867#22411
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
OnBtnUpClick = COGdyBtnUpClick
|
||||
OnBtnDnClick = COGdyBtnDnClick
|
||||
end
|
||||
object ParentCoName: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 936
|
||||
Top = 28
|
||||
Width = 140
|
||||
Height = 20
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 6
|
||||
OnBtnUpClick = ParentCoNameBtnUpClick
|
||||
OnBtnDnClick = ParentCoNameBtnDnClick
|
||||
end
|
||||
object Phone: TEdit
|
||||
Tag = 2
|
||||
Left = 94
|
||||
Top = 61
|
||||
Width = 123
|
||||
Height = 20
|
||||
TabOrder = 7
|
||||
end
|
||||
object GYSType: TComboBox
|
||||
Tag = 2
|
||||
Left = 306
|
||||
Top = 61
|
||||
Width = 124
|
||||
Height = 22
|
||||
Style = csDropDownList
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ItemIndex = 0
|
||||
ParentFont = False
|
||||
TabOrder = 8
|
||||
Items.Strings = (
|
||||
''
|
||||
#38754#26009
|
||||
#36741#26009
|
||||
#36135#20195)
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 265
|
||||
Width = 1283
|
||||
Height = 548
|
||||
Align = alClient
|
||||
Caption = 'Panel1'
|
||||
TabOrder = 2
|
||||
object ToolBar2: TToolBar
|
||||
Tag = 1
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 1281
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 91
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #35774#20026#40664#35748
|
||||
ImageIndex = 15
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 95
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 2
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object ToolButton5: TToolButton
|
||||
Left = 166
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 6
|
||||
OnClick = ToolButton5Click
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 1
|
||||
Top = 39
|
||||
Width = 1281
|
||||
Height = 508
|
||||
Align = alClient
|
||||
BorderStyle = cxcbsNone
|
||||
TabOrder = 1
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
DataController.DataSource = DSLXR
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
object v3Column3: TcxGridDBColumn
|
||||
Caption = #40664#35748
|
||||
DataBinding.FieldName = 'IsDefault'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 76
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #32852#31995#20154
|
||||
DataBinding.FieldName = 'Contacts'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.CharCase = ecUpperCase
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 108
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #32852#31995#30005#35805
|
||||
DataBinding.FieldName = 'Telephone'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #25163#26426#21495
|
||||
DataBinding.FieldName = 'PhoneNumber'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.CharCase = ecUpperCase
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 86
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'note'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 659
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 582
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 501
|
||||
Top = 1
|
||||
end
|
||||
object CDS_LXR: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 593
|
||||
Top = 351
|
||||
end
|
||||
object DSLXR: TDataSource
|
||||
DataSet = CDS_LXR
|
||||
Left = 672
|
||||
Top = 359
|
||||
end
|
||||
object GPM_2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 774
|
||||
Top = 350
|
||||
end
|
||||
end
|
||||
514
A01基础公司管理/U_FactoryInput.pas
Normal file
514
A01基础公司管理/U_FactoryInput.pas
Normal file
|
|
@ -0,0 +1,514 @@
|
|||
unit U_FactoryInput;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDropDownEdit, BtnEdit, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
cxNavigator, dxSkinsCore, dxSkinsDefaultPainters, dxDateRanges,
|
||||
dxBarBuiltInMenu, U_BaseList, dxScrollbarAnnotations;
|
||||
|
||||
type
|
||||
TfrmFactoryInput = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ToolButton3: TToolButton;
|
||||
CDS_LXR: TClientDataSet;
|
||||
DSLXR: TDataSource;
|
||||
ScrollBox1: TScrollBox;
|
||||
Label2: TLabel;
|
||||
Label6: TLabel;
|
||||
Label7: TLabel;
|
||||
Label19: TLabel;
|
||||
CoName: TEdit;
|
||||
CoNote: TMemo;
|
||||
Label1: TLabel;
|
||||
CoAbbrName: TEdit;
|
||||
CoCode: TEdit;
|
||||
GPM_2: TcxGridPopupMenu;
|
||||
Label4: TLabel;
|
||||
CoAddress: TMemo;
|
||||
CoBusinessType: TBtnEditC;
|
||||
Panel2: TPanel;
|
||||
ToolBar2: TToolBar;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton4: TToolButton;
|
||||
ToolButton5: TToolButton;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v3Column3: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
ToolButton2: TToolButton;
|
||||
Label5: TLabel;
|
||||
ParentCoName: TBtnEditC;
|
||||
Label3: TLabel;
|
||||
Phone: TEdit;
|
||||
Label8: TLabel;
|
||||
GYSType: TComboBox;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure ToolButton5Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure COGdyBtnDnClick(Sender: TObject);
|
||||
procedure COGdyBtnUpClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure ParentCoNameBtnUpClick(Sender: TObject);
|
||||
procedure ParentCoNameBtnDnClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
function SaveData(): Boolean;
|
||||
public
|
||||
fkhType: string;
|
||||
{ Public declarations }
|
||||
FCOID: string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmFactoryInput: TfrmFactoryInput;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp, U_CompanySel;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmFactoryInput.InitGrid();
|
||||
begin
|
||||
try
|
||||
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from BS_Company where CoType=''供应商'' and COID=''' + Trim(FCOID) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCSHData(ADOQueryMain, ScrollBox1, 2);
|
||||
ParentCoName.TxtCode := ADOQueryMain.FieldByName('ParentCoCode').AsString;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from BS_Company_contact where COID=' + quotedstr(Trim(FCOID)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryMain, CDS_LXR);
|
||||
SInitCDSData(ADOQueryMain, CDS_LXR);
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFactoryInput.ParentCoNameBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
TBtnEditC(Sender).TxtCode := '';
|
||||
end;
|
||||
|
||||
procedure TfrmFactoryInput.ParentCoNameBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmCompanySel := TfrmCompanySel.Create(Application);
|
||||
with frmCompanySel do
|
||||
begin
|
||||
FCoType := '供应商';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
ParentCoName.Text := Trim(CDS_1.fieldbyname('CoAbbrName').AsString);
|
||||
ParentCoName.TxtCode := Trim(CDS_1.fieldbyname('CoCode').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCompanySel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFactoryInput.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
|
||||
frmFactoryInput := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmFactoryInput.COGdyBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
TBtnEditC(Sender).TxtCode := '';
|
||||
end;
|
||||
|
||||
procedure TfrmFactoryInput.COGdyBtnUpClick(Sender: TObject);
|
||||
var
|
||||
fsj: string;
|
||||
FWZ: Integer;
|
||||
begin
|
||||
fsj := Trim(TEdit(Sender).Hint);
|
||||
FWZ := Pos('/', fsj);
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := Copy(fsj, 1, FWZ - 1);
|
||||
flagname := Copy(fsj, FWZ + 1, Length(fsj) - FWZ);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFactoryInput.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmFactoryInput.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TfrmFactoryInput.FormShow(Sender: TObject);
|
||||
begin
|
||||
|
||||
ReadCxGrid(trim(self.Caption) + 'TV1', Tv1, '供应商管理');
|
||||
InitGrid();
|
||||
if trim(FCOID) = '' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' exec P_BS_Com_Get_No_copy1 @Str=''G'' ');
|
||||
// sql.Add('select MAX(CoCode) AS MC from BS_Company where Valid=''Y'' and CoCode like ''G0%'' ');
|
||||
Open;
|
||||
end;
|
||||
CoCode.Text := trim(ADOQueryTemp.FieldByName('NewCoCode').asstring);
|
||||
// CoCode.Text := trim(ADOQueryTemp.FieldByName('MC').asstring);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFactoryInput.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
function TfrmFactoryInput.SaveData(): Boolean;
|
||||
var
|
||||
MaxId, MaxSubId, FCoCode, FCCID: string;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if Trim(FCOID) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd, MaxId, 'CO', 'BS_Company', 4, 1) = False then
|
||||
begin
|
||||
Result := False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if trim(CoCode.Text) = '' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' exec P_BS_Com_Get_No @Str=''G'' ');
|
||||
Open;
|
||||
end;
|
||||
CoCode.Text := trim(ADOQueryTemp.FieldByName('NewCoCode').asstring);
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
MaxId := Trim(FCOID);
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BS_Company where COID=''' + Trim(FCOID) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FCOID) = '' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('FillId').Value := Trim(DCode);
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
FieldByName('status').Value := '0';
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('EditId').Value := Trim(DCode);
|
||||
FieldByName('Editer').Value := Trim(DName);
|
||||
FieldByName('Edittime').Value := SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('COID').Value := Trim(MaxId);
|
||||
RTSetsavedata(ADOQueryCmd, 'BS_Company', ScrollBox1, 2);
|
||||
FieldByName('CoType').Value := '供应商';
|
||||
FieldByName('ParentCoCode').Value := ParentCoName.TxtCode;
|
||||
Post;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BS_Company where CoCode=' + quotedstr(trim(CoCode.Text)));
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryCmd.RecordCount > 1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('供应商编号重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BS_Company where CoName=' + quotedstr(trim(CoName.Text)));
|
||||
sql.Add(' and CoType=''供应商'' ');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryCmd.RecordCount > 1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('供应商名称重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BS_Company where CoAbbrName=' + quotedstr(trim(CoAbbrName.Text)));
|
||||
sql.Add(' and CoType=''供应商'' ');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryCmd.RecordCount > 1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('供应商简称重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
////////////// 联系人 ///////////////////
|
||||
if not CDS_LXR.IsEmpty then
|
||||
begin
|
||||
with CDS_LXR do
|
||||
begin
|
||||
CDS_LXR.First;
|
||||
while not Eof do
|
||||
begin
|
||||
FCCID := Trim(CDS_LXR.fieldbyname('CCID').AsString);
|
||||
if Trim(FCCID) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd, MaxSubId, 'CCS', 'BS_Company_contact', 4, 1) = False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取系人最大ID失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
MaxSubId := trim(FCCID);
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BS_Company_contact where CCID=' + quotedstr(Trim(MaxSubId)));
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FCCID) = '' then
|
||||
begin
|
||||
Append;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
end;
|
||||
FieldByName('CCID').Value := Trim(MaxSubId);
|
||||
FieldByName('COID').Value := Trim(MaxId);
|
||||
RTSetSaveDataCDS(ADOQueryCmd, Tv1, CDS_LXR, 'BS_Company_contact', 0);
|
||||
Post;
|
||||
end;
|
||||
with CDS_LXR do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('CCID').Value := Trim(MaxSubId);
|
||||
Post;
|
||||
end;
|
||||
CDS_LXR.Next;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
////////////// 联系人 ///////////////////
|
||||
//////////////// 更新名称 ////////////////////////
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('exec P_Com_Up_Code @COID=' + quotedstr(Trim(MaxId)));
|
||||
// ExecSQL;
|
||||
// end;
|
||||
//////////////// 更新名称 ////////////////////////
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
FCCID := Trim(MaxSubId);
|
||||
Result := True;
|
||||
except
|
||||
Result := false;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFactoryInput.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
|
||||
if Trim(CoAbbrName.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('简称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(CoName.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(GYSType.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('供应商类别不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
ModalResult := 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFactoryInput.ToolButton4Click(Sender: TObject);
|
||||
var
|
||||
maxno: string;
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd, maxno, 'CC', 'BS_Company_contact', 4, 1) = False then
|
||||
begin
|
||||
Application.MessageBox('取系人最大ID失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_LXR.IsEmpty then
|
||||
begin
|
||||
with CDS_LXR do
|
||||
begin
|
||||
Append;
|
||||
fieldbyname('CCID').Value := trim(maxno);
|
||||
fieldbyname('IsDefault').Value := true;
|
||||
Post;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
with CDS_LXR do
|
||||
begin
|
||||
Append;
|
||||
fieldbyname('CCID').Value := trim(maxno);
|
||||
fieldbyname('IsDefault').Value := false;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFactoryInput.ToolButton5Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_LXR.IsEmpty then
|
||||
Exit;
|
||||
if Trim(CDS_LXR.fieldbyname('CCID').AsString) <> '' then
|
||||
begin
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from BS_Company_contact where CCID=''' + Trim(CDS_LXR.fieldbyname('CCID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
CDS_LXR.Delete;
|
||||
if CDS_LXR.IsEmpty = false then
|
||||
begin
|
||||
if CDS_LXR.Locate('IsDefault', true, []) = false then
|
||||
begin
|
||||
CDS_LXR.first;
|
||||
CDS_LXR.edit;
|
||||
CDS_LXR.FieldByName('IsDefault').value := true;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFactoryInput.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
DwFlag: string;
|
||||
begin
|
||||
DwFlag := trim(CDS_LXR.FieldByName('CCID').AsString);
|
||||
if CDS_LXR.Locate('IsDefault', true, []) then
|
||||
begin
|
||||
CDS_LXR.edit;
|
||||
CDS_LXR.FieldByName('IsDefault').value := false;
|
||||
end;
|
||||
if CDS_LXR.Locate('CCID', DwFlag, []) then
|
||||
begin
|
||||
CDS_LXR.edit;
|
||||
CDS_LXR.FieldByName('IsDefault').value := true;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFactoryInput.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(trim(self.Caption) + 'TV1', Tv1, '供应商管理');
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
188
A01基础公司管理/U_FileUp.dfm
Normal file
188
A01基础公司管理/U_FileUp.dfm
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
object frmFileUp: TfrmFileUp
|
||||
Left = 247
|
||||
Top = 162
|
||||
Width = 634
|
||||
Height = 447
|
||||
Caption = #19978#20256#25991#20214
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object cxGrid7: TcxGrid
|
||||
Left = 0
|
||||
Top = 41
|
||||
Width = 555
|
||||
Height = 367
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TV7: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
object FileName: TcxGridDBColumn
|
||||
Tag = 1
|
||||
Caption = #25991#20214#21517#31216
|
||||
DataBinding.FieldName = 'FileName'
|
||||
FooterAlignmentHorz = taCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 121
|
||||
end
|
||||
object FileDate: TcxGridDBColumn
|
||||
Tag = 1
|
||||
Caption = #19978#20256#26085#26399
|
||||
DataBinding.FieldName = 'FileDate'
|
||||
FooterAlignmentHorz = taCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 104
|
||||
end
|
||||
end
|
||||
object cxGridLevel6: TcxGridLevel
|
||||
GridView = TV7
|
||||
end
|
||||
end
|
||||
object Panel16: TPanel
|
||||
Left = 190
|
||||
Top = 126
|
||||
Width = 138
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
Caption = #27491#22312#19978#20256#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
end
|
||||
object ToolBar6: TToolBar
|
||||
Left = 555
|
||||
Top = 41
|
||||
Width = 63
|
||||
Height = 367
|
||||
Align = alRight
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Flat = True
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
object FileUp: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #19978#20256
|
||||
ImageIndex = 109
|
||||
Wrap = True
|
||||
OnClick = FileUpClick
|
||||
end
|
||||
object FileDel: TToolButton
|
||||
Left = 0
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 17
|
||||
Wrap = True
|
||||
OnClick = FileDelClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 618
|
||||
Height = 41
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 3
|
||||
object Label1: TLabel
|
||||
Left = 8
|
||||
Top = 14
|
||||
Width = 68
|
||||
Height = 16
|
||||
Caption = #20135#21697#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Image2: TImage
|
||||
Left = 537
|
||||
Top = 17
|
||||
Width = 23
|
||||
Height = 16
|
||||
end
|
||||
object Code: TEdit
|
||||
Left = 78
|
||||
Top = 9
|
||||
Width = 211
|
||||
Height = 24
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object ODPat: TOpenDialog
|
||||
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||
Left = 404
|
||||
Top = 197
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
MaxLineAction = maException
|
||||
ReadTimeout = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
Left = 405
|
||||
Top = 236
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
Left = 409
|
||||
Top = 285
|
||||
end
|
||||
object ADOQueryFile: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 488
|
||||
Top = 144
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ADOQueryFile
|
||||
Left = 392
|
||||
Top = 168
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 496
|
||||
Top = 216
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 504
|
||||
Top = 264
|
||||
end
|
||||
end
|
||||
357
A01基础公司管理/U_FileUp.pas
Normal file
357
A01基础公司管理/U_FileUp.pas
Normal file
|
|
@ -0,0 +1,357 @@
|
|||
unit U_FileUp;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, ComCtrls, ToolWin, ExtCtrls,
|
||||
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||
cxClasses, cxControls, cxGridCustomView, cxGrid, IdBaseComponent,
|
||||
IdComponent, IdTCPConnection, IdTCPClient, IdFTP, StdCtrls, ADODB,jpeg,
|
||||
BtnEdit,IniFiles;
|
||||
|
||||
type
|
||||
TfrmFileUp = class(TForm)
|
||||
cxGrid7: TcxGrid;
|
||||
TV7: TcxGridDBTableView;
|
||||
FileName: TcxGridDBColumn;
|
||||
FileDate: TcxGridDBColumn;
|
||||
cxGridLevel6: TcxGridLevel;
|
||||
Panel16: TPanel;
|
||||
ToolBar6: TToolBar;
|
||||
FileUp: TToolButton;
|
||||
FileDel: TToolButton;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Code: TEdit;
|
||||
ODPat: TOpenDialog;
|
||||
IdFTP1: TIdFTP;
|
||||
SaveDialog1: TSaveDialog;
|
||||
ADOQueryFile: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
Image2: TImage;
|
||||
procedure FileUpClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FileDelClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
lstPat: TStringList;
|
||||
AJpeg: TJPEGImage;
|
||||
procedure CreThumb(AJPeg:TJPEGImage;Image1:TImage;Width, Height: Integer);
|
||||
procedure SaveImageOther();
|
||||
procedure ReadINIFile10();
|
||||
{ Private declarations }
|
||||
public
|
||||
CYID:String;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmFileUp: TfrmFileUp;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmFileUp.ReadINIFile10();
|
||||
var
|
||||
programIni:Tinifile; //配置文件名
|
||||
FileName:string;
|
||||
begin
|
||||
FileName:=ExtractFilePath(Paramstr(0))+'SYSTEMSET.INI';
|
||||
programIni:=Tinifile.create(FileName);
|
||||
server:=programIni.ReadString('SERVER','服务器地址','127.0.0.1');
|
||||
programIni.Free;
|
||||
end;
|
||||
procedure TfrmFileUp.FileUpClick(Sender: TObject);
|
||||
var
|
||||
i,j: Integer;
|
||||
PatFile: String;
|
||||
FTPPath,FConNo,MaxNo:string;
|
||||
AJpeg: TJPEGImage;
|
||||
begin
|
||||
if Trim(Code.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('编号不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
lstPat.Clear;
|
||||
if ODPat.Execute then
|
||||
begin
|
||||
lstPat.AddStrings(ODPat.Files);
|
||||
end;
|
||||
|
||||
if lstPat.Count > 0 then
|
||||
begin
|
||||
try
|
||||
ReadINIFile10();
|
||||
server:=ReadINIFileStr('SYSTEMSET.INI','SERVER','服务器地址','127.0.0.1');
|
||||
IdFTP1.Host :=server;//PicSvr;
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
IdFTP1.Quit;
|
||||
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
Panel16.Visible:=True;
|
||||
Panel16.Refresh;
|
||||
AJpeg:=TJpegImage.Create();
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select Count(*) MM from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add('and filetype=''YP''');
|
||||
Open;
|
||||
j:=fieldbyname('MM').AsInteger;
|
||||
end;
|
||||
Image2.Picture.LoadFromFile(ODPat.FileName);
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
CreThumb(AJpeg,Image2,216, 187);
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
for i := 0 to lstPat.Count - 1 do
|
||||
begin
|
||||
PatFile := ExtractFileName(lstPat[i]);
|
||||
PatFile:=Copy(PatFile,(Pos('.',PatFile)+1),(Length(PatFile)-Pos('.',PatFile)) ) ;
|
||||
FConNo:=Trim(Code.Text);
|
||||
while Pos('/',FConNo)>0 do
|
||||
begin
|
||||
Delete(FConNo,Pos('/',FConNo),1);
|
||||
end;
|
||||
PatFile:=Trim(FConNo)+'-'+Inttostr(j+i+1)+'.'+PatFile;
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
try
|
||||
{if not DirectoryExists('D:\图片\'+Trim(gDef1)) then
|
||||
ForceDirectories('D:\图片\'+Trim(gDef1)); }
|
||||
IdFTP1.Put(lstPat[i], Trim('\YP')+'\'+Trim(PatFile));
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add(' and filename='''+Trim(PatFile)+'''');
|
||||
SQL.Add(' and filetype=''YP''');
|
||||
Open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
Panel16.Visible:=False;
|
||||
Application.MessageBox(PChar('文件<'+Trim(PatFile)+'>重复,'+inttostr(i)+'个文件上传成功!'),'提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
if GetLSNo(ADOQueryCmd,MaxNo,'YP','XD_File',4,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取图片最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('XFID').Value:=Trim(MaxNo);
|
||||
FieldByName('CYID').Value:=Trim(CYID);
|
||||
FieldByName('CYNO').Value:=Trim(Code.Text);
|
||||
FieldByName('filename').Value:=Trim(PatFile);
|
||||
FieldByName('FileDate').Value:=SGetServerDate(ADOQueryTemp);
|
||||
fieldbyname('FileType').value:=Trim('YP');
|
||||
Post;
|
||||
end;
|
||||
except
|
||||
//ADOQueryCmd.Connection.RollbackTrans;
|
||||
//Application.MessageBox('图片上传失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update CP_YDang Set TPFlag=1 where CYID='''+Trim(CYID)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
SaveImageOther();
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('图片上传失败!','提示',0);
|
||||
end;
|
||||
if IdFTP1.Connected then IdFTP1.Quit;
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
open;
|
||||
end;
|
||||
Panel16.Visible:=False;
|
||||
if i>0 then
|
||||
Application.MessageBox(PChar(inttostr(i)+'个文件上传成功!'),'提示',0);
|
||||
ModalResult:=1;
|
||||
end;
|
||||
procedure TfrmFileUp.CreThumb(AJPeg:TJPEGImage;Image1:TImage;Width, Height: Integer);
|
||||
var
|
||||
Bitmap: TBitmap;
|
||||
Ratio: Double;
|
||||
ARect: TRect;
|
||||
AHeight, AHeightOffset: Integer;
|
||||
AWidth, AWidthOffset: Integer;
|
||||
begin
|
||||
Bitmap := TBitmap.Create;
|
||||
try
|
||||
Ratio := AJPeg.Width /AJPeg.Height;
|
||||
if Ratio > 1.333 then
|
||||
begin
|
||||
AHeight := Round(Width / Ratio);
|
||||
AHeightOffset := (Height - AHeight) div 2;
|
||||
AWidth := Width;
|
||||
AWidthOffset := 0;
|
||||
end
|
||||
else
|
||||
begin
|
||||
AWidth := Round(Height * Ratio);
|
||||
AWidthOffset := (Width - AWidth) div 2;
|
||||
AHeight := Height;
|
||||
AHeightOffset := 0;
|
||||
end;
|
||||
Bitmap.Width := Width;
|
||||
Bitmap.Height := Height;
|
||||
Bitmap.Canvas.Brush.Color := clBtnFace;
|
||||
Bitmap.Canvas.FillRect(Rect(0, 0, Width, Height));
|
||||
ARect := Rect(AWidthOffset, AHeightOffset, AWidth + AWidthOffset, AHeight + AHeightOffset);
|
||||
Bitmap.Canvas.StretchDraw(ARect, AJPeg);
|
||||
Image1.Picture.Assign(BitMap);
|
||||
finally
|
||||
Bitmap.Free;
|
||||
end;
|
||||
end;
|
||||
procedure TfrmFileUp.SaveImageOther();
|
||||
var
|
||||
AJpeg: TJPEGImage;
|
||||
myStream: TADOBlobStream;
|
||||
ImgMaxNo:String;
|
||||
i,j: Integer;
|
||||
PatFile: String;
|
||||
FTPPath,FConNo,MaxNo,FTFID:string;
|
||||
begin
|
||||
if Image2.Picture=nil then Exit;
|
||||
AJpeg:=TJpegImage.Create();
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File where WBID='''+Trim(CYID)+'''');
|
||||
Open;
|
||||
end;
|
||||
FTFID:=Trim(ADOQueryTemp.fieldbyname('TFID').AsString);
|
||||
if Trim(FTFID)='' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd,ImgMaxNo,'TF','TP_File',3,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取图片表最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
ImgMaxNo:=Trim(FTFID);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add( ' select * from TP_File where TFID='''+Trim(FTFID)+'''');
|
||||
open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FTFID)='' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value:=Trim(DName);
|
||||
FieldByName('EditTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('TFID').Value:=Trim(ImgMaxNo);
|
||||
FieldByName('WBID').Value:=Trim(CYID);
|
||||
//FieldByName('TFIdx').Value:=cxTabControl2.TabIndex;
|
||||
FieldByName('TFType').Value:='样品';
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
//CreThumb(AJpeg,Image1,160, 120);
|
||||
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
AJpeg.SaveToStream(myStream);
|
||||
myStream.Free;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFileUp.FormCreate(Sender: TObject);
|
||||
begin
|
||||
lstPat := TStringList.Create;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFileUp.FileDelClick(Sender: TObject);
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add(' Delete XD_File where XFID='''+Trim(ADOQueryFile.fieldbyname('XFID').AsString)+'''');
|
||||
SQL.Add(' Delete TP_File where WBID='''+Trim(CYID)+''' and TFType=''样品'' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add(' and FileType=''YP''');
|
||||
open;
|
||||
end;
|
||||
if ADOQueryFile.IsEmpty then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update CP_YDang Set TPFlag=0 where CYID='''+Trim(CYID)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFileUp.FormShow(Sender: TObject);
|
||||
begin
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add(' and FileType=''YP''');
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
309
A01基础公司管理/U_GetDllForm.pas
Normal file
309
A01基础公司管理/U_GetDllForm.pas
Normal file
|
|
@ -0,0 +1,309 @@
|
|||
unit U_GetDllForm;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, forms, OleCtnrs, DateUtils, SysUtils, ADODB, dxCore,
|
||||
ActiveX, IniFiles;
|
||||
|
||||
function GetDllForm(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd; export; stdcall;
|
||||
|
||||
function ConnData(): Boolean;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Customer, U_Factory, U_Company, U_EmployeeList, U_EmployeeBZ,
|
||||
U_SYDept, U_BankList, U_ModulePromptList, U_CYGL, U_JYGL;
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// 功能说明:取Dll中得窗体 //
|
||||
// 参数说明:App>>调用应用程序; //
|
||||
// FormH>>调用窗口句柄 ; //
|
||||
// FormID>>窗口号; //
|
||||
// Language>>语言种类; //
|
||||
// WinStyle>>窗口类型; //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
var
|
||||
frmCustomerYW, frmCustomerGQX: TfrmCustomer;
|
||||
|
||||
function GetDllForm(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd;
|
||||
var
|
||||
i: Integer;
|
||||
bFound: Boolean;
|
||||
mnewHandle: hwnd;
|
||||
mstyle: TFormStyle; // 0:子窗口; 1:普通窗口
|
||||
mstate: TWindowState;
|
||||
mborderstyle: TFormBorderStyle;
|
||||
begin
|
||||
mnewHandle := 0;
|
||||
DName := PChar(GName);
|
||||
DCode := PChar(GCode);
|
||||
DdataBase := DataBase;
|
||||
DTitCaption := Title;
|
||||
DParameters1 := Parameters1;
|
||||
DParameters2 := Parameters2;
|
||||
DParameters3 := Parameters3;
|
||||
DParameters4 := Parameters4;
|
||||
DParameters5 := Parameters5;
|
||||
DParameters6 := Parameters6;
|
||||
DParameters7 := Parameters7;
|
||||
DParameters8 := Parameters8;
|
||||
DParameters9 := Parameters9;
|
||||
DParameters10 := Parameters10;
|
||||
SetLength(fDllFileName, 255);
|
||||
GetModuleFileName(HInstance, PChar(fDllFileName), Length(fDllFileName));
|
||||
fDllFileName := ExtractFileName(PChar(fDllFileName));
|
||||
MainApplication := App;
|
||||
DCurHandle := FormH;
|
||||
IsDelphiLanguage := Language;
|
||||
|
||||
Application := TApplication(App);
|
||||
DCurHandle := 0;
|
||||
|
||||
|
||||
//赋值链接字符串
|
||||
SetLength(server, 255);
|
||||
SetLength(dtbase, 255);
|
||||
SetLength(user, 255);
|
||||
SetLength(pswd, 255);
|
||||
|
||||
if trim(DataBaseStr) = '' then
|
||||
begin
|
||||
server := '8.153.99.238,7781';
|
||||
dtbase := 'hegeData';
|
||||
user := 'rightsoftsa';
|
||||
pswd := 'right,.soft@2377';
|
||||
|
||||
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
||||
// Parameters1 := '录入';
|
||||
Parameters1 := '管理';
|
||||
// DCode := 'L01';
|
||||
DCode := 'ADMIN';
|
||||
DNAME := 'ADMIN';
|
||||
end
|
||||
else
|
||||
begin
|
||||
DConString := DataBaseStr;
|
||||
end;
|
||||
|
||||
if not ConnData() then
|
||||
begin
|
||||
result := 0;
|
||||
exit;
|
||||
end;
|
||||
|
||||
// 定义窗口类型 、状态
|
||||
if WinStyle = 0 then
|
||||
begin
|
||||
mstyle := fsMDIChild;
|
||||
mstate := wsMaximized;
|
||||
mborderstyle := bsSizeable;
|
||||
end
|
||||
else
|
||||
begin
|
||||
mstyle := fsNormal;
|
||||
mstate := wsNormal;
|
||||
mborderstyle := bsSizeable;
|
||||
end;
|
||||
bFound := False;
|
||||
if FormID <> 10000 then
|
||||
begin
|
||||
for i := 0 to Application.MainForm.MDIChildCount - 1 do
|
||||
begin
|
||||
if Application.MainForm.MDIChildren[i].Caption = Title then
|
||||
begin
|
||||
mnewHandle := Application.MainForm.MDIChildren[i].Handle;
|
||||
Application.MainForm.MDIChildren[i].BringToFront;
|
||||
bFound := True;
|
||||
Result := mnewHandle;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
/////////////////////
|
||||
//调用子模块窗口
|
||||
case FormID of
|
||||
100: //提示窗口
|
||||
begin
|
||||
with TfrmModulePromptList.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
|
||||
begin
|
||||
fFormID := FormID;
|
||||
FormStyle := mstyle;
|
||||
WindowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
mnewHandle := Handle;
|
||||
end;
|
||||
end;
|
||||
101: //出运管理
|
||||
begin
|
||||
with Tfrmcygl.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
|
||||
begin
|
||||
fFormID := FormID;
|
||||
FormStyle := mstyle;
|
||||
WindowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
mnewHandle := Handle;
|
||||
end;
|
||||
end;
|
||||
|
||||
102: //寄样管理
|
||||
begin
|
||||
with Tfrmjygl.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
|
||||
begin
|
||||
fFormID := FormID;
|
||||
FormStyle := mstyle;
|
||||
WindowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
mnewHandle := Handle;
|
||||
end;
|
||||
end;
|
||||
|
||||
111: //客户管理
|
||||
begin
|
||||
with TfrmCustomer.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
|
||||
begin
|
||||
fFormID := FormID;
|
||||
FormStyle := mstyle;
|
||||
WindowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
mnewHandle := Handle;
|
||||
end;
|
||||
end;
|
||||
|
||||
121: //供应商管理
|
||||
begin
|
||||
with TfrmFactory.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
|
||||
begin
|
||||
fFormID := FormID;
|
||||
FormStyle := mstyle;
|
||||
WindowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
mnewHandle := Handle;
|
||||
end;
|
||||
end;
|
||||
|
||||
131: //公司管理
|
||||
begin
|
||||
with TfrmCompany.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
|
||||
begin
|
||||
fFormID := FormID;
|
||||
FormStyle := mstyle;
|
||||
WindowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
mnewHandle := Handle;
|
||||
end;
|
||||
end;
|
||||
|
||||
141: //公司账户管理
|
||||
begin
|
||||
with TfrmBankList.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
|
||||
begin
|
||||
fFormID := FormID;
|
||||
FormStyle := mstyle;
|
||||
WindowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
mnewHandle := Handle;
|
||||
end;
|
||||
end;
|
||||
|
||||
211: //组织机构
|
||||
begin
|
||||
with TfrmSYDept.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
|
||||
begin
|
||||
fFormID := FormID;
|
||||
FormStyle := mstyle;
|
||||
WindowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
mnewHandle := Handle;
|
||||
end;
|
||||
end;
|
||||
|
||||
212: //员工档案管理
|
||||
begin
|
||||
with TfrmEmployeeList.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
|
||||
begin
|
||||
fFormID := FormID;
|
||||
FormStyle := mstyle;
|
||||
WindowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
mnewHandle := Handle;
|
||||
end;
|
||||
end;
|
||||
|
||||
213: //员工班组管理
|
||||
begin
|
||||
with TfrmEmployeeBZ.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
|
||||
begin
|
||||
fFormID := FormID;
|
||||
FormStyle := mstyle;
|
||||
WindowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
mnewHandle := Handle;
|
||||
end;
|
||||
end;
|
||||
|
||||
10000:
|
||||
begin
|
||||
for i := 0 to application.MainForm.MDIChildCount - 1 do
|
||||
begin
|
||||
if application.MainForm.MDIChildren[i].Caption = Title then
|
||||
begin
|
||||
application.MainForm.MDIChildren[i].Close;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
Result := mnewHandle;
|
||||
end;
|
||||
//===========================================================
|
||||
//建立数据库连接池
|
||||
//===========================================================
|
||||
|
||||
function ConnData(): Boolean;
|
||||
var
|
||||
IniFile: TIniFile;
|
||||
begin
|
||||
try
|
||||
IniFile := TIniFile.Create(ExtractFilePath(Application.ExeName) + 'SYSTEMSET.INI');
|
||||
PicSvr := IniFile.ReadString('SERVER', '服务器地址', '127.0.0.1');
|
||||
UserDataFlag := IniFile.ReadString('SERVER', '服务器地址类型', '-1');
|
||||
finally
|
||||
IniFile.Free;
|
||||
end;
|
||||
if not Assigned(DataLink_Company) then
|
||||
DataLink_Company := TDataLink_Company.Create(Application);
|
||||
try
|
||||
with DataLink_Company.ADOLink do
|
||||
begin
|
||||
//if not Connected then
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
LoginPrompt := false;
|
||||
Connected := true;
|
||||
end;
|
||||
end;
|
||||
Result := true;
|
||||
except
|
||||
Result := false;
|
||||
application.MessageBox('数据库连接失败!', '错误', mb_Ok + MB_ICONERROR);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
initialization
|
||||
CoInitialize(nil);
|
||||
dxUnitsLoader.Initialize;
|
||||
|
||||
|
||||
finalization
|
||||
DataLink_Company.Free;
|
||||
application := NewDllApp;
|
||||
dxUnitsLoader.Finalize;
|
||||
|
||||
end.
|
||||
|
||||
689
A01基础公司管理/U_JYGL.dfm
Normal file
689
A01基础公司管理/U_JYGL.dfm
Normal file
|
|
@ -0,0 +1,689 @@
|
|||
inherited frmjygl: Tfrmjygl
|
||||
Caption = #23492#26679#31649#29702
|
||||
ClientHeight = 621
|
||||
ClientWidth = 1294
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
ExplicitWidth = 1310
|
||||
ExplicitHeight = 660
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object ToolBar1: TToolBar [0]
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1294
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 91
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_Company.ImageList_new32
|
||||
GradientEndColor = 15717318
|
||||
Images = DataLink_Company.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 1
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 0
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object btnAdd: TToolButton
|
||||
Left = 142
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
ImageIndex = 9
|
||||
OnClick = btnAddClick
|
||||
end
|
||||
object btnEdit: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 3
|
||||
OnClick = btnEditClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 284
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 5
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object btnChk: TToolButton
|
||||
Left = 355
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21457#20986
|
||||
ImageIndex = 12
|
||||
Visible = False
|
||||
end
|
||||
object btnReChk: TToolButton
|
||||
Left = 426
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25764#38144#21457#20986
|
||||
ImageIndex = 11
|
||||
Visible = False
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 521
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #31614#25910
|
||||
ImageIndex = 12
|
||||
Visible = False
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 592
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25764#38144#31614#25910
|
||||
ImageIndex = 11
|
||||
Visible = False
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 687
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 782
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel [1]
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 1294
|
||||
Height = 55
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clWhite
|
||||
ParentBackground = False
|
||||
TabOrder = 1
|
||||
object Label3: TLabel
|
||||
Left = 6
|
||||
Top = 9
|
||||
Width = 48
|
||||
Height = 13
|
||||
Caption = #21019#24314#26085#26399
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 168
|
||||
Top = 10
|
||||
Width = 42
|
||||
Height = 13
|
||||
Caption = #32534' '#21495
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 332
|
||||
Top = 10
|
||||
Width = 80
|
||||
Height = 13
|
||||
Caption = #23458#25143#32534#21495'('#21517#31216')'
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 517
|
||||
Top = 9
|
||||
Width = 48
|
||||
Height = 13
|
||||
Caption = #24555#36882#21333#21495
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 677
|
||||
Top = 9
|
||||
Width = 48
|
||||
Height = 13
|
||||
Caption = #25910#20214#20449#24687
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 837
|
||||
Top = 9
|
||||
Width = 42
|
||||
Height = 13
|
||||
Caption = #22791' '#27880
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 40
|
||||
Top = 31
|
||||
Width = 12
|
||||
Height = 13
|
||||
Caption = #33267
|
||||
end
|
||||
object numbering: TEdit
|
||||
Tag = 2
|
||||
Left = 216
|
||||
Top = 6
|
||||
Width = 90
|
||||
Height = 21
|
||||
TabOrder = 0
|
||||
OnChange = ToolButton4Click
|
||||
end
|
||||
object client: TEdit
|
||||
Tag = 2
|
||||
Left = 414
|
||||
Top = 6
|
||||
Width = 90
|
||||
Height = 21
|
||||
TabOrder = 1
|
||||
OnChange = ToolButton4Click
|
||||
end
|
||||
object KDNumber: TEdit
|
||||
Tag = 2
|
||||
Left = 571
|
||||
Top = 6
|
||||
Width = 90
|
||||
Height = 21
|
||||
TabOrder = 2
|
||||
OnChange = ToolButton4Click
|
||||
end
|
||||
object Edit1: TEdit
|
||||
Tag = 2
|
||||
Left = 731
|
||||
Top = 6
|
||||
Width = 90
|
||||
Height = 21
|
||||
TabOrder = 3
|
||||
end
|
||||
object remark: TEdit
|
||||
Tag = 2
|
||||
Left = 885
|
||||
Top = 6
|
||||
Width = 90
|
||||
Height = 21
|
||||
TabOrder = 4
|
||||
OnChange = ToolButton4Click
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 60
|
||||
Top = 4
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.000000000000000000
|
||||
Time = 0.458268587972270300
|
||||
TabOrder = 5
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 60
|
||||
Top = 29
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.000000000000000000
|
||||
Time = 0.458268587972270300
|
||||
TabOrder = 6
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl [2]
|
||||
Left = 0
|
||||
Top = 93
|
||||
Width = 1294
|
||||
Height = 22
|
||||
Align = alTop
|
||||
Color = clWhite
|
||||
ParentBackground = False
|
||||
ParentColor = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 9
|
||||
Properties.TabIndex = 1
|
||||
Properties.Tabs.Strings = (
|
||||
#22791#26679#20013
|
||||
#24050#21457#20986
|
||||
#24050#31614#25910
|
||||
#20840#37096)
|
||||
ClientRectRight = 0
|
||||
ClientRectTop = 0
|
||||
end
|
||||
object cxGrid1: TcxGrid [3]
|
||||
Left = 0
|
||||
Top = 115
|
||||
Width = 1294
|
||||
Height = 269
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
OnFocusedRecordChanged = Tv1FocusedRecordChanged
|
||||
DataController.DataSource = DS_1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.IncSearch = DataLink_Company.SHuangSe
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Styles.Inactive = DataLink_Company.SHuangSe
|
||||
Styles.Selection = DataLink_Company.SHuangSe
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 34
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'numbering'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #29366#24577
|
||||
DataBinding.FieldName = 'state'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'client'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #23492#26679#26085#26399
|
||||
DataBinding.FieldName = 'JYdate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column6: TcxGridDBColumn
|
||||
Caption = #26381#21153#21830
|
||||
DataBinding.FieldName = 'Service'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column7: TcxGridDBColumn
|
||||
Caption = #24555#36882#21333#21495
|
||||
DataBinding.FieldName = 'KDNumber'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column8: TcxGridDBColumn
|
||||
Caption = #25910#20214#20154
|
||||
DataBinding.FieldName = 'addressee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column9: TcxGridDBColumn
|
||||
Caption = #22269#23478
|
||||
DataBinding.FieldName = 'country'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column10: TcxGridDBColumn
|
||||
Caption = #30005#35805
|
||||
DataBinding.FieldName = 'Phone'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column11: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'remark'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column12: TcxGridDBColumn
|
||||
Caption = #21019#24314#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column13: TcxGridDBColumn
|
||||
Caption = #21019#24314#26102#38388
|
||||
DataBinding.FieldName = 'CJdate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column14: TcxGridDBColumn
|
||||
Caption = #26356#26032#20154
|
||||
DataBinding.FieldName = 'Updater'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column15: TcxGridDBColumn
|
||||
Caption = #26356#26032#26102#38388
|
||||
DataBinding.FieldName = 'GXdate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel [4]
|
||||
Left = 0
|
||||
Top = 384
|
||||
Width = 1294
|
||||
Height = 237
|
||||
Align = alBottom
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clWhite
|
||||
ParentBackground = False
|
||||
TabOrder = 4
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 1290
|
||||
Height = 233
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TV2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DS_2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.IncSearch = DataLink_Company.SHuangSe
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Styles.Inactive = DataLink_Company.SHuangSe
|
||||
Styles.Selection = DataLink_Company.SHuangSe
|
||||
object TV2Column1: TcxGridDBColumn
|
||||
Caption = #24207#21495
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 55
|
||||
end
|
||||
object TV2Column2: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'ProductNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object TV2Column3: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'Productname'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object TV2Column4: TcxGridDBColumn
|
||||
Caption = #35268#26684
|
||||
DataBinding.FieldName = 'specification'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object TV2Column5: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'color'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object TV2Column6: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'Width'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object TV2Column7: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'Gramweight'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object TV2Column8: TcxGridDBColumn
|
||||
Caption = #25104#20998
|
||||
DataBinding.FieldName = 'ingredients'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object TV2Column9: TcxGridDBColumn
|
||||
Caption = #38754#26009
|
||||
DataBinding.FieldName = 'Fabric'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object TV2Column10: TcxGridDBColumn
|
||||
Caption = #23492#26679#25968#37327
|
||||
DataBinding.FieldName = 'JYqty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object TV2Column11: TcxGridDBColumn
|
||||
Caption = #21333#20301
|
||||
DataBinding.FieldName = 'unit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
object TV2Column12: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'price'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_Company.Default
|
||||
Styles.Footer = DataLink_Company.Default
|
||||
Styles.Header = DataLink_Company.Default
|
||||
Width = 65
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = TV2
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Left = 305
|
||||
Top = 208
|
||||
end
|
||||
inherited ADOQueryBaseTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Left = 201
|
||||
Top = 217
|
||||
end
|
||||
object GPM_1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 448
|
||||
Top = 264
|
||||
end
|
||||
object CDS_1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 512
|
||||
Top = 256
|
||||
end
|
||||
object DS_1: TDataSource
|
||||
DataSet = CDS_1
|
||||
Left = 579
|
||||
Top = 267
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 645
|
||||
Top = 449
|
||||
end
|
||||
object CDS_2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 488
|
||||
Top = 432
|
||||
end
|
||||
object DS_2: TDataSource
|
||||
DataSet = CDS_2
|
||||
Left = 555
|
||||
Top = 443
|
||||
end
|
||||
object GPM_2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 424
|
||||
Top = 440
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 429
|
||||
Top = 177
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_Company.ADOLink
|
||||
Parameters = <>
|
||||
Left = 328
|
||||
Top = 272
|
||||
end
|
||||
end
|
||||
350
A01基础公司管理/U_JYGL.pas
Normal file
350
A01基础公司管理/U_JYGL.pas
Normal file
|
|
@ -0,0 +1,350 @@
|
|||
unit U_JYGL;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, ComObj, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
cxNavigator, U_BaseList, dxSkinsCore, dxSkinsDefaultPainters, dxDateRanges,
|
||||
dxBarBuiltInMenu, cxPC;
|
||||
|
||||
type
|
||||
Tfrmjygl = class(TfrmBaseList)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
btnAdd: TToolButton;
|
||||
btnEdit: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
btnChk: TToolButton;
|
||||
btnReChk: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
cxTabControl1: TcxTabControl;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
CDS_1: TClientDataSet;
|
||||
DS_1: TDataSource;
|
||||
Label3: TLabel;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
Label4: TLabel;
|
||||
numbering: TEdit;
|
||||
client: TEdit;
|
||||
KDNumber: TEdit;
|
||||
Label5: TLabel;
|
||||
Edit1: TEdit;
|
||||
Label6: TLabel;
|
||||
remark: TEdit;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
Label7: TLabel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
Tv1Column8: TcxGridDBColumn;
|
||||
Tv1Column9: TcxGridDBColumn;
|
||||
Tv1Column10: TcxGridDBColumn;
|
||||
Tv1Column11: TcxGridDBColumn;
|
||||
Tv1Column12: TcxGridDBColumn;
|
||||
Tv1Column13: TcxGridDBColumn;
|
||||
Tv1Column14: TcxGridDBColumn;
|
||||
Tv1Column15: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
Panel2: TPanel;
|
||||
CDS_2: TClientDataSet;
|
||||
DS_2: TDataSource;
|
||||
GPM_2: TcxGridPopupMenu;
|
||||
cxGrid2: TcxGrid;
|
||||
TV2: TcxGridDBTableView;
|
||||
TV2Column1: TcxGridDBColumn;
|
||||
TV2Column2: TcxGridDBColumn;
|
||||
TV2Column3: TcxGridDBColumn;
|
||||
TV2Column4: TcxGridDBColumn;
|
||||
TV2Column5: TcxGridDBColumn;
|
||||
TV2Column6: TcxGridDBColumn;
|
||||
TV2Column7: TcxGridDBColumn;
|
||||
TV2Column8: TcxGridDBColumn;
|
||||
TV2Column9: TcxGridDBColumn;
|
||||
TV2Column10: TcxGridDBColumn;
|
||||
TV2Column11: TcxGridDBColumn;
|
||||
TV2Column12: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
ADOQueryMain: TADOQuery;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ToolButton4: TToolButton;
|
||||
procedure btnAddClick(Sender: TObject);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure btnEditClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure InitSub();
|
||||
{ Private declarations }
|
||||
public
|
||||
FAuthority: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmjygl: Tfrmjygl;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp, U_JYXX;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure Tfrmjygl.InitSub();
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BS_JYGL_sub A ');
|
||||
sql.Add('where mainid =' + quotedstr((CDS_1.fieldbyname('mainid').AsString)));
|
||||
open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryTemp, CDS_2);
|
||||
SInitCDSData(ADOQueryTemp, CDS_2);
|
||||
TV2.DataController.Filter.Clear;
|
||||
end;
|
||||
|
||||
procedure Tfrmjygl.InitGrid();
|
||||
var
|
||||
WSql: string;
|
||||
begin
|
||||
// WSql := SGetFilters(Panel1, 1, 2);
|
||||
// if trim(WSql) <> '' then
|
||||
// begin
|
||||
// WSql := ' and ' + trim(WSql);
|
||||
// end;
|
||||
//
|
||||
// if IsJYTime.Checked then
|
||||
// begin
|
||||
// WSql := WSql + ' and ConDate>' + quotedstr(FormatDateTime('yyyy-MM-dd', BegDate.DateTime));
|
||||
// WSql := WSql + ' and ConDate<=' + quotedstr(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1));
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
// if trim(WSql) <> '' then
|
||||
// WSql := ' and 1=1' + trim(WSql)
|
||||
// else
|
||||
// WSql := WSql + ' and 1=2 ';
|
||||
// end;
|
||||
// if trim(WSql) = 'and 1=2' then
|
||||
// Application.MessageBox('勾选制单日期或填入搜索条件', '提示', 0);
|
||||
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BS_JYGL_Main');
|
||||
sql.Add('where CJdate >' + quotedstr(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)));
|
||||
sql.Add('and CJdate <=' + quotedstr(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)));
|
||||
// sql.Add('select AA.* ,row_number() over(order by ConDate) as XH from (select A.*');
|
||||
// sql.Add(',ISSC=cast((case when (select COUNT(T.WBID) from FJ_File T where T.WBID=A.ConMID)=0 then 0 else 1 end) as bit )');
|
||||
// sql.Add(',amount=(select sum(C.ConTotalAmount) from BS_Contract_Sub C where C.conmid=A.conmid)');
|
||||
// sql.Add(',Qty=(select sum(C.ConQty) from BS_Contract_Sub C where C.conmid=A.conmid)');
|
||||
// sql.Add(' from BS_Contract_Main A ) AA ');
|
||||
// sql.Add('where 1=1 ' + (WSql));
|
||||
// sql.Add(' and AA.ConType in (''内销'',''外销'') ');
|
||||
// showmessage(sql.text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
TV1.DataController.Filter.Clear;
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure Tfrmjygl.btnAddClick(Sender: TObject);
|
||||
begin
|
||||
// inherited;
|
||||
try
|
||||
frmjyxx := Tfrmjyxx.Create(Application);
|
||||
with frmjyxx do
|
||||
begin
|
||||
// FCOID := '';
|
||||
// fFlileFlag := self.fFlileFlag;
|
||||
PState := '新增';
|
||||
Fmainid := '';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
// InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmjyxx.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure Tfrmjygl.btnEditClick(Sender: TObject);
|
||||
begin
|
||||
// inherited;
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
// ShowMessage(Trim(CDS_1.fieldbyname('Filler').AsString));
|
||||
// ShowMessage(Trim(DName));
|
||||
if Trim(CDS_1.fieldbyname('Filler').AsString) <> Trim(DName) then
|
||||
begin
|
||||
Application.MessageBox('不能操作他人的数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
frmjyxx := Tfrmjyxx.Create(Application);
|
||||
with frmjyxx do
|
||||
begin
|
||||
PState := '修改';
|
||||
Fmainid := Trim(Self.CDS_1.fieldbyname('mainid').AsString);
|
||||
// FAuthority := self.FAuthority;
|
||||
// FGSTT := self.FGSTT;
|
||||
// fFlileFlag := self.fFlileFlag;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmjyxx.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure Tfrmjygl.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
inherited;
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure Tfrmjygl.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
EndDate.DateTime := SGetServerDate(ADOQueryTemp);
|
||||
BegDate.DateTime := EndDate.DateTime - 90;
|
||||
FAuthority := trim(fParameters1);
|
||||
end;
|
||||
|
||||
procedure Tfrmjygl.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmjygl := nil;
|
||||
end;
|
||||
|
||||
procedure Tfrmjygl.FormShow(Sender: TObject);
|
||||
begin
|
||||
// inherited;
|
||||
readCxGrid(trim(Self.Caption) + 'tv1', Tv1, '寄样管理');
|
||||
readCxGrid(trim(Self.Caption) + 'tv2', Tv2, '寄样管理');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure Tfrmjygl.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
// inherited;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure Tfrmjygl.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
// inherited;
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
if not CDS_1.Locate('SSel', True, []) then
|
||||
begin
|
||||
application.MessageBox('请选择数据', '提示');
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if Application.MessageBox('确定要删除数据吗?删除后数据不能恢复。', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
|
||||
with CDS_1 do
|
||||
begin
|
||||
DisableControls;
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
if fieldbyname('SSel').AsBoolean then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
// sql.add('insert into Bs_Contract_Main_DEL select * from BS_Contract_Main where ConMid=''' + trim(CDS_1.fieldbyname('ConMid').AsString) + ''' ');
|
||||
// sql.add('insert into Bs_Contract_sub_DEL select * from BS_Contract_sub where ConMid=''' + trim(CDS_1.fieldbyname('ConMid').AsString) + ''' ');
|
||||
sql.Add('DELETE from BS_JYGL_Main where mainid=''' + trim(CDS_1.fieldbyname('mainid').AsString) + ''' ');
|
||||
sql.Add('DELETE from BS_JYGL_sub where mainid=''' + trim(CDS_1.fieldbyname('mainid').AsString) + ''' ');
|
||||
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
EnableControls;
|
||||
end;
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure Tfrmjygl.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
// inherited;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure Tfrmjygl.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
// inherited;
|
||||
writeCxGrid(trim(Self.Caption) + 'tv1', Tv1, '寄样管理');
|
||||
writeCxGrid(trim(Self.Caption) + 'tv2', Tv2, '寄样管理');
|
||||
end;
|
||||
|
||||
procedure Tfrmjygl.ToolButton4Click(Sender: TObject);
|
||||
begin
|
||||
// inherited;
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
|
||||
procedure Tfrmjygl.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
begin
|
||||
// inherited;
|
||||
InitSub();
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user