1
This commit is contained in:
commit
8a523c2f90
18
.gitignore
vendored
Normal file
18
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
**/layout
|
||||
**/report
|
||||
**/实施文件
|
||||
**/image
|
||||
**/doc
|
||||
**/wav
|
||||
**/__history
|
||||
**/__recovery
|
||||
*.dll
|
||||
*.exe
|
||||
*.ddp
|
||||
*.dcu
|
||||
*.~pas
|
||||
*.~dfm
|
||||
*.~ddp
|
||||
*.~dpr
|
||||
*.zip
|
||||
*.rar
|
||||
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 = 146
|
||||
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.
|
||||
|
||||
4838
A00通用窗体/U_ClothInfoSel.dfm
Normal file
4838
A00通用窗体/U_ClothInfoSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
313
A00通用窗体/U_ClothInfoSel.pas
Normal file
313
A00通用窗体/U_ClothInfoSel.pas
Normal file
|
|
@ -0,0 +1,313 @@
|
|||
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;
|
||||
|
||||
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;
|
||||
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
|
||||
FCTType: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmClothInfoSel: TfrmClothInfoSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmClothInfoSel.InitTree();
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
|
||||
with ADOQueryTree do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from BS_Cloth_Type ');
|
||||
if Trim(FCTType) = '全部' then
|
||||
begin
|
||||
|
||||
end
|
||||
else if FCTType = '坯布' then
|
||||
begin
|
||||
SQL.Add(' where CTType in (''梭织'',''针织'') ');
|
||||
end
|
||||
else
|
||||
begin
|
||||
SQL.Add(' where CTType=' + quotedstr(FCTType));
|
||||
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
|
||||
|
||||
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.
|
||||
|
||||
4563
A00通用窗体/U_CompanySel.dfm
Normal file
4563
A00通用窗体/U_CompanySel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
184
A00通用窗体/U_CompanySel.pas
Normal file
184
A00通用窗体/U_CompanySel.pas
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
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;
|
||||
|
||||
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;
|
||||
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: 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
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* from BS_Company A where 1=1 ');
|
||||
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;
|
||||
|
||||
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.
|
||||
|
||||
4512
A00通用窗体/U_LabelPrint.dfm
Normal file
4512
A00通用窗体/U_LabelPrint.dfm
Normal file
File diff suppressed because it is too large
Load Diff
271
A00通用窗体/U_LabelPrint.pas
Normal file
271
A00通用窗体/U_LabelPrint.pas
Normal file
|
|
@ -0,0 +1,271 @@
|
|||
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)));
|
||||
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.
|
||||
|
||||
61
A02基础产品管理/ClothInfo.dpr
Normal file
61
A02基础产品管理/ClothInfo.dpr
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
library ClothInfo;
|
||||
|
||||
uses
|
||||
SysUtils,
|
||||
classes,
|
||||
forms,
|
||||
WinTypes,
|
||||
WinProcs,
|
||||
midaslib,
|
||||
U_GetDllForm in 'U_GetDllForm.pas',
|
||||
U_DataLink in 'U_DataLink.pas' {DataLink_ClothInfo: TDataModule},
|
||||
U_iniParam in 'U_iniParam.pas',
|
||||
U_BaseHelp in '..\..\..\public10\design\U_BaseHelp.pas' {frmBaseHelp},
|
||||
U_BaseInput in '..\..\..\public10\design\U_BaseInput.pas' {frmBaseInput},
|
||||
U_BaseList in '..\..\..\public10\design\U_BaseList.pas' {frmBaseList},
|
||||
U_cxGridCustomCss in '..\..\..\public10\design\U_cxGridCustomCss.pas',
|
||||
U_globalVar in '..\..\..\public10\design\U_globalVar.pas',
|
||||
U_WindowFormdesign in '..\..\..\public10\design\U_WindowFormdesign.pas',
|
||||
U_CompressionFun in '..\..\..\public10\ThreeFun\Fun\U_CompressionFun.pas',
|
||||
U_RTFun in '..\..\..\public10\ThreeFun\Fun\U_RTFun.pas',
|
||||
U_ZDYHelp in '..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp},
|
||||
U_AttachmentUpload in '..\A00通用窗体\U_AttachmentUpload.pas' {frmFjList_RZ},
|
||||
U_CompanySel in '..\A00通用窗体\U_CompanySel.pas' {frmCompanySel},
|
||||
U_EmployeeSel in '..\A00通用窗体\U_EmployeeSel.pas' {frmEmployeeSel},
|
||||
U_ClothType in 'U_ClothType.pas' {frmClothType},
|
||||
U_CloInfoFileUp in 'U_CloInfoFileUp.pas' {frmCloInfoFileUp},
|
||||
U_TatClothInfo in 'U_TatClothInfo.pas' {frmTatClothInfo},
|
||||
U_LabelMapSet in '..\A00通用窗体\U_LabelMapSet.pas' {frmLabelMapSet},
|
||||
U_LabelPrint in '..\A00通用窗体\U_LabelPrint.pas' {frmLabelPrint},
|
||||
U_KnitClothInfoSel in '..\A00通用窗体\U_KnitClothInfoSel.pas' {frmKnitClothInfoSel},
|
||||
U_TatClothInfoSel in '..\A00通用窗体\U_TatClothInfoSel.pas' {frmTatClothInfoSel},
|
||||
U_ClothInfoSel in '..\A00通用窗体\U_ClothInfoSel.pas' {frmClothInfoSel},
|
||||
U_YarnInfoSel in '..\A00通用窗体\U_YarnInfoSel.pas' {frmYarnInfoSel},
|
||||
U_WBSpecSel in '..\A00通用窗体\U_WBSpecSel.pas' {frmWBSpecSel};
|
||||
|
||||
{$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.
|
||||
|
||||
947
A02基础产品管理/ClothInfo.dproj
Normal file
947
A02基础产品管理/ClothInfo.dproj
Normal file
|
|
@ -0,0 +1,947 @@
|
|||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{7B70AA99-C84C-40AE-B4AE-13C5223B874C}</ProjectGuid>
|
||||
<MainSource>ClothInfo.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>ClothInfo</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>InformationBase_Icon.ico</Icon_MainIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<Icon_MainIcon>InformationBase_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)'!=''">
|
||||
<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>
|
||||
<Debugger_HostApplication>D:\Dp10Repo\项目代码\新宇\A02基础产品管理\testDll.exe</Debugger_HostApplication>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="$(MainSource)">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="U_GetDllForm.pas"/>
|
||||
<DCCReference Include="U_DataLink.pas">
|
||||
<Form>DataLink_ClothInfo</Form>
|
||||
<DesignClass>TDataModule</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="U_iniParam.pas"/>
|
||||
<DCCReference Include="..\..\..\public10\design\U_BaseHelp.pas">
|
||||
<Form>frmBaseHelp</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\..\..\public10\design\U_BaseInput.pas">
|
||||
<Form>frmBaseInput</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\..\..\public10\design\U_BaseList.pas">
|
||||
<Form>frmBaseList</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\..\..\public10\design\U_cxGridCustomCss.pas"/>
|
||||
<DCCReference Include="..\..\..\public10\design\U_globalVar.pas"/>
|
||||
<DCCReference Include="..\..\..\public10\design\U_WindowFormdesign.pas"/>
|
||||
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\U_CompressionFun.pas"/>
|
||||
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\U_RTFun.pas"/>
|
||||
<DCCReference Include="..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas">
|
||||
<Form>frmZDYHelp</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_AttachmentUpload.pas">
|
||||
<Form>frmFjList_RZ</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_CompanySel.pas">
|
||||
<Form>frmCompanySel</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_EmployeeSel.pas">
|
||||
<Form>frmEmployeeSel</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="U_ClothType.pas">
|
||||
<Form>frmClothType</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="U_CloInfoFileUp.pas">
|
||||
<Form>frmCloInfoFileUp</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="U_TatClothInfo.pas">
|
||||
<Form>frmTatClothInfo</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="..\A00通用窗体\U_KnitClothInfoSel.pas">
|
||||
<Form>frmKnitClothInfoSel</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_TatClothInfoSel.pas">
|
||||
<Form>frmTatClothInfoSel</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_ClothInfoSel.pas">
|
||||
<Form>frmClothInfoSel</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_YarnInfoSel.pas">
|
||||
<Form>frmYarnInfoSel</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\A00通用窗体\U_WBSpecSel.pas">
|
||||
<Form>frmWBSpecSel</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<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">ClothInfo.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="ClothInfo.dll" Configuration="Debug" Class="ProjectOutput">
|
||||
<Platform Name="Win32">
|
||||
<RemoteName>ClothInfo.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>
|
||||
130
A02基础产品管理/ClothInfo.dproj.local
Normal file
130
A02基础产品管理/ClothInfo.dproj.local
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<Transactions>
|
||||
<Transaction>1899-12-30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.832,=D:\Dp10Repo\public10\design\U_BaseHelp.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.048,=D:\Dp10Repo\public10\design\U_BaseList.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.135,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelp.pas=</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.873,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.290,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_TatClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.716,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ProcessSel.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.629,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_WBSpecSel.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.743,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.975,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.339,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.518,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.503,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.187,D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas=</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.431,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.pas=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseInput.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.305,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_KnitClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.493,=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.228,=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.086,=D:\Dp10Repo\public10\design\U_cxGridCustomCss.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.736,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ModuleNote.pas=</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.754,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_TatClothInfo.pas=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.290,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_TatClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.217,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.754,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_TatClothInfo.dfm=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.dfm</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.504,=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothType.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.305,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_KnitClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.092,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.431,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.dfm=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo.dfm</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.487,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelpSel.pas=</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.472,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnInfoSel.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.340,=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_CloInfoFileUp.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.806,D:\Dp10Repo\项目代码\RTBasics\A00通用模板\InformationBase.dproj=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\ClothInfo.dproj</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.422,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
||||
</Transactions>
|
||||
<ProjectSortOrder AutoSort="0" SortType="0">
|
||||
<File Path="android-support-v4.dex.jar"/>
|
||||
<File Path="cloud-messaging.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-ads-base.17.2.0.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-ads.17.2.0.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-analytics.16.0.8.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-base.16.0.1.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-basement.16.2.0.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-gass.17.2.0.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-identity.16.0.0.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-maps.16.1.0.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-stats.16.0.1.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-tasks.16.0.1.dex.jar"/>
|
||||
<File Path="com-google-android-gms.play-services-wallet.16.0.1.dex.jar"/>
|
||||
<File Path="com-google-firebase.firebase-analytics.16.4.0.dex.jar"/>
|
||||
<File Path="com-google-firebase.firebase-common.16.1.0.dex.jar"/>
|
||||
<File Path="com-google-firebase.firebase-iid-interop.16.0.1.dex.jar"/>
|
||||
<File Path="com-google-firebase.firebase-iid.17.1.1.dex.jar"/>
|
||||
<File Path="com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar"/>
|
||||
<File Path="com-google-firebase.firebase-messaging.17.5.0.dex.jar"/>
|
||||
<File Path="fmx.dex.jar"/>
|
||||
<File Path="google-play-billing.dex.jar"/>
|
||||
<File Path="google-play-licensing.dex.jar"/>
|
||||
<File Path="..\..\新宇"/>
|
||||
<File Path="..\A00通用窗体"/>
|
||||
<File Path="..\A00通用窗体\U_AttachmentUpload.pas"/>
|
||||
<File Path="..\A00通用窗体\U_AttachmentUpload.dfm"/>
|
||||
<File Path="..\A00通用窗体\U_ClothInfoSel.pas"/>
|
||||
<File Path="..\A00通用窗体\U_ClothInfoSel.dfm"/>
|
||||
<File Path="..\A00通用窗体\U_CompanySel.pas"/>
|
||||
<File Path="..\A00通用窗体\U_CompanySel.dfm"/>
|
||||
<File Path="..\A00通用窗体\U_EmployeeSel.pas"/>
|
||||
<File Path="..\A00通用窗体\U_EmployeeSel.dfm"/>
|
||||
<File Path="..\A00通用窗体\U_KnitClothInfoSel.pas"/>
|
||||
<File Path="..\A00通用窗体\U_KnitClothInfoSel.dfm"/>
|
||||
<File Path="..\A00通用窗体\U_LabelMapSet.pas"/>
|
||||
<File Path="..\A00通用窗体\U_LabelMapSet.dfm"/>
|
||||
<File Path="..\A00通用窗体\U_LabelPrint.pas"/>
|
||||
<File Path="..\A00通用窗体\U_LabelPrint.dfm"/>
|
||||
<File Path="..\A00通用窗体\U_TatClothInfoSel.pas"/>
|
||||
<File Path="..\A00通用窗体\U_TatClothInfoSel.dfm"/>
|
||||
<File Path="..\A00通用窗体\U_WBSpecSel.pas"/>
|
||||
<File Path="..\A00通用窗体\U_WBSpecSel.dfm"/>
|
||||
<File Path="..\A00通用窗体\U_YarnInfoSel.pas"/>
|
||||
<File Path="..\A00通用窗体\U_YarnInfoSel.dfm"/>
|
||||
<File Path="D:\Dp10Repo"/>
|
||||
<File Path="..\..\..\public10"/>
|
||||
<File Path="..\..\..\public10\design"/>
|
||||
<File Path="..\..\..\public10\design\U_BaseHelp.pas"/>
|
||||
<File Path="..\..\..\public10\design\U_BaseHelp.dfm"/>
|
||||
<File Path="..\..\..\public10\design\U_BaseInput.pas"/>
|
||||
<File Path="..\..\..\public10\design\U_BaseInput.dfm"/>
|
||||
<File Path="..\..\..\public10\design\U_BaseList.pas"/>
|
||||
<File Path="..\..\..\public10\design\U_BaseList.dfm"/>
|
||||
<File Path="..\..\..\public10\design\U_cxGridCustomCss.pas"/>
|
||||
<File Path="..\..\..\public10\design\U_globalVar.pas"/>
|
||||
<File Path="..\..\..\public10\design\U_WindowFormdesign.pas"/>
|
||||
<File Path="..\..\..\public10\ThreeFun"/>
|
||||
<File Path="..\..\..\public10\ThreeFun\Form"/>
|
||||
<File Path="..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas"/>
|
||||
<File Path="..\..\..\public10\ThreeFun\Form\U_ZDYHelp.dfm"/>
|
||||
<File Path="..\..\..\public10\ThreeFun\Fun"/>
|
||||
<File Path="..\..\..\public10\ThreeFun\Fun\U_CompressionFun.pas"/>
|
||||
<File Path="..\..\..\public10\ThreeFun\Fun\U_RTFun.pas"/>
|
||||
<File Path="U_DataLink.pas"/>
|
||||
<File Path="U_DataLink.dfm"/>
|
||||
<File Path="U_GetDllForm.pas"/>
|
||||
<File Path="U_iniParam.pas"/>
|
||||
<File Path="U_ClothType.pas"/>
|
||||
<File Path="U_ClothType.dfm"/>
|
||||
<File Path="U_CloInfoFileUp.pas"/>
|
||||
<File Path="U_CloInfoFileUp.dfm"/>
|
||||
<File Path="U_TatClothInfo.pas"/>
|
||||
<File Path="U_TatClothInfo.dfm"/>
|
||||
</ProjectSortOrder>
|
||||
</BorlandProject>
|
||||
BIN
A02基础产品管理/ClothInfo.identcache
Normal file
BIN
A02基础产品管理/ClothInfo.identcache
Normal file
Binary file not shown.
BIN
A02基础产品管理/ClothInfo.res
Normal file
BIN
A02基础产品管理/ClothInfo.res
Normal file
Binary file not shown.
4
A02基础产品管理/File.INI
Normal file
4
A02基础产品管理/File.INI
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[生产车间配置]
|
||||
卷条码机台标志=99
|
||||
成品DLL文件=CYZZ.dll
|
||||
成品DLL调用号=11
|
||||
7
A02基础产品管理/FileHelp.ini
Normal file
7
A02基础产品管理/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
|
||||
BIN
A02基础产品管理/InformationBase_Icon.ico
Normal file
BIN
A02基础产品管理/InformationBase_Icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 766 B |
23
A02基础产品管理/ProjectGroup1.bpg
Normal file
23
A02基础产品管理/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
A02基础产品管理/ProjectGroup1.groupproj
Normal file
48
A02基础产品管理/ProjectGroup1.groupproj
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{D75EC075-444C-40C2-8ACB-0AAD801B39FF}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Projects Include="ClothInfo.dproj">
|
||||
<Dependencies/>
|
||||
</Projects>
|
||||
<Projects Include="testDll.dproj">
|
||||
<Dependencies/>
|
||||
</Projects>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Default.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType/>
|
||||
<BorlandProject>
|
||||
<Default.Personality/>
|
||||
</BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Target Name="ClothInfo">
|
||||
<MSBuild Projects="ClothInfo.dproj"/>
|
||||
</Target>
|
||||
<Target Name="ClothInfo:Clean">
|
||||
<MSBuild Projects="ClothInfo.dproj" Targets="Clean"/>
|
||||
</Target>
|
||||
<Target Name="ClothInfo:Make">
|
||||
<MSBuild Projects="ClothInfo.dproj" Targets="Make"/>
|
||||
</Target>
|
||||
<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="Build">
|
||||
<CallTarget Targets="ClothInfo;testDll"/>
|
||||
</Target>
|
||||
<Target Name="Clean">
|
||||
<CallTarget Targets="ClothInfo:Clean;testDll:Clean"/>
|
||||
</Target>
|
||||
<Target Name="Make">
|
||||
<CallTarget Targets="ClothInfo:Make;testDll:Make"/>
|
||||
</Target>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
|
||||
</Project>
|
||||
7
A02基础产品管理/ProjectGroup1.groupproj.local
Normal file
7
A02基础产品管理/ProjectGroup1.groupproj.local
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<Transactions/>
|
||||
<Default.Personality>
|
||||
<Projects ActiveProject="D:\Dp10Repo\项目代码\新宇\A02基础产品管理\ClothInfo.dproj"/>
|
||||
</Default.Personality>
|
||||
</BorlandProject>
|
||||
8
A02基础产品管理/SYSTEMSET.ini
Normal file
8
A02基础产品管理/SYSTEMSET.ini
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[SERVER]
|
||||
服务器地址=101.132.143.144
|
||||
服务器地址类型=541
|
||||
是否自动更新=1
|
||||
软件名称=星瑞贸易管理软件
|
||||
登陆标题=sss
|
||||
[窗口设置]
|
||||
字体大小=9
|
||||
8
A02基础产品管理/SYSTEMSETB.ini
Normal file
8
A02基础产品管理/SYSTEMSETB.ini
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[SERVER]
|
||||
服务器地址=101.132.143.144
|
||||
服务器地址类型=2002
|
||||
是否自动更新=1
|
||||
软件名称=睿特版本库
|
||||
登陆标题=sss
|
||||
[窗口设置]
|
||||
字体大小=9
|
||||
264
A02基础产品管理/U_CloInfoFileUp.dfm
Normal file
264
A02基础产品管理/U_CloInfoFileUp.dfm
Normal file
|
|
@ -0,0 +1,264 @@
|
|||
object frmCloInfoFileUp: TfrmCloInfoFileUp
|
||||
Left = 612
|
||||
Top = 236
|
||||
Caption = #19978#20256#25991#20214
|
||||
ClientHeight = 595
|
||||
ClientWidth = 929
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poMainFormCenter
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object cxGrid7: TcxGrid
|
||||
Left = 0
|
||||
Top = 41
|
||||
Width = 858
|
||||
Height = 554
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TV7: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
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 TV7Column1: TcxGridDBColumn
|
||||
Caption = #33457#22411#21517#31216
|
||||
DataBinding.FieldName = 'HXName'
|
||||
GroupSummaryAlignment = taCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 91
|
||||
end
|
||||
object FileDate: TcxGridDBColumn
|
||||
Tag = 1
|
||||
Caption = #19978#20256#26085#26399
|
||||
DataBinding.FieldName = 'TFDate'
|
||||
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 = 858
|
||||
Top = 41
|
||||
Width = 71
|
||||
Height = 554
|
||||
Align = alRight
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 75
|
||||
Caption = 'ToolBar1'
|
||||
Images = DataLink_ClothInfo.ImageList_new32
|
||||
List = True
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
object FileUp: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #19978#20256
|
||||
ImageIndex = 2
|
||||
Wrap = True
|
||||
OnClick = FileUpClick
|
||||
end
|
||||
object FileDel: TToolButton
|
||||
Left = 0
|
||||
Top = 38
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 5
|
||||
Wrap = True
|
||||
OnClick = FileDelClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 929
|
||||
Height = 41
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 3
|
||||
object Label1: TLabel
|
||||
Left = 8
|
||||
Top = 14
|
||||
Width = 72
|
||||
Height = 17
|
||||
Caption = #20135#21697#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -17
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Image2: TImage
|
||||
Left = 773
|
||||
Top = 7
|
||||
Width = 60
|
||||
Height = 28
|
||||
Visible = False
|
||||
end
|
||||
object Image1: TImage
|
||||
Left = 861
|
||||
Top = 6
|
||||
Width = 60
|
||||
Height = 28
|
||||
Visible = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 336
|
||||
Top = 14
|
||||
Width = 36
|
||||
Height = 17
|
||||
Caption = #33457#22411
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -17
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Code: TEdit
|
||||
Left = 78
|
||||
Top = 10
|
||||
Width = 211
|
||||
Height = 25
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -17
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
object HXName: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 378
|
||||
Top = 8
|
||||
Width = 168
|
||||
Height = 29
|
||||
Hint = 'CYKZ/'#20811#37325
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -20
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
OnBtnUpClick = HXNameBtnUpClick
|
||||
OnBtnDnClick = HXNameBtnDnClick
|
||||
end
|
||||
end
|
||||
object ODPat: TOpenDialog
|
||||
Filter =
|
||||
'All (*.svg;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.j' +
|
||||
'peg;*.png;*.bmp;*.ico;*.emf;*.wmf;*.tif;*.tiff)|*.svg;*.jpg;*.jp' +
|
||||
'eg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.jpeg;*.png;*.bmp;*.ico' +
|
||||
';*.emf;*.wmf;*.tif;*.tiff|SVG graphics from DevExpress (*.svg)|*' +
|
||||
'.svg|JPEG graphics from DevExpress (*.jpg)|*.jpg|JPEG graphics f' +
|
||||
'rom DevExpress (*.jpeg)|*.jpeg|GIF graphics from DevExpress (*.g' +
|
||||
'if)|*.gif|TIFF graphics from DevExpress (*.tif)|*.tif|TIFF graph' +
|
||||
'ics from DevExpress (*.tiff)|*.tiff|PNG graphics from DevExpress' +
|
||||
' (*.png)|*.png|GIF Image (*.gif)|*.gif|JPEG Image File (*.jpg)|*' +
|
||||
'.jpg|JPEG Image File (*.jpeg)|*.jpeg|Portable Network Graphics (' +
|
||||
'*.png)|*.png|Bitmaps (*.bmp)|*.bmp|Icons (*.ico)|*.ico|Enhanced ' +
|
||||
'Metafiles (*.emf)|*.emf|Metafiles (*.wmf)|*.wmf|TIFF Images (*.t' +
|
||||
'if)|*.tif|TIFF Images (*.tiff)|*.tiff'
|
||||
Options = [ofHideReadOnly, ofAllowMultiSelect, ofEnableSizing]
|
||||
Left = 380
|
||||
Top = 333
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
ConnectTimeout = 0
|
||||
NATKeepAlive.UseKeepAlive = False
|
||||
NATKeepAlive.IdleTimeMS = 0
|
||||
NATKeepAlive.IntervalMS = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
ReadTimeout = 0
|
||||
Left = 261
|
||||
Top = 244
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
Filter =
|
||||
'All (*.svg;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.j' +
|
||||
'peg;*.png;*.bmp;*.ico;*.emf;*.wmf;*.tif;*.tiff)|*.svg;*.jpg;*.jp' +
|
||||
'eg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.jpeg;*.png;*.bmp;*.ico' +
|
||||
';*.emf;*.wmf;*.tif;*.tiff|SVG graphics from DevExpress (*.svg)|*' +
|
||||
'.svg|JPEG graphics from DevExpress (*.jpg)|*.jpg|JPEG graphics f' +
|
||||
'rom DevExpress (*.jpeg)|*.jpeg|GIF graphics from DevExpress (*.g' +
|
||||
'if)|*.gif|TIFF graphics from DevExpress (*.tif)|*.tif|TIFF graph' +
|
||||
'ics from DevExpress (*.tiff)|*.tiff|PNG graphics from DevExpress' +
|
||||
' (*.png)|*.png|GIF Image (*.gif)|*.gif|JPEG Image File (*.jpg)|*' +
|
||||
'.jpg|JPEG Image File (*.jpeg)|*.jpeg|Portable Network Graphics (' +
|
||||
'*.png)|*.png|Bitmaps (*.bmp)|*.bmp|Icons (*.ico)|*.ico|Enhanced ' +
|
||||
'Metafiles (*.emf)|*.emf|Metafiles (*.wmf)|*.wmf|TIFF Images (*.t' +
|
||||
'if)|*.tif|TIFF Images (*.tiff)|*.tiff'
|
||||
Left = 305
|
||||
Top = 333
|
||||
end
|
||||
object ADOQueryFile: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 488
|
||||
Top = 144
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ADOQueryFile
|
||||
Left = 376
|
||||
Top = 136
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Parameters = <>
|
||||
Left = 584
|
||||
Top = 256
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 432
|
||||
Top = 224
|
||||
end
|
||||
end
|
||||
370
A02基础产品管理/U_CloInfoFileUp.pas
Normal file
370
A02基础产品管理/U_CloInfoFileUp.pas
Normal file
|
|
@ -0,0 +1,370 @@
|
|||
unit U_CloInfoFileUp;
|
||||
|
||||
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,
|
||||
strutils, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
|
||||
dxSkinsDefaultPainters, dxDateRanges, IdExplicitTLSClientServerBase,
|
||||
Vcl.ExtDlgs;
|
||||
|
||||
type
|
||||
TfrmCloInfoFileUp = 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;
|
||||
Image1: TImage;
|
||||
TV7Column1: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
HXName: TBtnEditC;
|
||||
procedure FileUpClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FileDelClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure HXNameBtnUpClick(Sender: TObject);
|
||||
procedure HXNameBtnDnClick(Sender: TObject);
|
||||
private
|
||||
lstPat: TStringList;
|
||||
AJpeg: TJPEGImage;
|
||||
procedure CreThumb(Image1, Image2: TImage; Width, Height: Integer);
|
||||
procedure SaveImageOther(FTFID: string);
|
||||
procedure ReadINIFile10();
|
||||
procedure InitTP();
|
||||
{ Private declarations }
|
||||
public
|
||||
FBCIID: string;
|
||||
FWidth, FHeight:Integer
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmCloInfoFileUp: TfrmCloInfoFileUp;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp;
|
||||
|
||||
{$R *.dfm} procedure TfrmCloInfoFileUp.InitTP();
|
||||
begin
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName,HXName from TP_File where WBID=''' + Trim(FBCIID) + '''');
|
||||
SQL.Add(' and FileType=''YP''');
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCloInfoFileUp.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 TfrmCloInfoFileUp.FileUpClick(Sender: TObject);
|
||||
var
|
||||
i, j: Integer;
|
||||
PatFile: string;
|
||||
FTPPath, FConNo, MaxNo: string;
|
||||
AJpeg: TJPEGImage;
|
||||
myStream: TADOBlobStream;
|
||||
begin
|
||||
if Trim(Code.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('编号不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(HXName.Text) = '' then
|
||||
begin
|
||||
if Application.MessageBox('花型确认为空吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
end;
|
||||
|
||||
lstPat.Clear;
|
||||
if ODPat.Execute then
|
||||
begin
|
||||
lstPat.AddStrings(ODPat.Files);
|
||||
end;
|
||||
if lstPat.Count > 0 then
|
||||
begin
|
||||
try
|
||||
IdFTP1.Host := PicSvr;
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
IdFTP1.Quit;
|
||||
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
Panel16.Visible := True;
|
||||
Panel16.Refresh;
|
||||
|
||||
try
|
||||
AJpeg := TJpegImage.Create();
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
for i := 0 to lstPat.Count - 1 do
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select isnull(max(abs(cast(right(left(FileName,charindex(''.'',FileName)-1),2) as int))),0)+1 as BH from TP_File');
|
||||
sql.Add('where FileType =''YP'' and WBID=''' + trim(FBCIID) + ''' ');
|
||||
open;
|
||||
end;
|
||||
PatFile := trim(FBCIID) + '-' + inttostr(ADOQueryTemp.fieldbyname('BH').AsInteger) + '.' + Copy(ExtractFileName(lstPat[i]), (Pos('.', ExtractFileName(lstPat[i])) + 1), (Length(ExtractFileName(lstPat[i])) - Pos('.', ExtractFileName(lstPat[i]))));
|
||||
image1.Picture.LoadFromFile((lstPat[i]));
|
||||
CreThumb(Image1, Image2, FWidth, FHeight);
|
||||
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
try
|
||||
IdFTP1.Put(lstPat[i], Trim(UserDataFlag + 'YP' + '\' + Trim(PatFile)));
|
||||
|
||||
if GetLSNo(ADOQueryCmd, MaxNo, 'YP', 'XD_File', 4, 1) = False then
|
||||
raise Exception.Create('取图片最大号失败!');
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' select * from TP_File where TFID=''' + Trim(MaxNo) + '''');
|
||||
open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if ADOQueryCmd.IsEmpty then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
FieldByName('TFDate').Value := SGetServerDateTime(ADOQueryTemp);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value := Trim(DName);
|
||||
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('TFID').Value := Trim(MaxNo);
|
||||
FieldByName('WBID').Value := Trim(FBCIID);
|
||||
FieldByName('TFType').Value := '样品';
|
||||
FieldByName('FileType').Value := 'YP';
|
||||
FieldByName('HXName').Value := trim(HXName.Text);
|
||||
FieldByName('filename').Value := Trim(PatFile);
|
||||
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
AJpeg.SaveToStream(myStream);
|
||||
myStream.Free;
|
||||
Post;
|
||||
end;
|
||||
except
|
||||
raise Exception.Create('上传图片失败!');
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
AJpeg.Free;
|
||||
except
|
||||
AJpeg.Free;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('图片上传失败!', '提示', 0);
|
||||
end;
|
||||
if IdFTP1.Connected then
|
||||
IdFTP1.Quit;
|
||||
InitTP();
|
||||
Panel16.Visible := False;
|
||||
if i > 0 then
|
||||
Application.MessageBox(PChar(inttostr(i) + '个文件上传成功!'), '提示', 0);
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmCloInfoFileUp.CreThumb(Image1, Image2: TImage; 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 > 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, Image1.Picture.Graphic);
|
||||
Image2.Picture.Assign(Bitmap);
|
||||
finally
|
||||
Bitmap.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCloInfoFileUp.SaveImageOther(FTFID: string);
|
||||
var
|
||||
AJpeg: TJPEGImage;
|
||||
myStream: TADOBlobStream;
|
||||
ImgMaxNo: string;
|
||||
i, j: Integer;
|
||||
PatFile: string;
|
||||
FConNo, MaxNo: string;
|
||||
begin
|
||||
if Image2.Picture = nil then
|
||||
Exit;
|
||||
AJpeg := TJpegImage.Create();
|
||||
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(FTFID);
|
||||
FieldByName('WBID').Value := Trim(FBCIID);
|
||||
FieldByName('TFType').Value := '样品';
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
AJpeg.SaveToStream(myStream);
|
||||
myStream.Free;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCloInfoFileUp.FormCreate(Sender: TObject);
|
||||
begin
|
||||
lstPat := TStringList.Create;
|
||||
if FWidth = 0 then
|
||||
FWidth := 160;
|
||||
if FHeight = 0 then
|
||||
FHeight := 120;
|
||||
end;
|
||||
|
||||
procedure TfrmCloInfoFileUp.FileDelClick(Sender: TObject);
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add(' Delete TP_File where TFID=''' + Trim(ADOQueryFile.fieldbyname('XFID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
// with ADOQueryFile do
|
||||
// begin
|
||||
// Close;
|
||||
// SQL.Clear;
|
||||
// SQL.Add('select * from XD_File where FBCIID=''' + Trim(FBCIID) + '''');
|
||||
// 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 FBCIID=''' + Trim(FBCIID) + '''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end;
|
||||
end;
|
||||
|
||||
procedure TfrmCloInfoFileUp.FormShow(Sender: TObject);
|
||||
begin
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName from TP_File where WBID=''' + Trim(FBCIID) + '''');
|
||||
SQL.Add(' and FileType=''YP''');
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCloInfoFileUp.HXNameBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
TBtnEditC(Sender).TxtCode := '';
|
||||
end;
|
||||
|
||||
procedure TfrmCloInfoFileUp.HXNameBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'HX' + Trim(Code.Text);
|
||||
flagname := '花型';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
923
A02基础产品管理/U_ClothInfo.dfm
Normal file
923
A02基础产品管理/U_ClothInfo.dfm
Normal file
|
|
@ -0,0 +1,923 @@
|
|||
inherited frmClothInfo: TfrmClothInfo
|
||||
Left = 117
|
||||
Top = 154
|
||||
Caption = #20135#21697#26723#26696
|
||||
ClientHeight = 702
|
||||
ClientWidth = 1444
|
||||
FormStyle = fsMDIChild
|
||||
Position = poScreenCenter
|
||||
Visible = True
|
||||
ExplicitWidth = 1460
|
||||
ExplicitHeight = 741
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar [0]
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1444
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 91
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_ClothInfo.ImageList_new32
|
||||
Images = DataLink_ClothInfo.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 TBFilter: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 0
|
||||
OnClick = TBFilterClick
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 142
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
ImageIndex = 9
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
ImageIndex = 4
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBCopy: TToolButton
|
||||
Left = 284
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22797#21046
|
||||
ImageIndex = 13
|
||||
OnClick = TBCopyClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 355
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 3
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object TBMLEdit: TToolButton
|
||||
Left = 426
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #30446#24405#20462#25913
|
||||
ImageIndex = 3
|
||||
OnClick = TBMLEditClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 521
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 5
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 592
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26631#31614#25171#21360
|
||||
ImageIndex = 21
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 687
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 20
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBUP: TToolButton
|
||||
Left = 758
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22270#29255#19978#20256
|
||||
ImageIndex = 19
|
||||
OnClick = TBUPClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 853
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 948
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxSplitter1: TcxSplitter [1]
|
||||
Left = 220
|
||||
Top = 83
|
||||
Width = 8
|
||||
Height = 619
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
Control = Panel5
|
||||
end
|
||||
object Panel1: TPanel [2]
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 1444
|
||||
Height = 45
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = 16242829
|
||||
ParentBackground = False
|
||||
TabOrder = 1
|
||||
object Label3: TLabel
|
||||
Left = 42
|
||||
Top = 15
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 1072
|
||||
Top = 107
|
||||
Width = 7
|
||||
Height = 12
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 1120
|
||||
Top = 111
|
||||
Width = 7
|
||||
Height = 12
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 199
|
||||
Top = 15
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20135#21697#21517#31216
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 509
|
||||
Top = 15
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #20811#37325
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 357
|
||||
Top = 15
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #38376#24133
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 91
|
||||
Top = 11
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnKeyPress = C_CodeKeyPress
|
||||
end
|
||||
object C_Name: TEdit
|
||||
Tag = 2
|
||||
Left = 248
|
||||
Top = 11
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnKeyPress = C_CodeKeyPress
|
||||
end
|
||||
object C_GramWeight: TEdit
|
||||
Tag = 2
|
||||
Left = 536
|
||||
Top = 11
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnKeyPress = C_CodeKeyPress
|
||||
end
|
||||
object C_Width: TEdit
|
||||
Tag = 2
|
||||
Left = 384
|
||||
Top = 11
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnKeyPress = C_CodeKeyPress
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel [3]
|
||||
Left = 512
|
||||
Top = 232
|
||||
Width = 185
|
||||
Height = 41
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
Visible = False
|
||||
end
|
||||
object Panel5: TPanel [4]
|
||||
Left = 0
|
||||
Top = 83
|
||||
Width = 220
|
||||
Height = 619
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
object cxDBTreeList1: TcxDBTreeList
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 216
|
||||
Height = 615
|
||||
Align = alClient
|
||||
Bands = <
|
||||
item
|
||||
end>
|
||||
DataController.DataSource = DS_Tree
|
||||
DataController.ParentField = 'CTParent'
|
||||
DataController.KeyField = 'CTID'
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OptionsBehavior.CopyCaptionsToClipboard = False
|
||||
OptionsBehavior.ExpandOnDblClick = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.CellAutoHeight = True
|
||||
OptionsView.Headers = False
|
||||
RootValue = -1
|
||||
Styles.Inactive = DataLink_ClothInfo.Red
|
||||
Styles.Selection = DataLink_ClothInfo.Red
|
||||
Styles.IncSearch = DataLink_ClothInfo.Red
|
||||
TabOrder = 0
|
||||
OnDblClick = cxDBTreeList1DblClick
|
||||
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||
DataBinding.FieldName = 'CTName'
|
||||
Width = 210
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
Position.BandIndex = 0
|
||||
Summary.FooterSummaryItems = <>
|
||||
Summary.GroupFooterSummaryItems = <>
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel3: TPanel [5]
|
||||
Left = 228
|
||||
Top = 83
|
||||
Width = 1216
|
||||
Height = 619
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 4
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 42
|
||||
Width = 982
|
||||
Height = 370
|
||||
Align = alClient
|
||||
PopupMenu = PM_1
|
||||
TabOrder = 0
|
||||
ExplicitWidth = 1212
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
OnFocusedRecordChanged = Tv1FocusedRecordChanged
|
||||
DataController.DataSource = DS_1
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.IncSearch = DataLink_ClothInfo.SHuangSe
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Styles.Inactive = DataLink_ClothInfo.SHuangSe
|
||||
Styles.Selection = DataLink_ClothInfo.SHuangSe
|
||||
object v1SSel: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 41
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #31867#21035
|
||||
DataBinding.FieldName = 'CTName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 70
|
||||
end
|
||||
object v1CYNo: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'C_Code'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 92
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'C_Name'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 96
|
||||
end
|
||||
object Tv1Column11: TcxGridDBColumn
|
||||
Caption = #33521#25991#21697#21517
|
||||
DataBinding.FieldName = 'C_EName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #22383#24067#32534#21495
|
||||
DataBinding.FieldName = 'C_FromCode'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 85
|
||||
end
|
||||
object Tv1Column8: TcxGridDBColumn
|
||||
Caption = #22383#24067#21517#31216
|
||||
DataBinding.FieldName = 'C_FromName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #25104#20998
|
||||
DataBinding.FieldName = 'C_Composition'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #33457#22411
|
||||
DataBinding.FieldName = 'C_Pattern'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 58
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #22270#29255
|
||||
DataBinding.FieldName = 'IsImg'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 57
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #22635#21333#20154
|
||||
DataBinding.FieldName = 'filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 71
|
||||
end
|
||||
object Tv1Column6: TcxGridDBColumn
|
||||
Caption = #20462#25913#20154
|
||||
DataBinding.FieldName = 'editer'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object Tv1Column7: TcxGridDBColumn
|
||||
Caption = #20462#25913#26102#38388
|
||||
DataBinding.FieldName = 'edittime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object Tv1Column9: TcxGridDBColumn
|
||||
Caption = #24405#20837#26102#38388
|
||||
DataBinding.FieldName = 'FILLTIME'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel7: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 1212
|
||||
Height = 40
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 1
|
||||
object Panel4: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1212
|
||||
Height = 40
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
TabOrder = 0
|
||||
DesignSize = (
|
||||
1212
|
||||
40)
|
||||
object Label14: TLabel
|
||||
Left = 19
|
||||
Top = 13
|
||||
Width = 84
|
||||
Height = 13
|
||||
Alignment = taCenter
|
||||
Anchors = [akLeft]
|
||||
Caption = #27599#39029#35760#24405#26465#25968
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Layout = tlCenter
|
||||
end
|
||||
object LBCPAP1: TLabel
|
||||
Left = 276
|
||||
Top = 9
|
||||
Width = 85
|
||||
Height = 21
|
||||
Alignment = taCenter
|
||||
Anchors = [akLeft]
|
||||
AutoSize = False
|
||||
Caption = #24403#21069#39029'/'#24635#39029#25968
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Layout = tlCenter
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 195
|
||||
Top = 8
|
||||
Width = 75
|
||||
Height = 23
|
||||
Anchors = [akLeft]
|
||||
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 = 367
|
||||
Top = 9
|
||||
Width = 78
|
||||
Height = 22
|
||||
Anchors = [akLeft]
|
||||
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
|
||||
object TCBNOR1: TComboBox
|
||||
Tag = 2
|
||||
Left = 111
|
||||
Top = 10
|
||||
Width = 78
|
||||
Height = 20
|
||||
Anchors = [akLeft]
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ItemIndex = 2
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Text = '500'
|
||||
OnChange = TCBNOR1Change
|
||||
Items.Strings = (
|
||||
'100'
|
||||
'300'
|
||||
'500'
|
||||
'1000'
|
||||
'5000'
|
||||
'10000')
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel9: TPanel
|
||||
Left = 2
|
||||
Top = 412
|
||||
Width = 1212
|
||||
Height = 205
|
||||
Align = alBottom
|
||||
Caption = 'Panel9'
|
||||
TabOrder = 2
|
||||
object Panel10: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 1210
|
||||
Height = 203
|
||||
Align = alClient
|
||||
Caption = 'Panel9'
|
||||
TabOrder = 0
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 1
|
||||
Top = 42
|
||||
Width = 1208
|
||||
Height = 160
|
||||
Align = alClient
|
||||
Caption = #26679#21697#32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
|
||||
TabOrder = 0
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 2
|
||||
Top = 14
|
||||
Width = 1204
|
||||
Height = 144
|
||||
Align = alClient
|
||||
BevelInner = bvLowered
|
||||
BorderStyle = bsNone
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object Panel11: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 1208
|
||||
Height = 41
|
||||
Align = alTop
|
||||
TabOrder = 1
|
||||
DesignSize = (
|
||||
1208
|
||||
41)
|
||||
object Label7: TLabel
|
||||
Left = 33
|
||||
Top = 8
|
||||
Width = 88
|
||||
Height = 21
|
||||
Caption = #33457#22411#36873#25321
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object cbbHX: TComboBox
|
||||
Left = 368
|
||||
Top = 3
|
||||
Width = 210
|
||||
Height = 32
|
||||
Style = csDropDownList
|
||||
Anchors = []
|
||||
Color = clWhite
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -24
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
OnChange = cbbHXChange
|
||||
Items.Strings = (
|
||||
#33457#22411)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 984
|
||||
Top = 42
|
||||
Width = 230
|
||||
Height = 370
|
||||
Align = alRight
|
||||
BorderStyle = cxcbsNone
|
||||
TabOrder = 3
|
||||
object TV2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DS_2
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_ClothInfo.Default
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Styles.Selection = DataLink_ClothInfo.SHuangSe
|
||||
object TV2Column1: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'ssel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 50
|
||||
end
|
||||
object v1XHNo: TcxGridDBColumn
|
||||
Caption = #24207#21495
|
||||
DataBinding.FieldName = 'SerialNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
SortIndex = 0
|
||||
SortOrder = soAscending
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 53
|
||||
end
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #23610#30721
|
||||
DataBinding.FieldName = 'FtyType'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 121
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = TV2
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Left = 161
|
||||
Top = 240
|
||||
end
|
||||
inherited ADOQueryBaseTemp: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Left = 57
|
||||
Top = 241
|
||||
end
|
||||
object DS_Tree: TDataSource
|
||||
DataSet = CDS_Tree
|
||||
Left = 155
|
||||
Top = 131
|
||||
end
|
||||
object ADOQueryTree: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 53
|
||||
Top = 137
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 899
|
||||
Top = 192
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Parameters = <>
|
||||
Left = 997
|
||||
Top = 197
|
||||
end
|
||||
object GPM_1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 360
|
||||
end
|
||||
object DS_1: TDataSource
|
||||
DataSet = CDS_1
|
||||
Left = 1043
|
||||
Top = 395
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1061
|
||||
Top = 201
|
||||
end
|
||||
object CDS_1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 960
|
||||
Top = 408
|
||||
end
|
||||
object RM1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [rmpbZoom, rmpbLoad, rmpbSave, rmpbPrint, rmpbFind, rmpbPageSetup, rmpbExit, rmpbExport, rmpbNavigator]
|
||||
DefaultCollate = False
|
||||
ShowPrintDialog = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
Dataset = RMDB_Main
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 312
|
||||
Top = 216
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDB_Main: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = ADOQueryPrint
|
||||
Left = 952
|
||||
Top = 296
|
||||
end
|
||||
object ODPat: TOpenDialog
|
||||
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||
Left = 324
|
||||
Top = 285
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
ConnectTimeout = 0
|
||||
NATKeepAlive.UseKeepAlive = False
|
||||
NATKeepAlive.IdleTimeMS = 0
|
||||
NATKeepAlive.IntervalMS = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
ReadTimeout = 0
|
||||
Left = 381
|
||||
Top = 380
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
Left = 385
|
||||
Top = 285
|
||||
end
|
||||
object DSCYNO: TDataSource
|
||||
DataSet = CDS_CYNO
|
||||
Left = 499
|
||||
Top = 299
|
||||
end
|
||||
object CDS_CYNO: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 496
|
||||
Top = 240
|
||||
end
|
||||
object adoqueryPicture: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Parameters = <>
|
||||
Left = 299
|
||||
Top = 360
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
Left = 458
|
||||
Top = 354
|
||||
end
|
||||
object PM_1: TPopupMenu
|
||||
Left = 1160
|
||||
Top = 352
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
object N3: TMenuItem
|
||||
Caption = #22797#21046
|
||||
OnClick = N3Click
|
||||
end
|
||||
end
|
||||
object RMBarCodeObject1: TRMBarCodeObject
|
||||
Left = 1052
|
||||
Top = 296
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = CDS_Sub
|
||||
Left = 1019
|
||||
Top = 627
|
||||
end
|
||||
object CDS_Sub: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 1024
|
||||
Top = 688
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 928
|
||||
Top = 688
|
||||
end
|
||||
object CDS_Tree: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 96
|
||||
Top = 136
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 875
|
||||
Top = 296
|
||||
end
|
||||
object CDS_Label: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 520
|
||||
Top = 426
|
||||
end
|
||||
object CDS_2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 1280
|
||||
Top = 312
|
||||
end
|
||||
object DS_2: TDataSource
|
||||
DataSet = CDS_2
|
||||
Left = 1363
|
||||
Top = 299
|
||||
end
|
||||
object ADOQuerySub: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1181
|
||||
Top = 233
|
||||
end
|
||||
end
|
||||
863
A02基础产品管理/U_ClothInfo.pas
Normal file
863
A02基础产品管理/U_ClothInfo.pas
Normal file
|
|
@ -0,0 +1,863 @@
|
|||
unit U_ClothInfo;
|
||||
|
||||
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, jpeg, U_SLT, ComObj, Menus,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxTLdxBarBuiltInMenu, cxNavigator,
|
||||
dxBarBuiltInMenu, cxPC, Math, RM_BarCode, dxSkinsCore, dxSkinsDefaultPainters,
|
||||
dxDateRanges, IdExplicitTLSClientServerBase, U_BaseList, cxContainer,
|
||||
dxDBBarCode, dxBarCode, Vcl.Clipbrd, cxTextEdit, BtnEdit, StrUtils,
|
||||
cxButtonEdit;
|
||||
|
||||
type
|
||||
FdDy = record
|
||||
inc: integer; //客户端套接字句柄
|
||||
FDdys: string[32]; //客户端套接字
|
||||
FdDysName: string[32]; //客户端套接字
|
||||
end;
|
||||
|
||||
TfrmClothInfo = class(TfrmBaseList)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
DS_Tree: TDataSource;
|
||||
ADOQueryTree: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
cxSplitter1: TcxSplitter;
|
||||
Panel1: TPanel;
|
||||
TBFilter: TToolButton;
|
||||
v1CYNo: TcxGridDBColumn;
|
||||
DS_1: TDataSource;
|
||||
ADOQueryMain: TADOQuery;
|
||||
CDS_1: TClientDataSet;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
TBExport: TToolButton;
|
||||
RM1: TRMGridReport;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
ODPat: TOpenDialog;
|
||||
IdFTP1: TIdFTP;
|
||||
SaveDialog1: TSaveDialog;
|
||||
TBUP: TToolButton;
|
||||
Label3: TLabel;
|
||||
C_Code: TEdit;
|
||||
TBCopy: TToolButton;
|
||||
Panel2: TPanel;
|
||||
v1SSel: TcxGridDBColumn;
|
||||
DSCYNO: TDataSource;
|
||||
CDS_CYNO: TClientDataSet;
|
||||
Panel5: TPanel;
|
||||
cxDBTreeList1: TcxDBTreeList;
|
||||
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||
Label11: TLabel;
|
||||
Label12: TLabel;
|
||||
Panel3: TPanel;
|
||||
adoqueryPicture: TADOQuery;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
Label4: TLabel;
|
||||
C_Name: TEdit;
|
||||
TBAdd: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
TBMLEdit: TToolButton;
|
||||
OpenDialog1: TOpenDialog;
|
||||
Label9: TLabel;
|
||||
C_GramWeight: TEdit;
|
||||
Label8: TLabel;
|
||||
C_Width: TEdit;
|
||||
PM_1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
Panel7: TPanel;
|
||||
Panel4: TPanel;
|
||||
Label14: TLabel;
|
||||
LBCPAP1: TLabel;
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
TCBNOR1: TComboBox;
|
||||
RMBarCodeObject1: TRMBarCodeObject;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
DataSource3: TDataSource;
|
||||
CDS_Sub: TClientDataSet;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column9: TcxGridDBColumn;
|
||||
Tv1Column11: TcxGridDBColumn;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
ToolButton2: TToolButton;
|
||||
N3: TMenuItem;
|
||||
Panel9: TPanel;
|
||||
Panel10: TPanel;
|
||||
GroupBox1: TGroupBox;
|
||||
ScrollBox1: TScrollBox;
|
||||
Panel11: TPanel;
|
||||
cbbHX: TComboBox;
|
||||
Label7: TLabel;
|
||||
CDS_Tree: TClientDataSet;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
CDS_Label: TClientDataSet;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
ToolButton3: TToolButton;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column8: TcxGridDBColumn;
|
||||
cxGrid2: TcxGrid;
|
||||
TV2: TcxGridDBTableView;
|
||||
v1XHNo: TcxGridDBColumn;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
CDS_2: TClientDataSet;
|
||||
DS_2: TDataSource;
|
||||
ADOQuerySub: TADOQuery;
|
||||
TV2Column1: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure cxDBTreeList1DblClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBFilterClick(Sender: TObject);
|
||||
procedure CYNoChange(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBUPClick(Sender: TObject);
|
||||
procedure TBCopyClick(Sender: TObject);
|
||||
procedure C_CodeKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure TBMLEditClick(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure TCBNOR1Change(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure N3Click(Sender: TObject);
|
||||
procedure TextEdit(Sender: TObject);
|
||||
procedure HXNameBtnUpClick(Sender: TObject);
|
||||
procedure HXNameBtnDnClick(Sender: TObject);
|
||||
procedure cbbHXChange(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
CurrentPage, RecordsNumber: Integer;
|
||||
CTID: string;
|
||||
PState: Integer;
|
||||
FCTID, FTopID, FJurisdiction, FCTType: string;
|
||||
|
||||
procedure SetStatus();
|
||||
procedure InitTree();
|
||||
procedure InitGrid();
|
||||
procedure InitSub();
|
||||
procedure ReadINIFile();
|
||||
procedure InitImage();
|
||||
procedure LookImage(FileName: string);
|
||||
|
||||
public
|
||||
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Mach: array of TfrmSlt;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ClothInfoInput, U_CloInfoFileUp, U_ClothTypeSel,
|
||||
U_ZDYHelp, U_LabelPrint;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmClothInfo.LookImage(FileName: string);
|
||||
var
|
||||
sFieldName: string;
|
||||
begin
|
||||
|
||||
sFieldName := leftbstr(ExtractFilePath(Application.ExeName), 1) + ':\图片查看';
|
||||
|
||||
if not DirectoryExists(pchar(sFieldName)) then
|
||||
CreateDirectory(pchar(sFieldName), nil);
|
||||
|
||||
sFieldName := sFieldName + '\' + trim(FileName);
|
||||
|
||||
try
|
||||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI', 'SERVER', '服务器地址', '127.0.0.1');
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
|
||||
end;
|
||||
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
application.ProcessMessages;
|
||||
try
|
||||
// ShowMessage(PChar(Trim('D:\' + Trim(FileName))));
|
||||
IdFTP1.Get(Trim(UserDataFlag + 'YP\' + FileName), sFieldName, true, false);
|
||||
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;
|
||||
ShellExecute(Handle, 'open', PChar(sFieldName), '', '', SW_SHOWNORMAL);
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.SetStatus();
|
||||
begin
|
||||
TBAdd.Enabled := False;
|
||||
TBCopy.Enabled := False;
|
||||
TBEdit.Enabled := False;
|
||||
TBMLEdit.Enabled := False;
|
||||
TBDel.Enabled := False;
|
||||
TBUP.Enabled := False;
|
||||
if FJurisdiction <> '查询' then
|
||||
begin
|
||||
TBAdd.Enabled := true;
|
||||
TBCopy.Enabled := true;
|
||||
TBEdit.Enabled := true;
|
||||
TBMLEdit.Enabled := true;
|
||||
TBDel.Enabled := true;
|
||||
TBUP.Enabled := true;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.InitTree();
|
||||
begin
|
||||
with ADOQueryTree do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from BS_Cloth_Type where CTType=' + quotedstr(FCTType));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryTree, CDS_Tree);
|
||||
SInitCDSData(ADOQueryTree, CDS_Tree);
|
||||
cxDBTreeList1.Items[0].Expand(false);
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.InitGrid();
|
||||
var
|
||||
fwhere, MBCIID, Pwhere: string;
|
||||
begin
|
||||
Panel2.Visible := True;
|
||||
Panel2.Refresh;
|
||||
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;
|
||||
Panel2.Visible := False;
|
||||
|
||||
if MBCIID <> '' then
|
||||
CDS_1.Locate('BCIID', MBCIID, []);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.InitSub();
|
||||
begin
|
||||
with ADOQuerySub do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from Bs_Cloth_Process ');
|
||||
sql.Add(' where BCIID=''' + Trim(CDS_1.fieldbyname('BCIID').AsString) + '''');
|
||||
sql.Add(' order by SerialNo ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQuerySub, CDS_2);
|
||||
SInitCDSData(ADOQuerySub, CDS_2);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
var
|
||||
i, j: integer;
|
||||
begin
|
||||
inherited;
|
||||
j := length(Mach);
|
||||
if j > 0 then
|
||||
begin
|
||||
for i := 0 to j - 1 do
|
||||
begin
|
||||
Mach[i].free;
|
||||
end;
|
||||
end;
|
||||
SetLength(Mach, 0);
|
||||
Action := cafree;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FJurisdiction := Trim(Self.fParameters1);
|
||||
FCTType := Trim(self.fParameters2);
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
if DirectoryExists(ExtractFileDir('D:\Right1209')) then
|
||||
winexec('cmd /c rd /s /q D:\Right1209', sw_hide);
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.TBDelClick(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
|
||||
if Trim(CDS_1.fieldbyname('BCIID').AsString) <> '' then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('delete BS_Cloth_Info where BCIID=''' + Trim(CDS_1.fieldbyname('BCIID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
CDS_1.Delete;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
ReadCxGrid(self.Caption + 'TV1', Tv1, '样品管理');
|
||||
|
||||
// pnlreport.Top := FTop + 110;
|
||||
application.ProcessMessages;
|
||||
|
||||
RecordsNumber := 500;
|
||||
CurrentPage := 1;
|
||||
InitTree();
|
||||
SetStatus();
|
||||
InitGrid();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.cbbHXChange(Sender: TObject);
|
||||
begin
|
||||
InitImage();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.cxDBTreeList1DblClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitTree();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.TBFilterClick(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 TfrmClothInfo.CYNoChange(Sender: TObject);
|
||||
begin
|
||||
//if Length(Trim(TEdit(Sender).Text))<4 then Exit;
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
TcxGridToExcel(self.Caption, cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.TBUPClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmCloInfoFileUp := TfrmCloInfoFileUp.Create(Application);
|
||||
with frmCloInfoFileUp do
|
||||
begin
|
||||
Code.Text := Trim(Self.CDS_1.fieldbyname('C_Code').AsString);
|
||||
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
// Self.CDS_1.Locate('BCIID', BCIID, []);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCloInfoFileUp.Free;
|
||||
end;
|
||||
InitImage();
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.ReadINIFile();
|
||||
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 TfrmClothInfo.InitImage();
|
||||
var
|
||||
i, j: integer;
|
||||
jpg: TJpegImage;
|
||||
myStream: TADOBlobStream;
|
||||
begin
|
||||
|
||||
j := length(Mach);
|
||||
if j > 0 then
|
||||
begin
|
||||
for i := 0 to j - 1 do
|
||||
begin
|
||||
Mach[i].free;
|
||||
end;
|
||||
end;
|
||||
SetLength(Mach, 0);
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
try
|
||||
with adoqueryPicture do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.TFID,A.WBID,A.FilesOther,A.FileName from TP_File A ');
|
||||
sql.add('where A.WBID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString)));
|
||||
if Trim(cbbHX.Text) <> '' then
|
||||
sql.add(' and A.HXName=' + quotedstr(trim(cbbHX.Text)));
|
||||
|
||||
open;
|
||||
end;
|
||||
j := adoqueryPicture.RecordCount;
|
||||
if j < 1 then
|
||||
exit;
|
||||
adoqueryPicture.DisableControls;
|
||||
adoqueryPicture.First;
|
||||
SetLength(Mach, j);
|
||||
jpg := TJpegImage.Create();
|
||||
for i := 0 to j - 1 do
|
||||
begin
|
||||
if triM(adoqueryPicture.fieldbyname('FilesOther').AsString) <> '' then
|
||||
begin
|
||||
myStream := tadoblobstream.Create(tblobfield(adoqueryPicture.fieldbyname('FilesOther')), bmread);
|
||||
jpg.LoadFromStream(myStream);
|
||||
Mach[i] := TfrmSlt.Create(Self);
|
||||
Mach[i].Name := trim(adoqueryPicture.fieldbyname('TFID').AsString);
|
||||
Mach[i].Parent := ScrollBox1;
|
||||
Mach[i].Left := 0 + i * 165;
|
||||
Mach[i].Init(adoqueryPicture.fieldbyname('TFID').AsString, adoqueryPicture.fieldbyname('FileName').AsString, jpg);
|
||||
end;
|
||||
adoqueryPicture.Next;
|
||||
end;
|
||||
adoqueryPicture.EnableControls;
|
||||
finally
|
||||
jpg.free;
|
||||
application.ProcessMessages;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.TBCopyClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmClothInfoInput := TfrmClothInfoInput.Create(Application);
|
||||
with frmClothInfoInput do
|
||||
begin
|
||||
CopyInt := 1;
|
||||
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
|
||||
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
|
||||
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmClothInfoInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.C_CodeKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
CurrentPage := 1;
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.TBAddClick(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
FieldName: string;
|
||||
begin
|
||||
try
|
||||
frmClothInfoInput := TfrmClothInfoInput.Create(Application);
|
||||
with frmClothInfoInput do
|
||||
begin
|
||||
CopyInt := 0;
|
||||
FBCIID := '';
|
||||
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
|
||||
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmClothInfoInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmClothInfoInput := TfrmClothInfoInput.Create(Application);
|
||||
with frmClothInfoInput do
|
||||
begin
|
||||
CopyInt := 0;
|
||||
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
|
||||
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmClothInfoInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.TextEdit(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
begin
|
||||
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
with CDS_1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value := mvalue;
|
||||
Post;
|
||||
|
||||
end;
|
||||
if mvalue = '' then
|
||||
mvalue := '0';
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('update BS_Cloth_Info set ' + FFieldName + '=' + (Trim(mvalue)));
|
||||
sql.Add('where BCIID=' + quotedstr(Trim(CDS_1.fieldbyname('BCIID').AsString)));
|
||||
ExecSQL;
|
||||
end;
|
||||
Tv1.Controller.EditingController.ShowEdit();
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
fsj := 'select DISTINCT HXNAME name from TP_File where ISNULL(HXNAME,'''')<>'''' AND WBID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString));
|
||||
|
||||
SInitComBoxBySql(ADOQueryTemp, cbbHX, True, fsj);
|
||||
initsub();
|
||||
InitImage();
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.TBMLEditClick(Sender: TObject);
|
||||
var
|
||||
MCTID: string;
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
if CDS_1.Locate('ssel', true, []) = false then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
MCTID := '';
|
||||
try
|
||||
frmClothTypeSel := TfrmClothTypeSel.create(self);
|
||||
with frmClothTypeSel do
|
||||
begin
|
||||
FCTType := Self.FCTType;
|
||||
if showmodal = 1 then
|
||||
begin
|
||||
MCTID := trim(ADOQueryHelp.fieldbyname('CTID').asstring);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmClothTypeSel.free;
|
||||
end;
|
||||
|
||||
if trim(MCTID) <> '' then
|
||||
begin
|
||||
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_Cloth_Info SET CTID=''' + trim(MCTID) + ''' ');
|
||||
sql.Add('where BCIID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
First;
|
||||
EnableControls;
|
||||
end;
|
||||
application.MessageBox('操作成功!', '提示信息');
|
||||
initGrid();
|
||||
except
|
||||
CDS_1.EnableControls;
|
||||
application.MessageBox('操作失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNoFiler(Tv1, True);
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNoFiler(Tv1, False);
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.N3Click(Sender: TObject);
|
||||
begin
|
||||
Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString)));
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.TCBNOR1Change(Sender: TObject);
|
||||
begin
|
||||
RecordsNumber := StrToInt(TCBNOR1.Text);
|
||||
CurrentPage := 1;
|
||||
C_Code.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.HXNameBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
TBtnEditC(Sender).TxtCode := '';
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.HXNameBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'HX' + Trim(Self.CDS_1.fieldbyname('CYNO').AsString);
|
||||
flagname := '花型';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.Button1Click(Sender: TObject);
|
||||
begin
|
||||
if CurrentPage > 1 then
|
||||
CurrentPage := CurrentPage - 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.Button2Click(Sender: TObject);
|
||||
begin
|
||||
if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then
|
||||
CurrentPage := CurrentPage + 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmClothInfoInput := TfrmClothInfoInput.Create(Application);
|
||||
with frmClothInfoInput do
|
||||
begin
|
||||
CopyInt := 0;
|
||||
ToolButton1.Visible := False;
|
||||
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
|
||||
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmClothInfoInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(self.Caption + 'TV1', Tv1, '样品管理');
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.ToolButton3Click(Sender: TObject);
|
||||
var
|
||||
WSql: string;
|
||||
begin
|
||||
if CDS_2.IsEmpty then
|
||||
Exit;
|
||||
Tv1.OnFocusedRecordChanged := nil;
|
||||
if CDS_2.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Tv1.OnFocusedRecordChanged := Tv1FocusedRecordChanged;
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
WSql := '';
|
||||
CDS_2.DisableControls;
|
||||
|
||||
with CDS_2 do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if CDS_2.fieldbyname('SSel').AsBoolean then
|
||||
begin
|
||||
if WSql <> '' then
|
||||
begin
|
||||
WSql := WSql + ',' + QuotedStr(Trim(CDS_2.fieldbyname('BCPID').AsString));
|
||||
end
|
||||
else
|
||||
begin
|
||||
WSql := QuotedStr(Trim(CDS_2.fieldbyname('BCPID').AsString));
|
||||
end;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
CDS_2.Locate('SSel', True, []);
|
||||
Tv1.OnFocusedRecordChanged := Tv1FocusedRecordChanged;
|
||||
CDS_2.EnableControls;
|
||||
|
||||
try
|
||||
frmLabelPrint := TfrmLabelPrint.Create(Application);
|
||||
with frmLabelPrint do
|
||||
begin
|
||||
FLMType := 'ClothInfoPrint';
|
||||
FFiltration1 := WSql;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
// Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmLabelPrint.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
465
A02基础产品管理/U_ClothInfoInput.dfm
Normal file
465
A02基础产品管理/U_ClothInfoInput.dfm
Normal file
|
|
@ -0,0 +1,465 @@
|
|||
object frmClothInfoInput: TfrmClothInfoInput
|
||||
Left = 459
|
||||
Top = 231
|
||||
Anchors = []
|
||||
Caption = #20135#21697#20449#24687#24405#20837
|
||||
ClientHeight = 512
|
||||
ClientWidth = 735
|
||||
Color = clWhite
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = True
|
||||
Position = poScreenCenter
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 735
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 75
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_ClothInfo.ImageList_new32
|
||||
Images = DataLink_ClothInfo.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton1: TToolButton
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton6: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #38468#20214
|
||||
ImageIndex = 22
|
||||
OnClick = ToolButton6Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 142
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 735
|
||||
Height = 115
|
||||
Align = alTop
|
||||
BevelInner = bvNone
|
||||
BevelOuter = bvNone
|
||||
Color = clWhite
|
||||
Ctl3D = False
|
||||
ParentColor = False
|
||||
ParentCtl3D = False
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 31
|
||||
Top = 9
|
||||
Width = 65
|
||||
Height = 12
|
||||
AutoSize = False
|
||||
Caption = #20135#21697#32534#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 362
|
||||
Top = 9
|
||||
Width = 65
|
||||
Height = 12
|
||||
AutoSize = False
|
||||
Caption = #20135#21697#21517#31216#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 29
|
||||
Top = 34
|
||||
Width = 67
|
||||
Height = 12
|
||||
AutoSize = False
|
||||
Caption = #39068' '#33394#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 360
|
||||
Top = 34
|
||||
Width = 67
|
||||
Height = 12
|
||||
AutoSize = False
|
||||
Caption = #33457' '#22411#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 52
|
||||
Top = 158
|
||||
Width = 51
|
||||
Height = 16
|
||||
Caption = #26465#30721#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 360
|
||||
Top = 59
|
||||
Width = 67
|
||||
Height = 12
|
||||
AutoSize = False
|
||||
Caption = #25104' '#20998#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 31
|
||||
Top = 59
|
||||
Width = 65
|
||||
Height = 12
|
||||
AutoSize = False
|
||||
Caption = #33521#25991#21697#21517#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 29
|
||||
Top = 85
|
||||
Width = 67
|
||||
Height = 12
|
||||
AutoSize = False
|
||||
Caption = #35268' '#26684#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 6
|
||||
Width = 234
|
||||
Height = 18
|
||||
AutoSize = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
OnKeyPress = CYColorKeyPress
|
||||
end
|
||||
object C_Name: TEdit
|
||||
Tag = 2
|
||||
Left = 426
|
||||
Top = 6
|
||||
Width = 234
|
||||
Height = 18
|
||||
AutoSize = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
OnKeyPress = CYColorKeyPress
|
||||
end
|
||||
object C_Color: TEdit
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 31
|
||||
Width = 234
|
||||
Height = 18
|
||||
AutoSize = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
end
|
||||
object C_Pattern: TEdit
|
||||
Tag = 2
|
||||
Left = 426
|
||||
Top = 31
|
||||
Width = 234
|
||||
Height = 18
|
||||
AutoSize = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 4
|
||||
end
|
||||
object C_Composition: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 426
|
||||
Top = 55
|
||||
Width = 234
|
||||
Height = 20
|
||||
Hint = 'C_Composition/'#25104#20998
|
||||
AutoSize = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
OnBtnUpClick = C_WidthBtnUpClick
|
||||
OnBtnDnClick = C_WidthBtnDnClick
|
||||
end
|
||||
object C_EName: TEdit
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 56
|
||||
Width = 234
|
||||
Height = 18
|
||||
AutoSize = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
OnKeyPress = CYColorKeyPress
|
||||
end
|
||||
object BCIID: TEdit
|
||||
Left = 109
|
||||
Top = 149
|
||||
Width = 218
|
||||
Height = 22
|
||||
Enabled = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 6
|
||||
Visible = False
|
||||
end
|
||||
object C_Spec: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 81
|
||||
Width = 234
|
||||
Height = 20
|
||||
Hint = 'C_Spec/'#35268#26684
|
||||
AutoSize = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 7
|
||||
OnBtnUpClick = C_WidthBtnUpClick
|
||||
OnBtnDnClick = C_WidthBtnDnClick
|
||||
end
|
||||
end
|
||||
object ToolBar2: TToolBar
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 153
|
||||
Width = 735
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 75
|
||||
Caption = 'ToolBar1'
|
||||
Color = clBtnFace
|
||||
DisabledImages = DataLink_ClothInfo.ImageList_new32
|
||||
EdgeInner = esNone
|
||||
EdgeOuter = esNone
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_ClothInfo.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
ExplicitTop = 177
|
||||
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 cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 191
|
||||
Width = 735
|
||||
Height = 321
|
||||
Align = alClient
|
||||
BorderStyle = cxcbsNone
|
||||
TabOrder = 3
|
||||
ExplicitTop = 197
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DS_1
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_ClothInfo.Default
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Styles.Selection = DataLink_ClothInfo.SHuangSe
|
||||
object v1XHNo: TcxGridDBColumn
|
||||
Caption = #24207#21495
|
||||
DataBinding.FieldName = 'SerialNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
SortIndex = 0
|
||||
SortOrder = soAscending
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 55
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #23610#30721
|
||||
DataBinding.FieldName = 'FtyType'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.OnButtonClick = Tv1Column1PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 121
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Parameters = <>
|
||||
Left = 505
|
||||
Top = 9
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 613
|
||||
Top = 17
|
||||
end
|
||||
object CDS_1: TClientDataSet
|
||||
Aggregates = <>
|
||||
IndexFieldNames = 'SerialNo'
|
||||
Params = <>
|
||||
Left = 331
|
||||
Top = 356
|
||||
end
|
||||
object DS_1: TDataSource
|
||||
DataSet = CDS_1
|
||||
Left = 395
|
||||
Top = 356
|
||||
end
|
||||
object GPM_1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 280
|
||||
Top = 356
|
||||
end
|
||||
end
|
||||
498
A02基础产品管理/U_ClothInfoInput.pas
Normal file
498
A02基础产品管理/U_ClothInfoInput.pas
Normal file
|
|
@ -0,0 +1,498 @@
|
|||
unit U_ClothInfoInput;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ADODB, DBClient, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGrid, ComCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, cxTextEdit,
|
||||
cxButtonEdit, StdCtrls, ExtCtrls, cxCurrencyEdit, BtnEdit, U_BaseList,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters,
|
||||
cxNavigator, dxDateRanges, dxBarBuiltInMenu, cxCheckBox, cxDropDownEdit;
|
||||
|
||||
type
|
||||
TfrmClothInfoInput = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
ToolButton1: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ScrollBox1: TScrollBox;
|
||||
Label1: TLabel;
|
||||
Label5: TLabel;
|
||||
Label2: TLabel;
|
||||
Label4: TLabel;
|
||||
Label3: TLabel;
|
||||
C_Code: TEdit;
|
||||
C_Name: TEdit;
|
||||
C_Color: TEdit;
|
||||
C_Pattern: TEdit;
|
||||
Label7: TLabel;
|
||||
C_Composition: TBtnEditC;
|
||||
Label12: TLabel;
|
||||
C_EName: TEdit;
|
||||
ToolButton6: TToolButton;
|
||||
BCIID: TEdit;
|
||||
Label6: TLabel;
|
||||
C_Spec: TBtnEditC;
|
||||
ToolBar2: TToolBar;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1XHNo: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
CDS_1: TClientDataSet;
|
||||
DS_1: TDataSource;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure CYColorKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure CYJGGYBtnDnClick(Sender: TObject);
|
||||
procedure C_WidthBtnDnClick(Sender: TObject);
|
||||
procedure C_WidthBtnUpClick(Sender: TObject);
|
||||
procedure ToolButton6Click(Sender: TObject);
|
||||
procedure C_FromNameBtnUpClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure SetXH();
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure Tv1Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
private
|
||||
canshu1: string;
|
||||
Fint: Integer;
|
||||
procedure InitGrid();
|
||||
function SaveData(): Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
FBCIID, FCTID: string;
|
||||
CopyInt: Integer;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmClothInfoInput: TfrmClothInfoInput;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_iniParam, U_ZDYHelp, U_AttachmentUpload, U_ClothInfoSel;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmClothInfoInput.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('SerialNo').Value := FieldByName('XHNoTemp').AsInteger;
|
||||
Post;
|
||||
end;
|
||||
i := i + 1;
|
||||
Next;
|
||||
end;
|
||||
CDS_1.IndexFieldNames := 'SerialNo';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.InitGrid();
|
||||
begin
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from V_BS_Cloth_Info where BCIID=''' + Trim(FBCIID) + '''');
|
||||
Open;
|
||||
end;
|
||||
|
||||
SCSHData(ADOQueryTemp, ScrollBox1, 2);
|
||||
SCSHData(ADOQueryTemp, ScrollBox1, 0);
|
||||
// C_FromName.TxtCode := Trim(ADOQueryTemp.fieldbyname('FromBCIID').AsString);
|
||||
// C_FromName.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName').AsString);
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from Bs_Cloth_Process ');
|
||||
sql.Add(' where BCIID=''' + Trim(FBCIID) + '''');
|
||||
sql.Add(' order by SerialNo ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryTemp, CDS_1);
|
||||
SInitCDSData(ADOQueryTemp, CDS_1);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
if CopyInt = 1 then
|
||||
begin
|
||||
FBCIID := '';
|
||||
BCIID.text := '';
|
||||
C_Code.text := '';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
function TfrmClothInfoInput.SaveData(): Boolean;
|
||||
var
|
||||
MaxBCIID, MaxBCPID: string;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
//////////////// 保存主表 //////////////////////
|
||||
if Trim(FBCIID) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd, MaxBCIID, 'Y', 'BS_Cloth_Info', 4, 1) = False then
|
||||
begin
|
||||
Result := False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
BCIID.Text := trim(MaxBCIID);
|
||||
end
|
||||
else
|
||||
begin
|
||||
MaxBCIID := Trim(FBCIID);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BS_Cloth_Info where BCIID=''' + Trim(FBCIID) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FBCIID) = '' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('CTID').Value := Trim(FCTID);
|
||||
FieldByName('FILLID').Value := Trim(DCode);
|
||||
FieldByName('FILLER').Value := Trim(DName);
|
||||
FieldByName('FILLTIME').Value := SGetServerDateTime(ADOQueryTemp);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('EDITER').Value := Trim(DName);
|
||||
FieldByName('EDITTIME').Value := SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('BCIID').Value := Trim(MaxBCIID);
|
||||
if trim(C_Code.Text) = '' then
|
||||
C_Code.Text := Trim(MaxBCIID);
|
||||
RTSetsavedata(ADOQueryCmd, 'BS_Cloth_Info', ScrollBox1, 2);
|
||||
Post;
|
||||
end;
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// SQL.Clear;
|
||||
// sql.Add('delete BS_Cloth_Info_Link where ToID=''' + Trim(MaxBCIID) + '''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
//
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// SQL.Clear;
|
||||
// sql.Add('select * from BS_Cloth_Info_Link where 1=2');
|
||||
// Open;
|
||||
// end;
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Append;
|
||||
// FieldByName('ToID').Value := Trim(MaxBCIID);
|
||||
//// FieldByName('FromID').Value := Trim(C_FromName.TxtCode);
|
||||
// Post;
|
||||
// end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select count(*) as AA from BS_Cloth_Info where C_Code=''' + Trim(C_Code.Text) + '''');
|
||||
Open;
|
||||
if FieldByName('AA').AsInteger > 1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result := False;
|
||||
Application.MessageBox('编号重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
//////////////// 保存主表 //////////////////////
|
||||
///
|
||||
//////////////// 保存子表 //////////////////////
|
||||
with CDS_1 do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Trim(CDS_1.fieldbyname('BCPID').AsString) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd, MaxBCPID, 'P', 'Bs_Cloth_Process', 4, 1) = False then
|
||||
begin
|
||||
Result := False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
MaxBCPID := Trim(CDS_1.fieldbyname('BCPID').AsString);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from Bs_Cloth_Process where BCPID=''' + Trim(MaxBCPID) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if ADOQueryCmd.IsEmpty then
|
||||
Append
|
||||
else
|
||||
Edit;
|
||||
RTSetSaveDataCDS(ADOQueryCmd, Tv1, CDS_1, 'Bs_Cloth_Process', 0);
|
||||
FieldByName('BCPID').Value := Trim(MaxBCPID);
|
||||
FieldByName('BCIID').Value := Trim(MaxBCIID);
|
||||
|
||||
Post;
|
||||
end;
|
||||
with CDS_1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('BCPID').Value := Trim(MaxBCPID);
|
||||
Post;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
//////////////// 保存子表 //////////////////////
|
||||
///
|
||||
///
|
||||
///
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
FBCIID := MaxBCIID;
|
||||
Result := True;
|
||||
except
|
||||
Result := False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.CYJGGYBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
MC_Code: string;
|
||||
begin
|
||||
if C_Name.Text = '' then
|
||||
begin
|
||||
Application.MessageBox('产品名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if trim(C_Code.Text) = '' then
|
||||
begin
|
||||
|
||||
if GetLSNo(ADOQueryCmd, MC_Code, 'C', 'BS_Cloth_Info', 4, 0) = False then
|
||||
begin
|
||||
Application.MessageBox('取最成品编号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
C_Code.Text := MC_Code;
|
||||
|
||||
end;
|
||||
SetXH();
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
ModalResult := 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.ToolButton2Click(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
|
||||
i := CDS_1.RecordCount; //当前的dataset有多少行记录
|
||||
i := i + 1;
|
||||
CopyAddRow(Tv1, CDS_1);
|
||||
with CDS_1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('SerialNo').Value := i;
|
||||
FieldByName('FtyWastage').Value := 0;
|
||||
Post;
|
||||
end;
|
||||
SetXH();
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
|
||||
if Trim(CDS_1.fieldbyname('BCPID').AsString) <> '' then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete Bs_Cloth_Process where BCPID=''' + Trim(CDS_1.fieldbyname('BCPID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
CDS_1.Delete;
|
||||
|
||||
SetXH();
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.C_FromNameBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmClothInfoSel := TfrmClothInfoSel.Create(Application);
|
||||
with frmClothInfoSel do
|
||||
begin
|
||||
FCTType := '坯布';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
// C_FromName.TxtCode := Trim(CDS_1.fieldbyname('BCIID').AsString);
|
||||
// C_FromName.Text := Trim(CDS_1.fieldbyname('C_Name').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmClothInfoSel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.CYColorKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
Key := #0;
|
||||
SelectNext(ActiveControl as TWinControl, True, True);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.C_WidthBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
TBtnEditC(Sender).TxtCode := '';
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.C_WidthBtnUpClick(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 TfrmClothInfoInput.ToolButton6Click(Sender: TObject);
|
||||
begin
|
||||
if trim(C_Code.Text) = '' then
|
||||
Exit;
|
||||
try
|
||||
frmAttachmentUpload := TfrmAttachmentUpload.Create(Application);
|
||||
with frmAttachmentUpload do
|
||||
begin
|
||||
FEditAuthority := True;
|
||||
fkeyNO := trim(C_Code.Text);
|
||||
fType := '产品品档案';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmAttachmentUpload.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfoInput.Tv1Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'FtyType';
|
||||
flagname := '类型';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
CDS_1.Edit;
|
||||
CDS_1.fieldbyname('FtyType').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||
CDS_1.Post;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
tv1.Controller.EditingController.ShowEdit();
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
200
A02基础产品管理/U_ClothType.dfm
Normal file
200
A02基础产品管理/U_ClothType.dfm
Normal file
|
|
@ -0,0 +1,200 @@
|
|||
inherited frmClothType: TfrmClothType
|
||||
Left = 192
|
||||
Top = 155
|
||||
Caption = #20135#21697#31867#21035
|
||||
ClientHeight = 529
|
||||
ClientWidth = 981
|
||||
FormStyle = fsMDIChild
|
||||
Visible = True
|
||||
ExplicitWidth = 997
|
||||
ExplicitHeight = 568
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar [0]
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 981
|
||||
Height = 33
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 91
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_ClothInfo.ImageList_new32
|
||||
Images = DataLink_ClothInfo.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 TBAdd: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686#23376#31867
|
||||
ImageIndex = 2
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 166
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 237
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 5
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 308
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxDBTreeList1: TcxDBTreeList [1]
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 249
|
||||
Height = 496
|
||||
Align = alLeft
|
||||
Bands = <
|
||||
item
|
||||
end>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.ParentField = 'CTParent'
|
||||
DataController.KeyField = 'CTID'
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OptionsBehavior.CopyCaptionsToClipboard = False
|
||||
OptionsBehavior.ExpandOnDblClick = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.CellAutoHeight = True
|
||||
OptionsView.Headers = False
|
||||
RootValue = -1
|
||||
Styles.Inactive = DataLink_ClothInfo.FoneRed
|
||||
Styles.Selection = DataLink_ClothInfo.FoneRed
|
||||
Styles.IncSearch = DataLink_ClothInfo.FoneRed
|
||||
TabOrder = 1
|
||||
OnClick = cxDBTreeList1Click
|
||||
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||
DataBinding.FieldName = 'CTName'
|
||||
Width = 210
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
Position.BandIndex = 0
|
||||
Summary.FooterSummaryItems = <>
|
||||
Summary.GroupFooterSummaryItems = <>
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel [2]
|
||||
Left = 249
|
||||
Top = 33
|
||||
Width = 732
|
||||
Height = 496
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 2
|
||||
object Label1: TLabel
|
||||
Left = 66
|
||||
Top = 24
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #29238' '#31867
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 66
|
||||
Top = 65
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #31867#21035#21517#31216
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 170
|
||||
Top = 137
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #31867#21035#32534#30721
|
||||
Visible = False
|
||||
end
|
||||
object CTTopName: TEdit
|
||||
Left = 129
|
||||
Top = 21
|
||||
Width = 121
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
object CTName: TEdit
|
||||
Left = 129
|
||||
Top = 61
|
||||
Width = 121
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnKeyPress = CTNameKeyPress
|
||||
end
|
||||
object CTNo: TEdit
|
||||
Left = 233
|
||||
Top = 133
|
||||
Width = 121
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
end
|
||||
end
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
end
|
||||
inherited ADOQueryBaseTemp: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Left = 201
|
||||
Top = 105
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ADOQueryTree
|
||||
Left = 91
|
||||
Top = 355
|
||||
end
|
||||
object ADOQueryTree10: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 61
|
||||
Top = 209
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 709
|
||||
Top = 209
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Parameters = <>
|
||||
Left = 677
|
||||
Top = 137
|
||||
end
|
||||
object ADOQueryTree: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 88
|
||||
Top = 280
|
||||
end
|
||||
end
|
||||
262
A02基础产品管理/U_ClothType.pas
Normal file
262
A02基础产品管理/U_ClothType.pas
Normal file
|
|
@ -0,0 +1,262 @@
|
|||
unit U_ClothType;
|
||||
|
||||
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,
|
||||
ExtCtrls, DBClient, U_BaseList, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
cxTLdxBarBuiltInMenu, dxSkinsCore, dxSkinsDefaultPainters;
|
||||
|
||||
type
|
||||
TfrmClothType = class(TfrmBaseList)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBAdd: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
cxDBTreeList1: TcxDBTreeList;
|
||||
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||
DataSource1: TDataSource;
|
||||
ADOQueryTree10: TADOQuery;
|
||||
ToolButton1: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
CTTopName: TEdit;
|
||||
CTName: TEdit;
|
||||
CTNo: TEdit;
|
||||
ADOQueryTree: TClientDataSet;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure cxDBTreeList1Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure CTNameKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
PState: Integer;
|
||||
FCTID, FTopID: string;
|
||||
procedure InitTree();
|
||||
|
||||
public
|
||||
FCTType: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmClothType: TfrmClothType;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmClothType.InitTree();
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
with ADOQueryTree10 do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from BS_Cloth_Type ');
|
||||
SQL.Add(' where CTType=' + QuotedStr(FCTType));
|
||||
SQL.Add(' order by CTlevel,CTOrder,CTName');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryTree10, ADOQueryTree);
|
||||
SInitCDSData(ADOQueryTree10, ADOQueryTree);
|
||||
if ADOQueryTree.IsEmpty then
|
||||
Exit;
|
||||
cxDBTreeList1.Items[0].Expand(True);
|
||||
end;
|
||||
|
||||
procedure TfrmClothType.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmClothType := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmClothType.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
inherited;
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmClothType.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FCTType := Trim(self.fParameters2);
|
||||
end;
|
||||
|
||||
procedure TfrmClothType.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitTree();
|
||||
end;
|
||||
|
||||
procedure TfrmClothType.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmClothType.TBAddClick(Sender: TObject);
|
||||
begin
|
||||
PState := 11;
|
||||
CTTopName.Text := Trim(ADOQueryTree.fieldbyname('CTName').AsString);
|
||||
FCTID := '';
|
||||
CTName.Text := '';
|
||||
CTNo.Text := '';
|
||||
CTName.SetFocus;
|
||||
end;
|
||||
|
||||
procedure TfrmClothType.cxDBTreeList1Click(Sender: TObject);
|
||||
begin
|
||||
PState := 22;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BS_Cloth_Type where CTID=''' + Trim(ADOQueryTree.fieldbyname('CTParent').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
FCTID := Trim(ADOQueryTree.fieldbyname('CTID').AsString);
|
||||
CTTopName.Text := Trim(ADOQueryTemp.fieldbyname('CTName').AsString);
|
||||
CTName.Text := Trim(ADOQueryTree.fieldbyname('CTName').AsString);
|
||||
CTNo.Text := Trim(ADOQueryTree.fieldbyname('CTNo').AsString);
|
||||
end;
|
||||
|
||||
procedure TfrmClothType.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
maxId, FLMainId: string;
|
||||
begin
|
||||
if Trim(CTName.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('类别名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if PState = 11 then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd, maxId, 'CT', 'BS_Cloth_Type', 4, 1) = False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxId := Trim(FCTID);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BS_Cloth_Type where CTID=''' + Trim(FCTID) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if PState = 11 then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('CTType').Value := Trim(FCTType);
|
||||
FieldByName('CTID').Value := Trim(maxId);
|
||||
FieldByName('CTName').Value := Trim(CTName.Text);
|
||||
FieldByName('CTNo').Value := Trim(CTNo.Text);
|
||||
FieldByName('CTParent').Value := Trim(ADOQueryTree.fieldbyname('CTID').AsString);
|
||||
FieldByName('CTLevel').Value := ADOQueryTree.fieldbyname('CTLevel').AsInteger + 1;
|
||||
Post;
|
||||
end
|
||||
else if PState = 22 then
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('CTID').Value := Trim(maxId);
|
||||
FieldByName('CTName').Value := Trim(CTName.Text);
|
||||
FieldByName('CTNo').Value := Trim(CTNo.Text);
|
||||
//FieldByName('CTParent').Value:=Trim(ADOQueryTree.fieldbyname('CTID').AsString);
|
||||
//FieldByName('CPOrder').Value:=ADOQueryTree.fieldbyname('CPOrder').AsInteger+1;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
FLMainId := Trim(ADOQueryTree.fieldbyname('CTID').AsString);
|
||||
InitTree();
|
||||
ADOQueryTree.Locate('CTID', FLMainId, []);
|
||||
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothType.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryTree.FieldByName('CTLevel').AsInteger = 0 then
|
||||
Exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BS_Cloth_Type where CTParent=''' + Trim(ADOQueryTree.fieldbyname('CTID').AsString) + '''');
|
||||
Open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('已经定义子类不能删除!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BS_Cloth_Info where CTID=''' + Trim(ADOQueryTree.fieldbyname('CTID').AsString) + '''');
|
||||
Open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('已经有产品属于此类不能删除!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('delete BS_Cloth_Type where CTID=''' + Trim(ADOQueryTree.fieldbyname('CTID').AsString) + '''');
|
||||
sql.Add('delete BS_Cloth_Type where CTParent=''' + Trim(ADOQueryTree.fieldbyname('CTID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
InitTree();
|
||||
end;
|
||||
|
||||
procedure TfrmClothType.CTNameKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
CTNo.SetFocus;
|
||||
end;
|
||||
|
||||
procedure TfrmClothType.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
InitTree();
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
66
A02基础产品管理/U_ClothTypeSel.dfm
Normal file
66
A02基础产品管理/U_ClothTypeSel.dfm
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
object frmClothTypeSel: TfrmClothTypeSel
|
||||
Left = 561
|
||||
Top = 284
|
||||
Caption = #20135#21697#31867#21035#36873#25321
|
||||
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 = 249
|
||||
Height = 485
|
||||
Align = alLeft
|
||||
Bands = <
|
||||
item
|
||||
end>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.ParentField = 'CTParent'
|
||||
DataController.KeyField = 'CTID'
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OptionsBehavior.CopyCaptionsToClipboard = False
|
||||
OptionsBehavior.ExpandOnDblClick = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.CellAutoHeight = True
|
||||
OptionsView.Headers = False
|
||||
RootValue = -1
|
||||
TabOrder = 0
|
||||
OnDblClick = cxDBTreeList1DblClick
|
||||
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||
DataBinding.FieldName = 'CTName'
|
||||
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 = 184
|
||||
Top = 136
|
||||
end
|
||||
end
|
||||
72
A02基础产品管理/U_ClothTypeSel.pas
Normal file
72
A02基础产品管理/U_ClothTypeSel.pas
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
unit U_ClothTypeSel;
|
||||
|
||||
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
|
||||
TfrmClothTypeSel = class(TForm)
|
||||
ADOConnection1: TADOConnection;
|
||||
cxDBTreeList1: TcxDBTreeList;
|
||||
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||
DataSource1: TDataSource;
|
||||
ADOQueryHelp: TADOQuery;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure cxDBTreeList1DblClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
FCTType: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmClothTypeSel: TfrmClothTypeSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink;
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmClothTypeSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cxDBTreeList1.Align := alclient;
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothTypeSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
with ADOQueryHelp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from BS_Cloth_Type where CTType=' + quotedstr(FCTType) + ' order by CTlevel,CTOrder,CTName');
|
||||
Open;
|
||||
end;
|
||||
cxDBTreeList1.Items[0].Expand(false);
|
||||
end;
|
||||
|
||||
procedure TfrmClothTypeSel.cxDBTreeList1DblClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryHelp.IsEmpty then
|
||||
exit;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
14275
A02基础产品管理/U_DataLink.dfm
Normal file
14275
A02基础产品管理/U_DataLink.dfm
Normal file
File diff suppressed because it is too large
Load Diff
127
A02基础产品管理/U_DataLink.pas
Normal file
127
A02基础产品管理/U_DataLink.pas
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
unit U_DataLink;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
||||
Windows, Messages, forms, OleCtnrs, DateUtils, ExtCtrls, SyncObjs, cxClasses,
|
||||
dxSkinsCore, dxSkinsDefaultPainters, System.ImageList;
|
||||
|
||||
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; //#主窗体名称#//
|
||||
PicSvr: 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; //公司
|
||||
IpCall: Integer;
|
||||
IpWLDZStr: string;
|
||||
UserDataFlag: string;
|
||||
|
||||
type
|
||||
TDataLink_ClothInfo = class(TDataModule)
|
||||
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;
|
||||
Timer_link: TTimer;
|
||||
ImageList_new32: TImageList;
|
||||
procedure DataModuleDestroy(Sender: TObject);
|
||||
procedure Timer_linkTimer(Sender: TObject);
|
||||
procedure DataModuleCreate(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_ClothInfo: TDataLink_ClothInfo;
|
||||
CriticalSection: TCriticalSection; {声明临界}
|
||||
|
||||
implementation
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TMyThread.Execute;
|
||||
begin
|
||||
FreeOnTerminate := True;
|
||||
CriticalSection.Enter;
|
||||
try
|
||||
with DataLink_ClothInfo.AdoDataLink do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select getdate()');
|
||||
open;
|
||||
end;
|
||||
except
|
||||
try
|
||||
with DataLink_ClothInfo.ADOLink do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
LoginPrompt := false;
|
||||
Connected := true;
|
||||
end;
|
||||
except
|
||||
|
||||
end;
|
||||
end;
|
||||
CriticalSection.Leave;
|
||||
end;
|
||||
|
||||
procedure TDataLink_ClothInfo.DataModuleDestroy(Sender: TObject);
|
||||
begin
|
||||
CriticalSection.Free;
|
||||
DataLink_ClothInfo := nil;
|
||||
end;
|
||||
|
||||
procedure TDataLink_ClothInfo.Timer_linkTimer(Sender: TObject);
|
||||
begin
|
||||
TMyThread.Create(False);
|
||||
end;
|
||||
|
||||
procedure TDataLink_ClothInfo.DataModuleCreate(Sender: TObject);
|
||||
begin
|
||||
CriticalSection := TCriticalSection.Create;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
259
A02基础产品管理/U_GetDllForm.pas
Normal file
259
A02基础产品管理/U_GetDllForm.pas
Normal file
|
|
@ -0,0 +1,259 @@
|
|||
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;
|
||||
|
||||
function GetsysParam(muserId: pchar; fparam1: pchar): Boolean;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_iniParam, U_ClothType, U_ClothInfo, U_TatClothInfo,
|
||||
U_KnitClothInfoList;
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// 功能说明:取Dll中得窗体 //
|
||||
// 参数说明:App>>调用应用程序; //
|
||||
// FormH>>调用窗口句柄 ; //
|
||||
// FormID>>窗口号; //
|
||||
// Language>>语言种类; //
|
||||
// WinStyle>>窗口类型; //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
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 := '101.132.143.144,7781';
|
||||
dtbase := 'xinyufzData';
|
||||
// dtbase := 'huafuData';
|
||||
|
||||
// dtbase := 'xingruiData';
|
||||
user := 'rtsa';
|
||||
pswd := 'rightsoft@5740';
|
||||
|
||||
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
||||
// DParameters1:='高权限';
|
||||
Parameters2 := '梭织';
|
||||
end
|
||||
else
|
||||
begin
|
||||
DConString := DataBaseStr;
|
||||
end;
|
||||
|
||||
if not ConnData() then
|
||||
begin
|
||||
result := 0;
|
||||
exit;
|
||||
end;
|
||||
if IsINIFile() then
|
||||
ReadINIFile()
|
||||
else
|
||||
WriteINIFile;
|
||||
GetsysParam('', '');
|
||||
// 定义窗口类型 、状态
|
||||
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
|
||||
|
||||
111: // 产品类别
|
||||
begin
|
||||
with TfrmClothType.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;
|
||||
|
||||
112: // 产品信息管理
|
||||
begin
|
||||
with TfrmClothInfo.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;
|
||||
|
||||
122: //梭织产品信息管理
|
||||
begin
|
||||
with TfrmTatClothInfo.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;
|
||||
|
||||
132: // 针织产品信息管理
|
||||
begin
|
||||
with TfrmKnitClothInfoList.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 GetsysParam(muserId: pchar; fparam1: pchar): Boolean;
|
||||
begin
|
||||
result := true;
|
||||
//////////////////////////////
|
||||
// shortDateFormat := 'yyyy-MM-dd';
|
||||
//服务器日期
|
||||
with DataLink_ClothInfo.AdoDataLink do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select getDate()as dt');
|
||||
open;
|
||||
DServerDate := fieldByName('dt').AsDatetime;
|
||||
end;
|
||||
result := true;
|
||||
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_ClothInfo) then
|
||||
DataLink_ClothInfo := TDataLink_ClothInfo.Create(Application);
|
||||
try
|
||||
with DataLink_ClothInfo.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_ClothInfo.Free;
|
||||
application := NewDllApp;
|
||||
dxUnitsLoader.Finalize;
|
||||
|
||||
end.
|
||||
|
||||
383
A02基础产品管理/U_KnitClothInfoInput.dfm
Normal file
383
A02基础产品管理/U_KnitClothInfoInput.dfm
Normal file
|
|
@ -0,0 +1,383 @@
|
|||
object frmKnitClothInfoInput: TfrmKnitClothInfoInput
|
||||
Left = 459
|
||||
Top = 231
|
||||
Anchors = []
|
||||
Caption = #20135#21697#20449#24687#24405#20837
|
||||
ClientHeight = 208
|
||||
ClientWidth = 735
|
||||
Color = clWhite
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = True
|
||||
Position = poScreenCenter
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 735
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 75
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_ClothInfo.ImageList_new32
|
||||
Images = DataLink_ClothInfo.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton1: TToolButton
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton6: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #38468#20214
|
||||
ImageIndex = 22
|
||||
OnClick = ToolButton6Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 142
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 735
|
||||
Height = 170
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
BevelInner = bvNone
|
||||
BevelOuter = bvNone
|
||||
Color = clWhite
|
||||
Ctl3D = False
|
||||
ParentColor = False
|
||||
ParentCtl3D = False
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 31
|
||||
Top = 33
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 362
|
||||
Top = 33
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20135#21697#21517#31216#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label15: TLabel
|
||||
Left = 29
|
||||
Top = 58
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #38376' '#24133#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label22: TLabel
|
||||
Left = 360
|
||||
Top = 58
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #20811' '#37325#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 29
|
||||
Top = 83
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #39068' '#33394#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 360
|
||||
Top = 83
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #33457' '#22411#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 46
|
||||
Top = 302
|
||||
Width = 51
|
||||
Height = 16
|
||||
Caption = #26465#30721#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 360
|
||||
Top = 108
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #25104' '#20998#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 31
|
||||
Top = 108
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #33521#25991#21697#21517#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 29
|
||||
Top = 137
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #35268' '#26684#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 30
|
||||
Width = 234
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
OnKeyPress = CYColorKeyPress
|
||||
end
|
||||
object C_Name: TEdit
|
||||
Tag = 2
|
||||
Left = 426
|
||||
Top = 30
|
||||
Width = 234
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
OnKeyPress = CYColorKeyPress
|
||||
end
|
||||
object C_Color: TEdit
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 80
|
||||
Width = 234
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
end
|
||||
object C_Pattern: TEdit
|
||||
Tag = 2
|
||||
Left = 426
|
||||
Top = 80
|
||||
Width = 234
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 6
|
||||
end
|
||||
object C_Width: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 54
|
||||
Width = 234
|
||||
Height = 20
|
||||
Hint = 'CYMF/'#38376#24133
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
OnBtnUpClick = C_WidthBtnUpClick
|
||||
OnBtnDnClick = C_WidthBtnDnClick
|
||||
end
|
||||
object C_GramWeight: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 426
|
||||
Top = 54
|
||||
Width = 234
|
||||
Height = 20
|
||||
Hint = 'CYKZ/'#20811#37325
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 4
|
||||
OnBtnUpClick = C_WidthBtnUpClick
|
||||
OnBtnDnClick = C_WidthBtnDnClick
|
||||
end
|
||||
object C_Composition: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 426
|
||||
Top = 104
|
||||
Width = 234
|
||||
Height = 20
|
||||
Hint = 'C_Composition/'#25104#20998
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
OnBtnUpClick = C_WidthBtnUpClick
|
||||
OnBtnDnClick = C_WidthBtnDnClick
|
||||
end
|
||||
object C_EName: TEdit
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 105
|
||||
Width = 234
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 7
|
||||
OnKeyPress = CYColorKeyPress
|
||||
end
|
||||
object BCIID: TEdit
|
||||
Left = 103
|
||||
Top = 300
|
||||
Width = 218
|
||||
Height = 22
|
||||
Enabled = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 8
|
||||
Visible = False
|
||||
end
|
||||
object C_Spec: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 133
|
||||
Width = 234
|
||||
Height = 20
|
||||
Hint = 'C_Spec/'#35268#26684
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 9
|
||||
OnBtnUpClick = C_WidthBtnUpClick
|
||||
OnBtnDnClick = C_WidthBtnDnClick
|
||||
end
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 421
|
||||
Top = 9
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Parameters = <>
|
||||
Left = 505
|
||||
Top = 9
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 613
|
||||
Top = 17
|
||||
end
|
||||
end
|
||||
284
A02基础产品管理/U_KnitClothInfoInput.pas
Normal file
284
A02基础产品管理/U_KnitClothInfoInput.pas
Normal file
|
|
@ -0,0 +1,284 @@
|
|||
unit U_KnitClothInfoInput;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ADODB, DBClient, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGrid, ComCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, cxTextEdit,
|
||||
cxButtonEdit, StdCtrls, ExtCtrls, cxCurrencyEdit, BtnEdit, U_BaseList,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters,
|
||||
cxNavigator, dxDateRanges, dxBarBuiltInMenu;
|
||||
|
||||
type
|
||||
TfrmKnitClothInfoInput = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
ToolButton1: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ScrollBox1: TScrollBox;
|
||||
Label1: TLabel;
|
||||
Label5: TLabel;
|
||||
Label15: TLabel;
|
||||
Label22: TLabel;
|
||||
Label2: TLabel;
|
||||
Label4: TLabel;
|
||||
Label3: TLabel;
|
||||
C_Code: TEdit;
|
||||
C_Name: TEdit;
|
||||
C_Color: TEdit;
|
||||
C_Pattern: TEdit;
|
||||
Label7: TLabel;
|
||||
C_Width: TBtnEditC;
|
||||
C_GramWeight: TBtnEditC;
|
||||
C_Composition: TBtnEditC;
|
||||
Label12: TLabel;
|
||||
C_EName: TEdit;
|
||||
ToolButton6: TToolButton;
|
||||
BCIID: TEdit;
|
||||
Label6: TLabel;
|
||||
C_Spec: TBtnEditC;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure CYColorKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure CYJGGYBtnDnClick(Sender: TObject);
|
||||
procedure C_WidthBtnDnClick(Sender: TObject);
|
||||
procedure C_WidthBtnUpClick(Sender: TObject);
|
||||
procedure ToolButton6Click(Sender: TObject);
|
||||
private
|
||||
canshu1: string;
|
||||
Fint: Integer;
|
||||
procedure InitGrid();
|
||||
function SaveData(): Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
FBCIID, FCTID: string;
|
||||
CopyInt: Integer;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmKnitClothInfoInput: TfrmKnitClothInfoInput;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_iniParam, U_ZDYHelp, U_AttachmentUpload, U_ClothInfoSel;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmKnitClothInfoInput.InitGrid();
|
||||
begin
|
||||
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from V_BS_Cloth_Info where BCIID=''' + Trim(FBCIID) + '''');
|
||||
Open;
|
||||
end;
|
||||
|
||||
SCSHData(ADOQueryMain, ScrollBox1, 2);
|
||||
SCSHData(ADOQueryMain, ScrollBox1, 0);
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoInput.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
if CopyInt = 1 then
|
||||
begin
|
||||
FBCIID := '';
|
||||
BCIID.text := '';
|
||||
C_Code.text := '';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoInput.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
function TfrmKnitClothInfoInput.SaveData(): Boolean;
|
||||
var
|
||||
maxId, maxno: string;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if Trim(FBCIID) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd, maxId, 'Y', 'BS_Cloth_Info', 4, 1) = False then
|
||||
begin
|
||||
Result := False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
BCIID.Text := trim(maxId);
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxId := Trim(FBCIID);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BS_Cloth_Info where BCIID=''' + Trim(FBCIID) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FBCIID) = '' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('CTID').Value := Trim(FCTID);
|
||||
FieldByName('FILLID').Value := Trim(DCode);
|
||||
FieldByName('FILLER').Value := Trim(DName);
|
||||
FieldByName('FILLTIME').Value := SGetServerDateTime(ADOQueryTemp);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('EDITER').Value := Trim(DName);
|
||||
FieldByName('EDITTIME').Value := SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('BCIID').Value := Trim(maxId);
|
||||
if trim(C_Code.Text) = '' then
|
||||
C_Code.Text := Trim(maxId);
|
||||
RTSetsavedata(ADOQueryCmd, 'BS_Cloth_Info', ScrollBox1, 2);
|
||||
Post;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select count(*) as AA from BS_Cloth_Info where C_Code=''' + Trim(C_Code.Text) + '''');
|
||||
Open;
|
||||
if FieldByName('AA').AsInteger > 1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result := False;
|
||||
Application.MessageBox('编号重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
FBCIID := maxId;
|
||||
Result := True;
|
||||
except
|
||||
Result := False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoInput.CYJGGYBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoInput.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
MC_Code: string;
|
||||
begin
|
||||
if C_Name.Text = '' then
|
||||
begin
|
||||
Application.MessageBox('产品名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if trim(C_Code.Text) = '' then
|
||||
begin
|
||||
|
||||
if GetLSNo(ADOQueryCmd, MC_Code, 'C', 'BS_Cloth_Info', 4, 0) = False then
|
||||
begin
|
||||
Application.MessageBox('取最成品编号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
C_Code.Text := MC_Code;
|
||||
|
||||
end;
|
||||
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
ModalResult := 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoInput.CYColorKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
Key := #0;
|
||||
SelectNext(ActiveControl as TWinControl, True, True);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoInput.C_WidthBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
TBtnEditC(Sender).TxtCode := '';
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoInput.C_WidthBtnUpClick(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 TfrmKnitClothInfoInput.ToolButton6Click(Sender: TObject);
|
||||
begin
|
||||
if trim(C_Code.Text) = '' then
|
||||
Exit;
|
||||
try
|
||||
frmAttachmentUpload := TfrmAttachmentUpload.Create(Application);
|
||||
with frmAttachmentUpload do
|
||||
begin
|
||||
FEditAuthority := True;
|
||||
fkeyNO := trim(C_Code.Text);
|
||||
fType := '产品品档案';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmAttachmentUpload.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
837
A02基础产品管理/U_KnitClothInfoList.dfm
Normal file
837
A02基础产品管理/U_KnitClothInfoList.dfm
Normal file
|
|
@ -0,0 +1,837 @@
|
|||
inherited frmKnitClothInfoList: TfrmKnitClothInfoList
|
||||
Left = 117
|
||||
Top = 154
|
||||
Caption = #20135#21697#26723#26696
|
||||
ClientHeight = 702
|
||||
ClientWidth = 1444
|
||||
FormStyle = fsMDIChild
|
||||
Position = poScreenCenter
|
||||
Visible = True
|
||||
ExplicitWidth = 1460
|
||||
ExplicitHeight = 741
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar [0]
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1444
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 91
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_ClothInfo.ImageList_new32
|
||||
Images = DataLink_ClothInfo.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 TBFilter: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 0
|
||||
OnClick = TBFilterClick
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 142
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
ImageIndex = 9
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
ImageIndex = 4
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBCopy: TToolButton
|
||||
Left = 284
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22797#21046
|
||||
ImageIndex = 13
|
||||
OnClick = TBCopyClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 355
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 3
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object TBMLEdit: TToolButton
|
||||
Left = 426
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #30446#24405#20462#25913
|
||||
ImageIndex = 3
|
||||
OnClick = TBMLEditClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 521
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 5
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 592
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26631#31614#25171#21360
|
||||
ImageIndex = 21
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 687
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 20
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBUP: TToolButton
|
||||
Left = 758
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22270#29255#19978#20256
|
||||
ImageIndex = 19
|
||||
OnClick = TBUPClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 853
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 948
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxSplitter1: TcxSplitter [1]
|
||||
Left = 220
|
||||
Top = 83
|
||||
Width = 8
|
||||
Height = 619
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
Control = Panel5
|
||||
end
|
||||
object Panel1: TPanel [2]
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 1444
|
||||
Height = 45
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = 16242829
|
||||
ParentBackground = False
|
||||
TabOrder = 1
|
||||
object Label3: TLabel
|
||||
Left = 42
|
||||
Top = 15
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 1072
|
||||
Top = 107
|
||||
Width = 7
|
||||
Height = 12
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 1120
|
||||
Top = 111
|
||||
Width = 7
|
||||
Height = 12
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 199
|
||||
Top = 15
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20135#21697#21517#31216
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 509
|
||||
Top = 15
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #20811#37325
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 357
|
||||
Top = 15
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #38376#24133
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 91
|
||||
Top = 11
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnKeyPress = C_CodeKeyPress
|
||||
end
|
||||
object C_Name: TEdit
|
||||
Tag = 2
|
||||
Left = 248
|
||||
Top = 11
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnKeyPress = C_CodeKeyPress
|
||||
end
|
||||
object C_GramWeight: TEdit
|
||||
Tag = 2
|
||||
Left = 536
|
||||
Top = 11
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnKeyPress = C_CodeKeyPress
|
||||
end
|
||||
object C_Width: TEdit
|
||||
Tag = 2
|
||||
Left = 384
|
||||
Top = 11
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnKeyPress = C_CodeKeyPress
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel [3]
|
||||
Left = 512
|
||||
Top = 232
|
||||
Width = 185
|
||||
Height = 41
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
Visible = False
|
||||
end
|
||||
object Panel5: TPanel [4]
|
||||
Left = 0
|
||||
Top = 83
|
||||
Width = 220
|
||||
Height = 619
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
object cxDBTreeList1: TcxDBTreeList
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 216
|
||||
Height = 615
|
||||
Align = alClient
|
||||
Bands = <
|
||||
item
|
||||
end>
|
||||
DataController.DataSource = DS_Tree
|
||||
DataController.ParentField = 'CTParent'
|
||||
DataController.KeyField = 'CTID'
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OptionsBehavior.CopyCaptionsToClipboard = False
|
||||
OptionsBehavior.ExpandOnDblClick = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.CellAutoHeight = True
|
||||
OptionsView.Headers = False
|
||||
RootValue = -1
|
||||
Styles.Inactive = DataLink_ClothInfo.Red
|
||||
Styles.Selection = DataLink_ClothInfo.Red
|
||||
Styles.IncSearch = DataLink_ClothInfo.Red
|
||||
TabOrder = 0
|
||||
OnDblClick = cxDBTreeList1DblClick
|
||||
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||
DataBinding.FieldName = 'CTName'
|
||||
Width = 210
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
Position.BandIndex = 0
|
||||
Summary.FooterSummaryItems = <>
|
||||
Summary.GroupFooterSummaryItems = <>
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel3: TPanel [5]
|
||||
Left = 228
|
||||
Top = 83
|
||||
Width = 1216
|
||||
Height = 619
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 4
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 42
|
||||
Width = 1212
|
||||
Height = 370
|
||||
Align = alClient
|
||||
PopupMenu = PM_1
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
OnFocusedRecordChanged = Tv1FocusedRecordChanged
|
||||
DataController.DataSource = DS_1
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.IncSearch = DataLink_ClothInfo.SHuangSe
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Styles.Inactive = DataLink_ClothInfo.SHuangSe
|
||||
Styles.Selection = DataLink_ClothInfo.SHuangSe
|
||||
object v1SSel: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 41
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #31867#21035
|
||||
DataBinding.FieldName = 'CTName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 70
|
||||
end
|
||||
object v1CYNo: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'C_Code'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 92
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'C_Name'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 96
|
||||
end
|
||||
object Tv1Column11: TcxGridDBColumn
|
||||
Caption = #33521#25991#21697#21517
|
||||
DataBinding.FieldName = 'C_EName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'C_Width'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 66
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'C_GramWeight'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #22383#24067#32534#21495
|
||||
DataBinding.FieldName = 'C_FromCode'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 85
|
||||
end
|
||||
object Tv1Column8: TcxGridDBColumn
|
||||
Caption = #22383#24067#21517#31216
|
||||
DataBinding.FieldName = 'C_FromName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #25104#20998
|
||||
DataBinding.FieldName = 'C_Composition'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #33457#22411
|
||||
DataBinding.FieldName = 'C_Pattern'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 58
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #22270#29255
|
||||
DataBinding.FieldName = 'IsImg'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 57
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #22635#21333#20154
|
||||
DataBinding.FieldName = 'filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 71
|
||||
end
|
||||
object Tv1Column6: TcxGridDBColumn
|
||||
Caption = #20462#25913#20154
|
||||
DataBinding.FieldName = 'editer'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object Tv1Column7: TcxGridDBColumn
|
||||
Caption = #20462#25913#26102#38388
|
||||
DataBinding.FieldName = 'edittime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object Tv1Column9: TcxGridDBColumn
|
||||
Caption = #24405#20837#26102#38388
|
||||
DataBinding.FieldName = 'FILLTIME'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel7: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 1212
|
||||
Height = 40
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 1
|
||||
object Panel4: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1212
|
||||
Height = 40
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
TabOrder = 0
|
||||
DesignSize = (
|
||||
1212
|
||||
40)
|
||||
object Label14: TLabel
|
||||
Left = 19
|
||||
Top = 13
|
||||
Width = 84
|
||||
Height = 13
|
||||
Alignment = taCenter
|
||||
Anchors = [akLeft]
|
||||
Caption = #27599#39029#35760#24405#26465#25968
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Layout = tlCenter
|
||||
end
|
||||
object LBCPAP1: TLabel
|
||||
Left = 276
|
||||
Top = 9
|
||||
Width = 85
|
||||
Height = 21
|
||||
Alignment = taCenter
|
||||
Anchors = [akLeft]
|
||||
AutoSize = False
|
||||
Caption = #24403#21069#39029'/'#24635#39029#25968
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Layout = tlCenter
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 195
|
||||
Top = 8
|
||||
Width = 75
|
||||
Height = 23
|
||||
Anchors = [akLeft]
|
||||
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 = 367
|
||||
Top = 9
|
||||
Width = 78
|
||||
Height = 22
|
||||
Anchors = [akLeft]
|
||||
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
|
||||
object TCBNOR1: TComboBox
|
||||
Tag = 2
|
||||
Left = 111
|
||||
Top = 10
|
||||
Width = 78
|
||||
Height = 20
|
||||
Anchors = [akLeft]
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ItemIndex = 2
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Text = '500'
|
||||
OnChange = TCBNOR1Change
|
||||
Items.Strings = (
|
||||
'100'
|
||||
'300'
|
||||
'500'
|
||||
'1000'
|
||||
'5000'
|
||||
'10000')
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel9: TPanel
|
||||
Left = 2
|
||||
Top = 412
|
||||
Width = 1212
|
||||
Height = 205
|
||||
Align = alBottom
|
||||
Caption = 'Panel9'
|
||||
TabOrder = 2
|
||||
object Panel10: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 1210
|
||||
Height = 203
|
||||
Align = alClient
|
||||
Caption = 'Panel9'
|
||||
TabOrder = 0
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 1
|
||||
Top = 42
|
||||
Width = 1208
|
||||
Height = 160
|
||||
Align = alClient
|
||||
Caption = #26679#21697#32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
|
||||
TabOrder = 0
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 2
|
||||
Top = 14
|
||||
Width = 1204
|
||||
Height = 144
|
||||
Align = alClient
|
||||
BevelInner = bvLowered
|
||||
BorderStyle = bsNone
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object Panel11: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 1208
|
||||
Height = 41
|
||||
Align = alTop
|
||||
TabOrder = 1
|
||||
DesignSize = (
|
||||
1208
|
||||
41)
|
||||
object Label7: TLabel
|
||||
Left = 33
|
||||
Top = 8
|
||||
Width = 88
|
||||
Height = 21
|
||||
Caption = #33457#22411#36873#25321
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object cbbHX: TComboBox
|
||||
Left = 368
|
||||
Top = 3
|
||||
Width = 210
|
||||
Height = 32
|
||||
Style = csDropDownList
|
||||
Anchors = []
|
||||
Color = clWhite
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -24
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
OnChange = cbbHXChange
|
||||
Items.Strings = (
|
||||
#33457#22411)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Left = 161
|
||||
Top = 240
|
||||
end
|
||||
inherited ADOQueryBaseTemp: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Left = 57
|
||||
Top = 241
|
||||
end
|
||||
object DS_Tree: TDataSource
|
||||
DataSet = CDS_Tree
|
||||
Left = 155
|
||||
Top = 131
|
||||
end
|
||||
object ADOQueryTree: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 53
|
||||
Top = 137
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 899
|
||||
Top = 192
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Parameters = <>
|
||||
Left = 997
|
||||
Top = 197
|
||||
end
|
||||
object GPM_1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 360
|
||||
end
|
||||
object DS_1: TDataSource
|
||||
DataSet = CDS_1
|
||||
Left = 1043
|
||||
Top = 395
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1061
|
||||
Top = 201
|
||||
end
|
||||
object CDS_1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 960
|
||||
Top = 408
|
||||
end
|
||||
object RM1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [rmpbZoom, rmpbLoad, rmpbSave, rmpbPrint, rmpbFind, rmpbPageSetup, rmpbExit, rmpbExport, rmpbNavigator]
|
||||
DefaultCollate = False
|
||||
ShowPrintDialog = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
Dataset = RMDB_Main
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 312
|
||||
Top = 216
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDB_Main: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = ADOQueryPrint
|
||||
Left = 952
|
||||
Top = 296
|
||||
end
|
||||
object ODPat: TOpenDialog
|
||||
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||
Left = 324
|
||||
Top = 285
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
ConnectTimeout = 0
|
||||
NATKeepAlive.UseKeepAlive = False
|
||||
NATKeepAlive.IdleTimeMS = 0
|
||||
NATKeepAlive.IntervalMS = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
ReadTimeout = 0
|
||||
Left = 381
|
||||
Top = 380
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
Left = 385
|
||||
Top = 285
|
||||
end
|
||||
object DSCYNO: TDataSource
|
||||
DataSet = CDS_CYNO
|
||||
Left = 499
|
||||
Top = 299
|
||||
end
|
||||
object CDS_CYNO: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 496
|
||||
Top = 240
|
||||
end
|
||||
object adoqueryPicture: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Parameters = <>
|
||||
Left = 299
|
||||
Top = 360
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
Left = 458
|
||||
Top = 354
|
||||
end
|
||||
object PM_1: TPopupMenu
|
||||
Left = 1160
|
||||
Top = 352
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
object N3: TMenuItem
|
||||
Caption = #22797#21046
|
||||
OnClick = N3Click
|
||||
end
|
||||
end
|
||||
object RMBarCodeObject1: TRMBarCodeObject
|
||||
Left = 1052
|
||||
Top = 296
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = CDS_Sub
|
||||
Left = 1019
|
||||
Top = 627
|
||||
end
|
||||
object CDS_Sub: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 1024
|
||||
Top = 688
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 928
|
||||
Top = 688
|
||||
end
|
||||
object CDS_Tree: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 96
|
||||
Top = 136
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 875
|
||||
Top = 296
|
||||
end
|
||||
object CDS_Label: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 520
|
||||
Top = 426
|
||||
end
|
||||
end
|
||||
820
A02基础产品管理/U_KnitClothInfoList.pas
Normal file
820
A02基础产品管理/U_KnitClothInfoList.pas
Normal file
|
|
@ -0,0 +1,820 @@
|
|||
unit U_KnitClothInfoList;
|
||||
|
||||
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, jpeg, U_SLT, ComObj, Menus,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxTLdxBarBuiltInMenu, cxNavigator,
|
||||
dxBarBuiltInMenu, cxPC, Math, RM_BarCode, dxSkinsCore, dxSkinsDefaultPainters,
|
||||
dxDateRanges, IdExplicitTLSClientServerBase, U_BaseList, cxContainer,
|
||||
dxDBBarCode, dxBarCode, Vcl.Clipbrd, cxTextEdit, BtnEdit, StrUtils;
|
||||
|
||||
type
|
||||
FdDy = record
|
||||
inc: integer; //客户端套接字句柄
|
||||
FDdys: string[32]; //客户端套接字
|
||||
FdDysName: string[32]; //客户端套接字
|
||||
end;
|
||||
|
||||
TfrmKnitClothInfoList = class(TfrmBaseList)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
DS_Tree: TDataSource;
|
||||
ADOQueryTree: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
cxSplitter1: TcxSplitter;
|
||||
Panel1: TPanel;
|
||||
TBFilter: TToolButton;
|
||||
v1CYNo: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
DS_1: TDataSource;
|
||||
ADOQueryMain: TADOQuery;
|
||||
CDS_1: TClientDataSet;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
TBExport: TToolButton;
|
||||
RM1: TRMGridReport;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
ODPat: TOpenDialog;
|
||||
IdFTP1: TIdFTP;
|
||||
SaveDialog1: TSaveDialog;
|
||||
TBUP: TToolButton;
|
||||
Label3: TLabel;
|
||||
C_Code: TEdit;
|
||||
TBCopy: TToolButton;
|
||||
Panel2: TPanel;
|
||||
v1SSel: TcxGridDBColumn;
|
||||
DSCYNO: TDataSource;
|
||||
CDS_CYNO: TClientDataSet;
|
||||
Panel5: TPanel;
|
||||
cxDBTreeList1: TcxDBTreeList;
|
||||
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||
Label11: TLabel;
|
||||
Label12: TLabel;
|
||||
Panel3: TPanel;
|
||||
adoqueryPicture: TADOQuery;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
Label4: TLabel;
|
||||
C_Name: TEdit;
|
||||
TBAdd: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
TBMLEdit: TToolButton;
|
||||
OpenDialog1: TOpenDialog;
|
||||
Label9: TLabel;
|
||||
C_GramWeight: TEdit;
|
||||
Label8: TLabel;
|
||||
C_Width: TEdit;
|
||||
PM_1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
Panel7: TPanel;
|
||||
Panel4: TPanel;
|
||||
Label14: TLabel;
|
||||
LBCPAP1: TLabel;
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
TCBNOR1: TComboBox;
|
||||
RMBarCodeObject1: TRMBarCodeObject;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
DataSource3: TDataSource;
|
||||
CDS_Sub: TClientDataSet;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column9: TcxGridDBColumn;
|
||||
Tv1Column11: TcxGridDBColumn;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
ToolButton2: TToolButton;
|
||||
N3: TMenuItem;
|
||||
Panel9: TPanel;
|
||||
Panel10: TPanel;
|
||||
GroupBox1: TGroupBox;
|
||||
ScrollBox1: TScrollBox;
|
||||
Panel11: TPanel;
|
||||
cbbHX: TComboBox;
|
||||
Label7: TLabel;
|
||||
CDS_Tree: TClientDataSet;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
CDS_Label: TClientDataSet;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
ToolButton3: TToolButton;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column8: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure cxDBTreeList1DblClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBFilterClick(Sender: TObject);
|
||||
procedure CYNoChange(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBUPClick(Sender: TObject);
|
||||
procedure TBCopyClick(Sender: TObject);
|
||||
procedure C_CodeKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure TBMLEditClick(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure TCBNOR1Change(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure N3Click(Sender: TObject);
|
||||
procedure TextEdit(Sender: TObject);
|
||||
procedure HXNameBtnUpClick(Sender: TObject);
|
||||
procedure HXNameBtnDnClick(Sender: TObject);
|
||||
procedure cbbHXChange(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
CurrentPage, RecordsNumber: Integer;
|
||||
CTID: string;
|
||||
PState: Integer;
|
||||
FCTID, FTopID, FJurisdiction, FCTType: string;
|
||||
procedure SetStatus();
|
||||
procedure InitTree();
|
||||
procedure InitGrid();
|
||||
procedure ReadINIFile();
|
||||
procedure InitImage();
|
||||
procedure LookImage(FileName: string);
|
||||
|
||||
public
|
||||
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Mach: array of TfrmSlt;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_KnitClothInfoInput, U_CloInfoFileUp, U_ClothTypeSel,
|
||||
U_ZDYHelp, U_LabelPrint;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmKnitClothInfoList.LookImage(FileName: string);
|
||||
var
|
||||
sFieldName: string;
|
||||
begin
|
||||
|
||||
sFieldName := leftbstr(ExtractFilePath(Application.ExeName), 1) + ':\图片查看';
|
||||
|
||||
if not DirectoryExists(pchar(sFieldName)) then
|
||||
CreateDirectory(pchar(sFieldName), nil);
|
||||
|
||||
sFieldName := sFieldName + '\' + trim(FileName);
|
||||
|
||||
try
|
||||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI', 'SERVER', '服务器地址', '127.0.0.1');
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
|
||||
end;
|
||||
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
application.ProcessMessages;
|
||||
try
|
||||
// ShowMessage(PChar(Trim('D:\' + Trim(FileName))));
|
||||
IdFTP1.Get(Trim(UserDataFlag + 'YP\' + FileName), sFieldName, true, false);
|
||||
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;
|
||||
ShellExecute(Handle, 'open', PChar(sFieldName), '', '', SW_SHOWNORMAL);
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.SetStatus();
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.InitTree();
|
||||
begin
|
||||
with ADOQueryTree do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from BS_Cloth_Type where CTType=' + quotedstr(FCTType));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryTree, CDS_Tree);
|
||||
SInitCDSData(ADOQueryTree, CDS_Tree);
|
||||
cxDBTreeList1.Items[0].Expand(false);
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.InitGrid();
|
||||
var
|
||||
fwhere, MBCIID, Pwhere: string;
|
||||
begin
|
||||
Panel2.Visible := True;
|
||||
Panel2.Refresh;
|
||||
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;
|
||||
Panel2.Visible := False;
|
||||
|
||||
if MBCIID <> '' then
|
||||
CDS_1.Locate('BCIID', MBCIID, []);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
var
|
||||
i, j: integer;
|
||||
begin
|
||||
inherited;
|
||||
j := length(Mach);
|
||||
if j > 0 then
|
||||
begin
|
||||
for i := 0 to j - 1 do
|
||||
begin
|
||||
Mach[i].free;
|
||||
end;
|
||||
end;
|
||||
SetLength(Mach, 0);
|
||||
Action := cafree;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FJurisdiction := Trim(Self.fParameters1);
|
||||
FCTType := Trim(self.fParameters2);
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
if DirectoryExists(ExtractFileDir('D:\Right1209')) then
|
||||
winexec('cmd /c rd /s /q D:\Right1209', sw_hide);
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.TBDelClick(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
|
||||
if Trim(CDS_1.fieldbyname('BCIID').AsString) <> '' then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('delete BS_Cloth_Info where BCIID=''' + Trim(CDS_1.fieldbyname('BCIID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
CDS_1.Delete;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
ReadCxGrid(self.Caption + 'TV1', Tv1, '样品管理');
|
||||
application.ProcessMessages;
|
||||
|
||||
RecordsNumber := 500;
|
||||
CurrentPage := 1;
|
||||
InitTree();
|
||||
SetStatus();
|
||||
InitGrid();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.cbbHXChange(Sender: TObject);
|
||||
begin
|
||||
InitImage();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.cxDBTreeList1DblClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitTree();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.TBFilterClick(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 TfrmKnitClothInfoList.CYNoChange(Sender: TObject);
|
||||
begin
|
||||
//if Length(Trim(TEdit(Sender).Text))<4 then Exit;
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
TcxGridToExcel(self.Caption, cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.TBUPClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmCloInfoFileUp := TfrmCloInfoFileUp.Create(Application);
|
||||
with frmCloInfoFileUp do
|
||||
begin
|
||||
Code.Text := Trim(Self.CDS_1.fieldbyname('C_Code').AsString);
|
||||
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
// Self.CDS_1.Locate('BCIID', BCIID, []);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCloInfoFileUp.Free;
|
||||
end;
|
||||
InitImage();
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.ReadINIFile();
|
||||
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 TfrmKnitClothInfoList.InitImage();
|
||||
var
|
||||
i, j: integer;
|
||||
jpg: TJpegImage;
|
||||
myStream: TADOBlobStream;
|
||||
begin
|
||||
|
||||
j := length(Mach);
|
||||
if j > 0 then
|
||||
begin
|
||||
for i := 0 to j - 1 do
|
||||
begin
|
||||
Mach[i].free;
|
||||
end;
|
||||
end;
|
||||
SetLength(Mach, 0);
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
try
|
||||
with adoqueryPicture do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.TFID,A.WBID,A.FilesOther,A.FileName from TP_File A ');
|
||||
sql.add('where A.WBID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString)));
|
||||
if Trim(cbbHX.Text) <> '' then
|
||||
sql.add(' and A.HXName=' + quotedstr(trim(cbbHX.Text)));
|
||||
|
||||
open;
|
||||
end;
|
||||
j := adoqueryPicture.RecordCount;
|
||||
if j < 1 then
|
||||
exit;
|
||||
adoqueryPicture.DisableControls;
|
||||
adoqueryPicture.First;
|
||||
SetLength(Mach, j);
|
||||
jpg := TJpegImage.Create();
|
||||
for i := 0 to j - 1 do
|
||||
begin
|
||||
if triM(adoqueryPicture.fieldbyname('FilesOther').AsString) <> '' then
|
||||
begin
|
||||
myStream := tadoblobstream.Create(tblobfield(adoqueryPicture.fieldbyname('FilesOther')), bmread);
|
||||
jpg.LoadFromStream(myStream);
|
||||
Mach[i] := TfrmSlt.Create(Self);
|
||||
Mach[i].Name := trim(adoqueryPicture.fieldbyname('TFID').AsString);
|
||||
Mach[i].Parent := ScrollBox1;
|
||||
Mach[i].Left := 0 + i * 165;
|
||||
Mach[i].Init(adoqueryPicture.fieldbyname('TFID').AsString, adoqueryPicture.fieldbyname('FileName').AsString, jpg);
|
||||
end;
|
||||
adoqueryPicture.Next;
|
||||
end;
|
||||
adoqueryPicture.EnableControls;
|
||||
finally
|
||||
jpg.free;
|
||||
application.ProcessMessages;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.TBCopyClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmKnitClothInfoInput := TfrmKnitClothInfoInput.Create(Application);
|
||||
with frmKnitClothInfoInput do
|
||||
begin
|
||||
CopyInt := 1;
|
||||
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
|
||||
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
|
||||
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmKnitClothInfoInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.C_CodeKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
CurrentPage := 1;
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.TBAddClick(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
FieldName: string;
|
||||
begin
|
||||
try
|
||||
frmKnitClothInfoInput := TfrmKnitClothInfoInput.Create(Application);
|
||||
with frmKnitClothInfoInput do
|
||||
begin
|
||||
CopyInt := 0;
|
||||
FBCIID := '';
|
||||
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
|
||||
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmKnitClothInfoInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmKnitClothInfoInput := TfrmKnitClothInfoInput.Create(Application);
|
||||
with frmKnitClothInfoInput do
|
||||
begin
|
||||
CopyInt := 0;
|
||||
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
|
||||
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmKnitClothInfoInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.TextEdit(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
begin
|
||||
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
with CDS_1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value := mvalue;
|
||||
Post;
|
||||
|
||||
end;
|
||||
if mvalue = '' then
|
||||
mvalue := '0';
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('update BS_Cloth_Info set ' + FFieldName + '=' + (Trim(mvalue)));
|
||||
sql.Add('where BCIID=' + quotedstr(Trim(CDS_1.fieldbyname('BCIID').AsString)));
|
||||
ExecSQL;
|
||||
end;
|
||||
Tv1.Controller.EditingController.ShowEdit();
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
fsj := 'select DISTINCT HXNAME name from TP_File where ISNULL(HXNAME,'''')<>'''' AND WBID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString));
|
||||
|
||||
SInitComBoxBySql(ADOQueryTemp, cbbHX, True, fsj);
|
||||
|
||||
InitImage();
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.TBMLEditClick(Sender: TObject);
|
||||
var
|
||||
MCTID: string;
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
if CDS_1.Locate('ssel', true, []) = false then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
MCTID := '';
|
||||
try
|
||||
frmClothTypeSel := TfrmClothTypeSel.create(self);
|
||||
with frmClothTypeSel do
|
||||
begin
|
||||
FCTType := Self.FCTType;
|
||||
if showmodal = 1 then
|
||||
begin
|
||||
MCTID := trim(ADOQueryHelp.fieldbyname('CTID').asstring);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmClothTypeSel.free;
|
||||
end;
|
||||
|
||||
if trim(MCTID) <> '' then
|
||||
begin
|
||||
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_Cloth_Info SET CTID=''' + trim(MCTID) + ''' ');
|
||||
sql.Add('where BCIID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
First;
|
||||
EnableControls;
|
||||
end;
|
||||
application.MessageBox('操作成功!', '提示信息');
|
||||
initGrid();
|
||||
except
|
||||
CDS_1.EnableControls;
|
||||
application.MessageBox('操作失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNoFiler(Tv1, True);
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNoFiler(Tv1, False);
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.N3Click(Sender: TObject);
|
||||
begin
|
||||
Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString)));
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.TCBNOR1Change(Sender: TObject);
|
||||
begin
|
||||
RecordsNumber := StrToInt(TCBNOR1.Text);
|
||||
CurrentPage := 1;
|
||||
C_Code.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.HXNameBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
TBtnEditC(Sender).TxtCode := '';
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.HXNameBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'HX' + Trim(Self.CDS_1.fieldbyname('CYNO').AsString);
|
||||
flagname := '花型';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.Button1Click(Sender: TObject);
|
||||
begin
|
||||
if CurrentPage > 1 then
|
||||
CurrentPage := CurrentPage - 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.Button2Click(Sender: TObject);
|
||||
begin
|
||||
if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then
|
||||
CurrentPage := CurrentPage + 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmKnitClothInfoInput := TfrmKnitClothInfoInput.Create(Application);
|
||||
with frmKnitClothInfoInput do
|
||||
begin
|
||||
CopyInt := 0;
|
||||
ToolButton1.Visible := False;
|
||||
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
|
||||
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmKnitClothInfoInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(self.Caption + 'TV1', Tv1, '样品管理');
|
||||
end;
|
||||
|
||||
procedure TfrmKnitClothInfoList.ToolButton3Click(Sender: TObject);
|
||||
var
|
||||
WSql: string;
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
Tv1.OnFocusedRecordChanged := nil;
|
||||
if CDS_1.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Tv1.OnFocusedRecordChanged := Tv1FocusedRecordChanged;
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
WSql := '';
|
||||
CDS_1.DisableControls;
|
||||
|
||||
with CDS_1 do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if CDS_1.fieldbyname('SSel').AsBoolean then
|
||||
begin
|
||||
if WSql <> '' then
|
||||
begin
|
||||
WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('BCIID').AsString));
|
||||
end
|
||||
else
|
||||
begin
|
||||
WSql := QuotedStr(Trim(CDS_1.fieldbyname('BCIID').AsString));
|
||||
end;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
CDS_1.Locate('SSel', True, []);
|
||||
Tv1.OnFocusedRecordChanged := Tv1FocusedRecordChanged;
|
||||
CDS_1.EnableControls;
|
||||
|
||||
try
|
||||
frmLabelPrint := TfrmLabelPrint.Create(Application);
|
||||
with frmLabelPrint do
|
||||
begin
|
||||
FLMType := 'ClothInfoPrint';
|
||||
FFiltration1 := WSql;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
// Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmLabelPrint.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
35
A02基础产品管理/U_SLT.dfm
Normal file
35
A02基础产品管理/U_SLT.dfm
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
object frmSLT: TfrmSLT
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 161
|
||||
Height = 138
|
||||
TabOrder = 0
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 121
|
||||
Width = 161
|
||||
Height = 17
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
Caption = 'Panel1'
|
||||
Color = clWindow
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxImage1: TcxImage
|
||||
Left = 0
|
||||
Top = 0
|
||||
Align = alTop
|
||||
Style.BorderStyle = ebsOffice11
|
||||
StyleHot.TextStyle = []
|
||||
TabOrder = 1
|
||||
OnDblClick = cxImage1DblClick
|
||||
Height = 121
|
||||
Width = 161
|
||||
end
|
||||
end
|
||||
77
A02基础产品管理/U_SLT.pas
Normal file
77
A02基础产品管理/U_SLT.pas
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
unit U_SLT;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ExtCtrls, jpeg, cxControls, cxContainer, cxEdit, cxImage, IdFTP,
|
||||
ShellAPI, cxGraphics, cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore,
|
||||
dxSkinsDefaultPainters;
|
||||
|
||||
type
|
||||
TfrmSLT = class(TFrame)
|
||||
cxImage1: TcxImage;
|
||||
Panel1: TPanel;
|
||||
procedure cxImage1DblClick(Sender: TObject);
|
||||
private
|
||||
CYID, FileName: string;
|
||||
{ Private declarations }
|
||||
public
|
||||
procedure Init(fCYID: string; fFileName: string; fPicture: TJpegImage);
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink;
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmSLT.Init(fCYID: string; fFileName: string; fPicture: TJpegImage);
|
||||
begin
|
||||
CYID := trim(fCYID);
|
||||
FileName := trim(fFileName);
|
||||
Panel1.Caption := FileName;
|
||||
cxImage1.Picture.Assign(fPicture);
|
||||
end;
|
||||
|
||||
procedure TfrmSLT.cxImage1DblClick(Sender: TObject);
|
||||
var
|
||||
IdFTP1: TIdFTP;
|
||||
FPath, FFName: string;
|
||||
FInt: integer;
|
||||
begin
|
||||
try
|
||||
IdFTP1 := TIdFTP.Create(self);
|
||||
IdFTP1.Host := PicSvr;
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
IdFTP1.Quit;
|
||||
IdFTP1.Free;
|
||||
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
|
||||
Exit;
|
||||
end;
|
||||
FPath := 'D:\Right1209\';
|
||||
if not DirectoryExists(ExtractFileDir(FPath)) then
|
||||
CreateDir(ExtractFileDir(FPath));
|
||||
FFName := Trim(FileName);
|
||||
FFName := FPath + FFName;
|
||||
if FileExists(FFName) then
|
||||
begin
|
||||
FInt := 1;
|
||||
end;
|
||||
if FInt <> 1 then
|
||||
IdFTP1.Get(UserDataFlag + 'YP\' + FileName, pchar(FFName));
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
IdFTP1.Quit;
|
||||
IdFTP1.Free;
|
||||
end;
|
||||
ShellExecute(Handle, 'open', PChar(FFName), '', '', SW_SHOWNORMAL);
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
856
A02基础产品管理/U_TatClothInfo.dfm
Normal file
856
A02基础产品管理/U_TatClothInfo.dfm
Normal file
|
|
@ -0,0 +1,856 @@
|
|||
inherited frmTatClothInfo: TfrmTatClothInfo
|
||||
Left = 117
|
||||
Top = 154
|
||||
Caption = #26797#32455#20135#21697#26723#26696
|
||||
ClientHeight = 702
|
||||
ClientWidth = 1444
|
||||
FormStyle = fsMDIChild
|
||||
Position = poScreenCenter
|
||||
Visible = True
|
||||
ExplicitWidth = 1460
|
||||
ExplicitHeight = 741
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar [0]
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1444
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 91
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_ClothInfo.ImageList_new32
|
||||
Images = DataLink_ClothInfo.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 TBFilter: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 0
|
||||
OnClick = TBFilterClick
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 142
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
ImageIndex = 9
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
ImageIndex = 4
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBCopy: TToolButton
|
||||
Left = 284
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22797#21046
|
||||
ImageIndex = 13
|
||||
OnClick = TBCopyClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 355
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 3
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object TBMLEdit: TToolButton
|
||||
Left = 426
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #30446#24405#20462#25913
|
||||
ImageIndex = 3
|
||||
OnClick = TBMLEditClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 521
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 5
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 592
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26631#31614#25171#21360
|
||||
ImageIndex = 21
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 687
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 20
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBUP: TToolButton
|
||||
Left = 758
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22270#29255#19978#20256
|
||||
ImageIndex = 19
|
||||
OnClick = TBUPClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 853
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 948
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxSplitter1: TcxSplitter [1]
|
||||
Left = 220
|
||||
Top = 83
|
||||
Width = 8
|
||||
Height = 619
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
Control = Panel5
|
||||
end
|
||||
object Panel1: TPanel [2]
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 1444
|
||||
Height = 45
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = 16242829
|
||||
ParentBackground = False
|
||||
TabOrder = 1
|
||||
object Label3: TLabel
|
||||
Left = 42
|
||||
Top = 15
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 1072
|
||||
Top = 107
|
||||
Width = 7
|
||||
Height = 12
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 1120
|
||||
Top = 111
|
||||
Width = 7
|
||||
Height = 12
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 199
|
||||
Top = 15
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20135#21697#21517#31216
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 509
|
||||
Top = 15
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #20811#37325
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 357
|
||||
Top = 15
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #38376#24133
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 91
|
||||
Top = 11
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnKeyPress = C_CodeKeyPress
|
||||
end
|
||||
object C_Name: TEdit
|
||||
Tag = 2
|
||||
Left = 248
|
||||
Top = 11
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnKeyPress = C_CodeKeyPress
|
||||
end
|
||||
object C_GramWeight: TEdit
|
||||
Tag = 2
|
||||
Left = 536
|
||||
Top = 11
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnKeyPress = C_CodeKeyPress
|
||||
end
|
||||
object C_Width: TEdit
|
||||
Tag = 2
|
||||
Left = 384
|
||||
Top = 11
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnKeyPress = C_CodeKeyPress
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel [3]
|
||||
Left = 512
|
||||
Top = 232
|
||||
Width = 185
|
||||
Height = 41
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
Visible = False
|
||||
end
|
||||
object Panel5: TPanel [4]
|
||||
Left = 0
|
||||
Top = 83
|
||||
Width = 220
|
||||
Height = 619
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
object cxDBTreeList1: TcxDBTreeList
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 216
|
||||
Height = 615
|
||||
Align = alClient
|
||||
Bands = <
|
||||
item
|
||||
end>
|
||||
DataController.DataSource = DS_Tree
|
||||
DataController.ParentField = 'CTParent'
|
||||
DataController.KeyField = 'CTID'
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OptionsBehavior.CopyCaptionsToClipboard = False
|
||||
OptionsBehavior.ExpandOnDblClick = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.CellAutoHeight = True
|
||||
OptionsView.Headers = False
|
||||
RootValue = -1
|
||||
Styles.Inactive = DataLink_ClothInfo.Red
|
||||
Styles.Selection = DataLink_ClothInfo.Red
|
||||
Styles.IncSearch = DataLink_ClothInfo.Red
|
||||
TabOrder = 0
|
||||
OnDblClick = cxDBTreeList1DblClick
|
||||
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||
DataBinding.FieldName = 'CTName'
|
||||
Width = 210
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
Position.BandIndex = 0
|
||||
Summary.FooterSummaryItems = <>
|
||||
Summary.GroupFooterSummaryItems = <>
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel3: TPanel [5]
|
||||
Left = 228
|
||||
Top = 83
|
||||
Width = 1216
|
||||
Height = 619
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 4
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 42
|
||||
Width = 1212
|
||||
Height = 370
|
||||
Align = alClient
|
||||
PopupMenu = PM_1
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
OnFocusedRecordChanged = Tv1FocusedRecordChanged
|
||||
DataController.DataSource = DS_1
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.IncSearch = DataLink_ClothInfo.SHuangSe
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Styles.Inactive = DataLink_ClothInfo.SHuangSe
|
||||
Styles.Selection = DataLink_ClothInfo.SHuangSe
|
||||
object v1SSel: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 41
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #31867#21035
|
||||
DataBinding.FieldName = 'CTName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 70
|
||||
end
|
||||
object v1CYNo: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'C_Code'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 92
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'C_Name'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 96
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'C_Width'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 66
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'C_GramWeight'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object Tv1Column11: TcxGridDBColumn
|
||||
Caption = #32428#23494
|
||||
DataBinding.FieldName = 'C_FinishLatitudeDensity'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #32463#23494
|
||||
DataBinding.FieldName = 'C_FinishLongitudeDensity'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #32428#32433#35268#26684
|
||||
DataBinding.FieldName = 'C_LatitudeSpec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #32463#32433#35268#26684
|
||||
DataBinding.FieldName = 'C_LongitudeSpec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #31576#21495
|
||||
DataBinding.FieldName = 'C_ReedNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1Column8: TcxGridDBColumn
|
||||
Caption = #22836#32441
|
||||
DataBinding.FieldName = 'C_YarnQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #22270#29255
|
||||
DataBinding.FieldName = 'IsImg'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 57
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #22635#21333#20154
|
||||
DataBinding.FieldName = 'filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 71
|
||||
end
|
||||
object Tv1Column6: TcxGridDBColumn
|
||||
Caption = #20462#25913#20154
|
||||
DataBinding.FieldName = 'editer'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object Tv1Column7: TcxGridDBColumn
|
||||
Caption = #20462#25913#26102#38388
|
||||
DataBinding.FieldName = 'edittime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object Tv1Column9: TcxGridDBColumn
|
||||
Caption = #24405#20837#26102#38388
|
||||
DataBinding.FieldName = 'FILLTIME'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column10: TcxGridDBColumn
|
||||
Caption = #32463#32534#21495
|
||||
DataBinding.FieldName = 'WB_Code'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
object Tv1Column12: TcxGridDBColumn
|
||||
Caption = #32463#35268#26684
|
||||
DataBinding.FieldName = 'WB_Spec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel7: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 1212
|
||||
Height = 40
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 1
|
||||
object Panel4: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1212
|
||||
Height = 40
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
TabOrder = 0
|
||||
DesignSize = (
|
||||
1212
|
||||
40)
|
||||
object Label14: TLabel
|
||||
Left = 19
|
||||
Top = 13
|
||||
Width = 84
|
||||
Height = 13
|
||||
Alignment = taCenter
|
||||
Anchors = [akLeft]
|
||||
Caption = #27599#39029#35760#24405#26465#25968
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Layout = tlCenter
|
||||
end
|
||||
object LBCPAP1: TLabel
|
||||
Left = 276
|
||||
Top = 9
|
||||
Width = 85
|
||||
Height = 21
|
||||
Alignment = taCenter
|
||||
Anchors = [akLeft]
|
||||
AutoSize = False
|
||||
Caption = #24403#21069#39029'/'#24635#39029#25968
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Layout = tlCenter
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 195
|
||||
Top = 8
|
||||
Width = 75
|
||||
Height = 23
|
||||
Anchors = [akLeft]
|
||||
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 = 367
|
||||
Top = 9
|
||||
Width = 78
|
||||
Height = 22
|
||||
Anchors = [akLeft]
|
||||
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
|
||||
object TCBNOR1: TComboBox
|
||||
Tag = 2
|
||||
Left = 111
|
||||
Top = 10
|
||||
Width = 78
|
||||
Height = 20
|
||||
Anchors = [akLeft]
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ItemIndex = 2
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Text = '500'
|
||||
OnChange = TCBNOR1Change
|
||||
Items.Strings = (
|
||||
'100'
|
||||
'300'
|
||||
'500'
|
||||
'1000'
|
||||
'5000'
|
||||
'10000')
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel9: TPanel
|
||||
Left = 2
|
||||
Top = 412
|
||||
Width = 1212
|
||||
Height = 205
|
||||
Align = alBottom
|
||||
Caption = 'Panel9'
|
||||
TabOrder = 2
|
||||
object Panel10: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 1210
|
||||
Height = 203
|
||||
Align = alClient
|
||||
Caption = 'Panel9'
|
||||
TabOrder = 0
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 1
|
||||
Top = 42
|
||||
Width = 1208
|
||||
Height = 160
|
||||
Align = alClient
|
||||
Caption = #26679#21697#32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
|
||||
TabOrder = 0
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 2
|
||||
Top = 14
|
||||
Width = 1204
|
||||
Height = 144
|
||||
Align = alClient
|
||||
BevelInner = bvLowered
|
||||
BorderStyle = bsNone
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object Panel11: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 1208
|
||||
Height = 41
|
||||
Align = alTop
|
||||
TabOrder = 1
|
||||
DesignSize = (
|
||||
1208
|
||||
41)
|
||||
object Label7: TLabel
|
||||
Left = 33
|
||||
Top = 8
|
||||
Width = 88
|
||||
Height = 21
|
||||
Caption = #33457#22411#36873#25321
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object cbbHX: TComboBox
|
||||
Left = 368
|
||||
Top = 3
|
||||
Width = 210
|
||||
Height = 32
|
||||
Style = csDropDownList
|
||||
Anchors = []
|
||||
Color = clWhite
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -24
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
OnChange = cbbHXChange
|
||||
Items.Strings = (
|
||||
#33457#22411)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Left = 161
|
||||
Top = 240
|
||||
end
|
||||
inherited ADOQueryBaseTemp: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Left = 57
|
||||
Top = 241
|
||||
end
|
||||
object DS_Tree: TDataSource
|
||||
DataSet = CDS_Tree
|
||||
Left = 155
|
||||
Top = 131
|
||||
end
|
||||
object ADOQueryTree: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 53
|
||||
Top = 137
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 899
|
||||
Top = 192
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Parameters = <>
|
||||
Left = 997
|
||||
Top = 197
|
||||
end
|
||||
object GPM_1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 360
|
||||
end
|
||||
object DS_1: TDataSource
|
||||
DataSet = CDS_1
|
||||
Left = 1043
|
||||
Top = 395
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1061
|
||||
Top = 201
|
||||
end
|
||||
object CDS_1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 960
|
||||
Top = 408
|
||||
end
|
||||
object RM1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [rmpbZoom, rmpbLoad, rmpbSave, rmpbPrint, rmpbFind, rmpbPageSetup, rmpbExit, rmpbExport, rmpbNavigator]
|
||||
DefaultCollate = False
|
||||
ShowPrintDialog = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
Dataset = RMDB_Main
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 312
|
||||
Top = 216
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDB_Main: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = ADOQueryPrint
|
||||
Left = 952
|
||||
Top = 296
|
||||
end
|
||||
object ODPat: TOpenDialog
|
||||
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||
Left = 324
|
||||
Top = 285
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
ConnectTimeout = 0
|
||||
NATKeepAlive.UseKeepAlive = False
|
||||
NATKeepAlive.IdleTimeMS = 0
|
||||
NATKeepAlive.IntervalMS = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
ReadTimeout = 0
|
||||
Left = 381
|
||||
Top = 380
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
Left = 385
|
||||
Top = 285
|
||||
end
|
||||
object DSCYNO: TDataSource
|
||||
DataSet = CDS_CYNO
|
||||
Left = 499
|
||||
Top = 299
|
||||
end
|
||||
object CDS_CYNO: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 496
|
||||
Top = 240
|
||||
end
|
||||
object adoqueryPicture: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Parameters = <>
|
||||
Left = 299
|
||||
Top = 360
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
Left = 458
|
||||
Top = 354
|
||||
end
|
||||
object PM_1: TPopupMenu
|
||||
Left = 1160
|
||||
Top = 352
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
object N3: TMenuItem
|
||||
Caption = #22797#21046
|
||||
OnClick = N3Click
|
||||
end
|
||||
end
|
||||
object RMBarCodeObject1: TRMBarCodeObject
|
||||
Left = 1052
|
||||
Top = 296
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = CDS_Sub
|
||||
Left = 1019
|
||||
Top = 627
|
||||
end
|
||||
object CDS_Sub: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 1024
|
||||
Top = 688
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 928
|
||||
Top = 688
|
||||
end
|
||||
object CDS_Tree: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 96
|
||||
Top = 136
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 875
|
||||
Top = 296
|
||||
end
|
||||
object CDS_Label: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 520
|
||||
Top = 426
|
||||
end
|
||||
end
|
||||
822
A02基础产品管理/U_TatClothInfo.pas
Normal file
822
A02基础产品管理/U_TatClothInfo.pas
Normal file
|
|
@ -0,0 +1,822 @@
|
|||
unit U_TatClothInfo;
|
||||
|
||||
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, jpeg, U_SLT, ComObj, Menus,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxTLdxBarBuiltInMenu, cxNavigator,
|
||||
dxBarBuiltInMenu, cxPC, Math, RM_BarCode, dxSkinsCore, dxSkinsDefaultPainters,
|
||||
dxDateRanges, IdExplicitTLSClientServerBase, U_BaseList, cxContainer,
|
||||
dxDBBarCode, dxBarCode, Vcl.Clipbrd, cxTextEdit, BtnEdit, StrUtils;
|
||||
|
||||
type
|
||||
FdDy = record
|
||||
inc: integer; //客户端套接字句柄
|
||||
FDdys: string[32]; //客户端套接字
|
||||
FdDysName: string[32]; //客户端套接字
|
||||
end;
|
||||
|
||||
TfrmTatClothInfo = class(TfrmBaseList)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
DS_Tree: TDataSource;
|
||||
ADOQueryTree: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
cxSplitter1: TcxSplitter;
|
||||
Panel1: TPanel;
|
||||
TBFilter: TToolButton;
|
||||
v1CYNo: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
DS_1: TDataSource;
|
||||
ADOQueryMain: TADOQuery;
|
||||
CDS_1: TClientDataSet;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
TBExport: TToolButton;
|
||||
RM1: TRMGridReport;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
ODPat: TOpenDialog;
|
||||
IdFTP1: TIdFTP;
|
||||
SaveDialog1: TSaveDialog;
|
||||
TBUP: TToolButton;
|
||||
Label3: TLabel;
|
||||
C_Code: TEdit;
|
||||
TBCopy: TToolButton;
|
||||
Panel2: TPanel;
|
||||
v1SSel: TcxGridDBColumn;
|
||||
DSCYNO: TDataSource;
|
||||
CDS_CYNO: TClientDataSet;
|
||||
Panel5: TPanel;
|
||||
cxDBTreeList1: TcxDBTreeList;
|
||||
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||
Label11: TLabel;
|
||||
Label12: TLabel;
|
||||
Panel3: TPanel;
|
||||
adoqueryPicture: TADOQuery;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
Label4: TLabel;
|
||||
C_Name: TEdit;
|
||||
TBAdd: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
TBMLEdit: TToolButton;
|
||||
OpenDialog1: TOpenDialog;
|
||||
Label9: TLabel;
|
||||
C_GramWeight: TEdit;
|
||||
Label8: TLabel;
|
||||
C_Width: TEdit;
|
||||
PM_1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
Panel7: TPanel;
|
||||
Panel4: TPanel;
|
||||
Label14: TLabel;
|
||||
LBCPAP1: TLabel;
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
TCBNOR1: TComboBox;
|
||||
RMBarCodeObject1: TRMBarCodeObject;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
DataSource3: TDataSource;
|
||||
CDS_Sub: TClientDataSet;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column9: TcxGridDBColumn;
|
||||
Tv1Column11: TcxGridDBColumn;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
ToolButton2: TToolButton;
|
||||
N3: TMenuItem;
|
||||
Panel9: TPanel;
|
||||
Panel10: TPanel;
|
||||
GroupBox1: TGroupBox;
|
||||
ScrollBox1: TScrollBox;
|
||||
Panel11: TPanel;
|
||||
cbbHX: TComboBox;
|
||||
Label7: TLabel;
|
||||
CDS_Tree: TClientDataSet;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
CDS_Label: TClientDataSet;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
ToolButton3: TToolButton;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column8: TcxGridDBColumn;
|
||||
Tv1Column10: TcxGridDBColumn;
|
||||
Tv1Column12: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure cxDBTreeList1DblClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBFilterClick(Sender: TObject);
|
||||
procedure CYNoChange(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBUPClick(Sender: TObject);
|
||||
procedure TBCopyClick(Sender: TObject);
|
||||
procedure C_CodeKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure TBMLEditClick(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure TCBNOR1Change(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure N3Click(Sender: TObject);
|
||||
procedure TextEdit(Sender: TObject);
|
||||
procedure HXNameBtnUpClick(Sender: TObject);
|
||||
procedure HXNameBtnDnClick(Sender: TObject);
|
||||
procedure cbbHXChange(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
CurrentPage, RecordsNumber: Integer;
|
||||
CTID: string;
|
||||
PState: Integer;
|
||||
FCTID, FTopID, FJurisdiction, FCTType: string;
|
||||
procedure SetStatus();
|
||||
procedure InitTree();
|
||||
procedure InitGrid();
|
||||
procedure ReadINIFile();
|
||||
procedure InitImage();
|
||||
procedure LookImage(FileName: string);
|
||||
|
||||
public
|
||||
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Mach: array of TfrmSlt;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_TatClothInfoInput, U_CloInfoFileUp, U_ClothTypeSel,
|
||||
U_ZDYHelp, U_LabelPrint;
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmTatClothInfo.LookImage(FileName: string);
|
||||
var
|
||||
sFieldName: string;
|
||||
begin
|
||||
|
||||
sFieldName := leftbstr(ExtractFilePath(Application.ExeName), 1) + ':\图片查看';
|
||||
|
||||
if not DirectoryExists(pchar(sFieldName)) then
|
||||
CreateDirectory(pchar(sFieldName), nil);
|
||||
|
||||
sFieldName := sFieldName + '\' + trim(FileName);
|
||||
|
||||
try
|
||||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI', 'SERVER', '服务器地址', '127.0.0.1');
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
|
||||
end;
|
||||
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
application.ProcessMessages;
|
||||
try
|
||||
// ShowMessage(PChar(Trim('D:\' + Trim(FileName))));
|
||||
IdFTP1.Get(Trim(UserDataFlag + 'YP\' + FileName), sFieldName, true, false);
|
||||
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;
|
||||
ShellExecute(Handle, 'open', PChar(sFieldName), '', '', SW_SHOWNORMAL);
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.SetStatus();
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.InitTree();
|
||||
begin
|
||||
with ADOQueryTree do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from BS_Cloth_Type where CTType=' + quotedstr(FCTType));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryTree, CDS_Tree);
|
||||
SInitCDSData(ADOQueryTree, CDS_Tree);
|
||||
cxDBTreeList1.Items[0].Expand(false);
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.InitGrid();
|
||||
var
|
||||
fwhere, MBCIID, Pwhere: string;
|
||||
begin
|
||||
Panel2.Visible := True;
|
||||
Panel2.Refresh;
|
||||
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;
|
||||
Panel2.Visible := False;
|
||||
|
||||
if MBCIID <> '' then
|
||||
CDS_1.Locate('BCIID', MBCIID, []);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
var
|
||||
i, j: integer;
|
||||
begin
|
||||
inherited;
|
||||
j := length(Mach);
|
||||
if j > 0 then
|
||||
begin
|
||||
for i := 0 to j - 1 do
|
||||
begin
|
||||
Mach[i].free;
|
||||
end;
|
||||
end;
|
||||
SetLength(Mach, 0);
|
||||
Action := cafree;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FJurisdiction := Trim(Self.fParameters1);
|
||||
FCTType := Trim(self.fParameters2);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
if DirectoryExists(ExtractFileDir('D:\Right1209')) then
|
||||
winexec('cmd /c rd /s /q D:\Right1209', sw_hide);
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.TBDelClick(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
|
||||
if Trim(CDS_1.fieldbyname('BCIID').AsString) <> '' then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('delete BS_Cloth_Info where BCIID=''' + Trim(CDS_1.fieldbyname('BCIID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
CDS_1.Delete;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
ReadCxGrid(self.Caption + 'TV1', Tv1, '样品管理');
|
||||
application.ProcessMessages;
|
||||
RecordsNumber := 500;
|
||||
CurrentPage := 1;
|
||||
InitTree();
|
||||
SetStatus();
|
||||
InitGrid();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.cbbHXChange(Sender: TObject);
|
||||
begin
|
||||
InitImage();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.cxDBTreeList1DblClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitTree();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.TBFilterClick(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 TfrmTatClothInfo.CYNoChange(Sender: TObject);
|
||||
begin
|
||||
//if Length(Trim(TEdit(Sender).Text))<4 then Exit;
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
TcxGridToExcel(self.Caption, cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.TBUPClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmCloInfoFileUp := TfrmCloInfoFileUp.Create(Application);
|
||||
with frmCloInfoFileUp do
|
||||
begin
|
||||
Code.Text := Trim(Self.CDS_1.fieldbyname('C_Code').AsString);
|
||||
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
// Self.CDS_1.Locate('BCIID', BCIID, []);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCloInfoFileUp.Free;
|
||||
end;
|
||||
InitImage();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.ReadINIFile();
|
||||
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 TfrmTatClothInfo.InitImage();
|
||||
var
|
||||
i, j: integer;
|
||||
jpg: TJpegImage;
|
||||
myStream: TADOBlobStream;
|
||||
begin
|
||||
|
||||
j := length(Mach);
|
||||
if j > 0 then
|
||||
begin
|
||||
for i := 0 to j - 1 do
|
||||
begin
|
||||
Mach[i].free;
|
||||
end;
|
||||
end;
|
||||
SetLength(Mach, 0);
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
try
|
||||
with adoqueryPicture do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.TFID,A.WBID,A.FilesOther,A.FileName from TP_File A ');
|
||||
sql.add('where A.WBID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString)));
|
||||
if Trim(cbbHX.Text) <> '' then
|
||||
sql.add(' and A.HXName=' + quotedstr(trim(cbbHX.Text)));
|
||||
|
||||
open;
|
||||
end;
|
||||
j := adoqueryPicture.RecordCount;
|
||||
if j < 1 then
|
||||
exit;
|
||||
adoqueryPicture.DisableControls;
|
||||
adoqueryPicture.First;
|
||||
SetLength(Mach, j);
|
||||
jpg := TJpegImage.Create();
|
||||
for i := 0 to j - 1 do
|
||||
begin
|
||||
if triM(adoqueryPicture.fieldbyname('FilesOther').AsString) <> '' then
|
||||
begin
|
||||
myStream := tadoblobstream.Create(tblobfield(adoqueryPicture.fieldbyname('FilesOther')), bmread);
|
||||
jpg.LoadFromStream(myStream);
|
||||
Mach[i] := TfrmSlt.Create(Self);
|
||||
Mach[i].Name := trim(adoqueryPicture.fieldbyname('TFID').AsString);
|
||||
Mach[i].Parent := ScrollBox1;
|
||||
Mach[i].Left := 0 + i * 165;
|
||||
Mach[i].Init(adoqueryPicture.fieldbyname('TFID').AsString, adoqueryPicture.fieldbyname('FileName').AsString, jpg);
|
||||
end;
|
||||
adoqueryPicture.Next;
|
||||
end;
|
||||
adoqueryPicture.EnableControls;
|
||||
finally
|
||||
jpg.free;
|
||||
application.ProcessMessages;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.TBCopyClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmTatClothInfoInput := TfrmTatClothInfoInput.Create(Application);
|
||||
with frmTatClothInfoInput do
|
||||
begin
|
||||
CopyInt := 1;
|
||||
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
|
||||
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
|
||||
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmTatClothInfoInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.C_CodeKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
CurrentPage := 1;
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.TBAddClick(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
FieldName: string;
|
||||
begin
|
||||
try
|
||||
frmTatClothInfoInput := TfrmTatClothInfoInput.Create(Application);
|
||||
with frmTatClothInfoInput do
|
||||
begin
|
||||
CopyInt := 0;
|
||||
FBCIID := '';
|
||||
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
|
||||
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmTatClothInfoInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmTatClothInfoInput := TfrmTatClothInfoInput.Create(Application);
|
||||
with frmTatClothInfoInput do
|
||||
begin
|
||||
CopyInt := 0;
|
||||
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
|
||||
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmTatClothInfoInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.TextEdit(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
begin
|
||||
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
with CDS_1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value := mvalue;
|
||||
Post;
|
||||
|
||||
end;
|
||||
if mvalue = '' then
|
||||
mvalue := '0';
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('update BS_Cloth_Info set ' + FFieldName + '=' + (Trim(mvalue)));
|
||||
sql.Add('where BCIID=' + quotedstr(Trim(CDS_1.fieldbyname('BCIID').AsString)));
|
||||
ExecSQL;
|
||||
end;
|
||||
Tv1.Controller.EditingController.ShowEdit();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
fsj := 'select DISTINCT HXNAME name from TP_File where ISNULL(HXNAME,'''')<>'''' AND WBID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString));
|
||||
|
||||
SInitComBoxBySql(ADOQueryTemp, cbbHX, True, fsj);
|
||||
|
||||
InitImage();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.TBMLEditClick(Sender: TObject);
|
||||
var
|
||||
MCTID: string;
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
exit;
|
||||
if CDS_1.Locate('ssel', true, []) = false then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
MCTID := '';
|
||||
try
|
||||
frmClothTypeSel := TfrmClothTypeSel.create(self);
|
||||
with frmClothTypeSel do
|
||||
begin
|
||||
FCTType := Self.FCTType;
|
||||
if showmodal = 1 then
|
||||
begin
|
||||
MCTID := trim(ADOQueryHelp.fieldbyname('CTID').asstring);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmClothTypeSel.free;
|
||||
end;
|
||||
|
||||
if trim(MCTID) <> '' then
|
||||
begin
|
||||
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_Cloth_Info SET CTID=''' + trim(MCTID) + ''' ');
|
||||
sql.Add('where BCIID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
First;
|
||||
EnableControls;
|
||||
end;
|
||||
application.MessageBox('操作成功!', '提示信息');
|
||||
initGrid();
|
||||
except
|
||||
CDS_1.EnableControls;
|
||||
application.MessageBox('操作失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNoFiler(Tv1, True);
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNoFiler(Tv1, False);
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.N3Click(Sender: TObject);
|
||||
begin
|
||||
Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString)));
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.TCBNOR1Change(Sender: TObject);
|
||||
begin
|
||||
RecordsNumber := StrToInt(TCBNOR1.Text);
|
||||
CurrentPage := 1;
|
||||
C_Code.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.HXNameBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
TBtnEditC(Sender).TxtCode := '';
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.HXNameBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'HX' + Trim(Self.CDS_1.fieldbyname('CYNO').AsString);
|
||||
flagname := '花型';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.Button1Click(Sender: TObject);
|
||||
begin
|
||||
if CurrentPage > 1 then
|
||||
CurrentPage := CurrentPage - 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.Button2Click(Sender: TObject);
|
||||
begin
|
||||
if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then
|
||||
CurrentPage := CurrentPage + 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmTatClothInfoInput := TfrmTatClothInfoInput.Create(Application);
|
||||
with frmTatClothInfoInput do
|
||||
begin
|
||||
CopyInt := 0;
|
||||
ToolButton1.Visible := False;
|
||||
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
|
||||
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmTatClothInfoInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(self.Caption + 'TV1', Tv1, '样品管理');
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.ToolButton3Click(Sender: TObject);
|
||||
var
|
||||
WSql: string;
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
Tv1.OnFocusedRecordChanged := nil;
|
||||
if CDS_1.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Tv1.OnFocusedRecordChanged := Tv1FocusedRecordChanged;
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
WSql := '';
|
||||
CDS_1.DisableControls;
|
||||
|
||||
with CDS_1 do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if CDS_1.fieldbyname('SSel').AsBoolean then
|
||||
begin
|
||||
if WSql <> '' then
|
||||
begin
|
||||
WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('BCIID').AsString));
|
||||
end
|
||||
else
|
||||
begin
|
||||
WSql := QuotedStr(Trim(CDS_1.fieldbyname('BCIID').AsString));
|
||||
end;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
CDS_1.Locate('SSel', True, []);
|
||||
Tv1.OnFocusedRecordChanged := Tv1FocusedRecordChanged;
|
||||
CDS_1.EnableControls;
|
||||
|
||||
try
|
||||
frmLabelPrint := TfrmLabelPrint.Create(Application);
|
||||
with frmLabelPrint do
|
||||
begin
|
||||
FLMType := 'ClothInfoPrint';
|
||||
FFiltration1 := WSql;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
// Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmLabelPrint.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
967
A02基础产品管理/U_TatClothInfoInput.dfm
Normal file
967
A02基础产品管理/U_TatClothInfoInput.dfm
Normal file
|
|
@ -0,0 +1,967 @@
|
|||
object frmTatClothInfoInput: TfrmTatClothInfoInput
|
||||
Left = 459
|
||||
Top = 231
|
||||
Anchors = []
|
||||
Caption = #20135#21697#20449#24687#24405#20837
|
||||
ClientHeight = 607
|
||||
ClientWidth = 1533
|
||||
Color = clWhite
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = True
|
||||
Position = poScreenCenter
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1533
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 75
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_ClothInfo.ImageList_new32
|
||||
Images = DataLink_ClothInfo.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton1: TToolButton
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton6: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #38468#20214
|
||||
ImageIndex = 22
|
||||
OnClick = ToolButton6Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 142
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 1533
|
||||
Height = 187
|
||||
Align = alTop
|
||||
BevelInner = bvNone
|
||||
BevelOuter = bvNone
|
||||
Color = clWhite
|
||||
Ctl3D = False
|
||||
ParentColor = False
|
||||
ParentCtl3D = False
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 31
|
||||
Top = 11
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 362
|
||||
Top = 11
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20135#21697#21517#31216#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label15: TLabel
|
||||
Left = 29
|
||||
Top = 42
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #38376' '#24133#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label22: TLabel
|
||||
Left = 360
|
||||
Top = 42
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #20811' '#37325#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 360
|
||||
Top = 158
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #22836' '#32441#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 29
|
||||
Top = 71
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #32428' '#23494#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 46
|
||||
Top = 272
|
||||
Width = 51
|
||||
Height = 16
|
||||
Caption = #26465#30721#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 360
|
||||
Top = 71
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #32463' '#23494#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 29
|
||||
Top = 158
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #31576' '#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 31
|
||||
Top = 127
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #32428#32433#35268#26684#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 362
|
||||
Top = 127
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #32463#32433#35268#26684#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 29
|
||||
Top = 102
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #35268' '#26684#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 675
|
||||
Top = 71
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #19978#26426#32428#23494#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 677
|
||||
Top = 9
|
||||
Width = 39
|
||||
Height = 12
|
||||
Caption = #32463#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 8
|
||||
Width = 234
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
OnKeyPress = CYColorKeyPress
|
||||
end
|
||||
object C_Name: TEdit
|
||||
Tag = 2
|
||||
Left = 426
|
||||
Top = 8
|
||||
Width = 234
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
OnKeyPress = CYColorKeyPress
|
||||
end
|
||||
object C_YarnQty: TEdit
|
||||
Tag = 2
|
||||
Left = 426
|
||||
Top = 155
|
||||
Width = 234
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 4
|
||||
end
|
||||
object C_FinishLatitudeDensity: TEdit
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 68
|
||||
Width = 234
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
end
|
||||
object C_Width: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 38
|
||||
Width = 234
|
||||
Height = 20
|
||||
Hint = 'CYMF/'#38376#24133
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
OnBtnUpClick = C_WidthBtnUpClick
|
||||
OnBtnDnClick = C_WidthBtnDnClick
|
||||
end
|
||||
object C_GramWeight: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 426
|
||||
Top = 38
|
||||
Width = 234
|
||||
Height = 20
|
||||
Hint = 'CYKZ/'#20811#37325
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
OnBtnUpClick = C_WidthBtnUpClick
|
||||
OnBtnDnClick = C_WidthBtnDnClick
|
||||
end
|
||||
object C_FinishLongitudeDensity: TEdit
|
||||
Tag = 2
|
||||
Left = 426
|
||||
Top = 68
|
||||
Width = 234
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 6
|
||||
OnKeyPress = CYColorKeyPress
|
||||
end
|
||||
object BCIID: TEdit
|
||||
Left = 103
|
||||
Top = 270
|
||||
Width = 218
|
||||
Height = 22
|
||||
Enabled = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 7
|
||||
Visible = False
|
||||
end
|
||||
object C_LatitudeSpec: TEdit
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 124
|
||||
Width = 234
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 8
|
||||
end
|
||||
object C_LongitudeSpec: TEdit
|
||||
Tag = 2
|
||||
Left = 426
|
||||
Top = 124
|
||||
Width = 234
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 9
|
||||
OnKeyPress = CYColorKeyPress
|
||||
end
|
||||
object C_ReedNo: TEdit
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 155
|
||||
Width = 234
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 10
|
||||
end
|
||||
object C_Spec: TEdit
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 99
|
||||
Width = 567
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 11
|
||||
OnKeyPress = CYColorKeyPress
|
||||
end
|
||||
object C_MachLatitudeDensity: TEdit
|
||||
Tag = 2
|
||||
Left = 739
|
||||
Top = 68
|
||||
Width = 120
|
||||
Height = 18
|
||||
TabOrder = 12
|
||||
end
|
||||
object WB_Code: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 722
|
||||
Top = 5
|
||||
Width = 71
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 13
|
||||
OnBtnUpClick = WB_CodeBtnUpClick
|
||||
OnBtnDnClick = WB_CodeBtnDnClick
|
||||
end
|
||||
object WB_Spec: TEdit
|
||||
Tag = 2
|
||||
Left = 794
|
||||
Top = 5
|
||||
Width = 184
|
||||
Height = 20
|
||||
Enabled = False
|
||||
TabOrder = 14
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 225
|
||||
Width = 737
|
||||
Height = 382
|
||||
Align = alLeft
|
||||
TabOrder = 2
|
||||
object cxPageControl2: TcxPageControl
|
||||
Left = 1
|
||||
Top = 42
|
||||
Width = 735
|
||||
Height = 339
|
||||
Align = alClient
|
||||
Color = clWhite
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentBackground = False
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 6
|
||||
ClientRectBottom = 339
|
||||
ClientRectRight = 735
|
||||
ClientRectTop = 0
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 1
|
||||
Top = 42
|
||||
Width = 735
|
||||
Height = 339
|
||||
Align = alClient
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
object TV1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DS_1
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = 'C_Code'
|
||||
end>
|
||||
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
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV1Column1
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #21407#26009#20195#21495
|
||||
DataBinding.FieldName = 'Y_Code'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 131
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #21407#26009#21517#31216
|
||||
DataBinding.FieldName = 'Y_Name'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Moving = False
|
||||
Options.Sorting = False
|
||||
Width = 138
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #32433#32447#21697#29260
|
||||
DataBinding.FieldName = 'PinPai'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Moving = False
|
||||
Options.Sorting = False
|
||||
Width = 111
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'Y_Color'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 99
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #37197#27604
|
||||
DataBinding.FieldName = 'Y_Ratio'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 116
|
||||
end
|
||||
object TV1Column1: TcxGridDBColumn
|
||||
Caption = #29992#37327
|
||||
DataBinding.FieldName = 'Y_Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object TV1Column2: TcxGridDBColumn
|
||||
Caption = 'D'#25968
|
||||
DataBinding.FieldName = 'Denier'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = TV1
|
||||
end
|
||||
end
|
||||
object Panel3: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 735
|
||||
Height = 41
|
||||
Align = alTop
|
||||
TabOrder = 2
|
||||
object Panel4: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 184
|
||||
Height = 39
|
||||
Align = alLeft
|
||||
TabOrder = 0
|
||||
object Label20: TLabel
|
||||
Left = 37
|
||||
Top = 7
|
||||
Width = 84
|
||||
Height = 20
|
||||
Caption = #32463#32433#37197#27604
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -20
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
object ToolBar2: TToolBar
|
||||
Tag = 1
|
||||
Left = 185
|
||||
Top = 1
|
||||
Width = 237
|
||||
Height = 39
|
||||
Align = alLeft
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 91
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_ClothInfo.ImageList_new32
|
||||
EdgeInner = esNone
|
||||
EdgeOuter = esNone
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_ClothInfo.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 1
|
||||
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 ToolButton5: TToolButton
|
||||
Left = 142
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #35745#31639#29992#37327
|
||||
ImageIndex = 23
|
||||
OnClick = ToolButton5Click
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 737
|
||||
Top = 225
|
||||
Width = 796
|
||||
Height = 382
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object cxPageControl1: TcxPageControl
|
||||
Left = 1
|
||||
Top = 42
|
||||
Width = 794
|
||||
Height = 339
|
||||
Align = alClient
|
||||
Color = clWhite
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentBackground = False
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 6
|
||||
ClientRectBottom = 339
|
||||
ClientRectRight = 794
|
||||
ClientRectTop = 0
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 1
|
||||
Top = 42
|
||||
Width = 794
|
||||
Height = 339
|
||||
Align = alClient
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DS_2
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = 'C_Code'
|
||||
end>
|
||||
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
|
||||
Column = v2Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv2Column1
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
object v2Column10: TcxGridDBColumn
|
||||
Caption = #21407#26009#20195#21495
|
||||
DataBinding.FieldName = 'Y_Code'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 131
|
||||
end
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #21407#26009#21517#31216
|
||||
DataBinding.FieldName = 'Y_Name'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Moving = False
|
||||
Options.Sorting = False
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 138
|
||||
end
|
||||
object v2Column2: TcxGridDBColumn
|
||||
Caption = #32433#32447#21697#29260
|
||||
DataBinding.FieldName = 'PinPai'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Moving = False
|
||||
Options.Sorting = False
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 111
|
||||
end
|
||||
object v2Column5: TcxGridDBColumn
|
||||
Caption = #37197#27604
|
||||
DataBinding.FieldName = 'Y_Ratio'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 116
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'Y_Color'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ClothInfo.Default
|
||||
Width = 99
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Caption = #29992#37327
|
||||
DataBinding.FieldName = 'Y_Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 75
|
||||
end
|
||||
object Tv2Column2: TcxGridDBColumn
|
||||
Caption = 'D'#25968
|
||||
DataBinding.FieldName = 'Denier'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object Panel5: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 794
|
||||
Height = 41
|
||||
Align = alTop
|
||||
TabOrder = 2
|
||||
object Panel6: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 184
|
||||
Height = 39
|
||||
Align = alLeft
|
||||
TabOrder = 0
|
||||
object Label21: TLabel
|
||||
Left = 37
|
||||
Top = 7
|
||||
Width = 84
|
||||
Height = 20
|
||||
Caption = #32428#32433#37197#27604
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -20
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
object ToolBar3: TToolBar
|
||||
Tag = 1
|
||||
Left = 185
|
||||
Top = 1
|
||||
Width = 237
|
||||
Height = 39
|
||||
Align = alLeft
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 91
|
||||
Caption = 'ToolBar1'
|
||||
Color = clWhite
|
||||
DisabledImages = DataLink_ClothInfo.ImageList_new32
|
||||
EdgeInner = esNone
|
||||
EdgeOuter = esNone
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_ClothInfo.ImageList_new32
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 1
|
||||
object ToolButton4: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 2
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object ToolButton7: TToolButton
|
||||
Left = 71
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 6
|
||||
OnClick = ToolButton7Click
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 142
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #35745#31639#29992#37327
|
||||
ImageIndex = 23
|
||||
OnClick = ToolButton8Click
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
Parameters = <>
|
||||
Left = 505
|
||||
Top = 9
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 613
|
||||
Top = 17
|
||||
end
|
||||
object CDS_1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 344
|
||||
Top = 488
|
||||
end
|
||||
object DS_1: TDataSource
|
||||
DataSet = CDS_1
|
||||
Left = 432
|
||||
Top = 488
|
||||
end
|
||||
object CDS_2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 895
|
||||
Top = 474
|
||||
end
|
||||
object DS_2: TDataSource
|
||||
DataSet = CDS_2
|
||||
Left = 1000
|
||||
Top = 488
|
||||
end
|
||||
end
|
||||
696
A02基础产品管理/U_TatClothInfoInput.pas
Normal file
696
A02基础产品管理/U_TatClothInfoInput.pas
Normal file
|
|
@ -0,0 +1,696 @@
|
|||
unit U_TatClothInfoInput;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ADODB, DBClient, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGrid, ComCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, cxTextEdit,
|
||||
cxButtonEdit, StdCtrls, ExtCtrls, cxCurrencyEdit, BtnEdit, U_BaseList,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters,
|
||||
cxNavigator, dxDateRanges, dxBarBuiltInMenu, cxPC;
|
||||
|
||||
type
|
||||
TfrmTatClothInfoInput = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
ToolButton1: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ScrollBox1: TScrollBox;
|
||||
Label1: TLabel;
|
||||
Label5: TLabel;
|
||||
Label15: TLabel;
|
||||
Label22: TLabel;
|
||||
Label2: TLabel;
|
||||
Label4: TLabel;
|
||||
Label3: TLabel;
|
||||
C_Code: TEdit;
|
||||
C_Name: TEdit;
|
||||
C_YarnQty: TEdit;
|
||||
C_FinishLatitudeDensity: TEdit;
|
||||
C_Width: TBtnEditC;
|
||||
C_GramWeight: TBtnEditC;
|
||||
Label12: TLabel;
|
||||
C_FinishLongitudeDensity: TEdit;
|
||||
ToolButton6: TToolButton;
|
||||
BCIID: TEdit;
|
||||
Label6: TLabel;
|
||||
Label7: TLabel;
|
||||
Label8: TLabel;
|
||||
C_LatitudeSpec: TEdit;
|
||||
C_LongitudeSpec: TEdit;
|
||||
C_ReedNo: TEdit;
|
||||
Label9: TLabel;
|
||||
C_Spec: TEdit;
|
||||
Panel1: TPanel;
|
||||
cxPageControl2: TcxPageControl;
|
||||
cxGrid1: TcxGrid;
|
||||
TV1: TcxGridDBTableView;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
TV1Column1: TcxGridDBColumn;
|
||||
TV1Column2: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
Panel3: TPanel;
|
||||
Panel4: TPanel;
|
||||
Label20: TLabel;
|
||||
ToolBar2: TToolBar;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
ToolButton5: TToolButton;
|
||||
Panel2: TPanel;
|
||||
cxPageControl1: TcxPageControl;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
v2Column10: TcxGridDBColumn;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
v2Column2: TcxGridDBColumn;
|
||||
v2Column5: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
Tv2Column2: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
Panel5: TPanel;
|
||||
Panel6: TPanel;
|
||||
Label21: TLabel;
|
||||
ToolBar3: TToolBar;
|
||||
ToolButton4: TToolButton;
|
||||
ToolButton7: TToolButton;
|
||||
ToolButton8: TToolButton;
|
||||
CDS_1: TClientDataSet;
|
||||
DS_1: TDataSource;
|
||||
CDS_2: TClientDataSet;
|
||||
DS_2: TDataSource;
|
||||
Label10: TLabel;
|
||||
C_MachLatitudeDensity: TEdit;
|
||||
Label11: TLabel;
|
||||
WB_Code: TBtnEditC;
|
||||
WB_Spec: TEdit;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure CYColorKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure CYKZExit(Sender: TObject);
|
||||
procedure CYMFExit(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure CYJGGYBtnDnClick(Sender: TObject);
|
||||
procedure C_WidthBtnDnClick(Sender: TObject);
|
||||
procedure C_WidthBtnUpClick(Sender: TObject);
|
||||
procedure ToolButton6Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure ToolButton7Click(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure ToolButton5Click(Sender: TObject);
|
||||
procedure ToolButton8Click(Sender: TObject);
|
||||
procedure WB_CodeBtnUpClick(Sender: TObject);
|
||||
procedure WB_CodeBtnDnClick(Sender: TObject);
|
||||
private
|
||||
canshu1: string;
|
||||
Fint: Integer;
|
||||
procedure InitGrid();
|
||||
function SaveData(): Boolean;
|
||||
procedure CALCYarnQty();
|
||||
{ Private declarations }
|
||||
public
|
||||
FBCIID, FCTID: string;
|
||||
CopyInt: Integer;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmTatClothInfoInput: TfrmTatClothInfoInput;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_iniParam, U_ZDYHelp, U_AttachmentUpload, U_YarnInfoSel,
|
||||
U_WBSpecSel;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmTatClothInfoInput.CALCYarnQty();
|
||||
var
|
||||
MYarnQty, MOrdQty, MWidth, MMachLatitudeDensity: Double;
|
||||
begin
|
||||
MYarnQty := STRTOFLOATDEF(C_YarnQty.Text, 0);
|
||||
MOrdQty := 10000;
|
||||
MWidth := STRTOFLOATDEF(StringReplace(C_Width.Text, 'CM', '', [rfReplaceAll, rfIgnoreCase]), 0);
|
||||
MMachLatitudeDensity := STRTOFLOATDEF(C_MachLatitudeDensity.Text, 0);
|
||||
with CDS_1 do
|
||||
begin
|
||||
DisableControls;
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Y_Qty').Value := MYarnQty * MOrdQty * FieldByName('Y_Ratio').AsFloat / 100 / 9000 * FieldByName('Denier').AsFloat / 1000;
|
||||
Next;
|
||||
end;
|
||||
EnableControls;
|
||||
end;
|
||||
|
||||
with CDS_2 do
|
||||
begin
|
||||
DisableControls;
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Y_Qty').Value := MMachLatitudeDensity * MOrdQty * MWidth * FieldByName('Y_Ratio').AsFloat / 100 / 9000 * FieldByName('Denier').AsFloat / 1000;
|
||||
Next;
|
||||
end;
|
||||
EnableControls;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.InitGrid();
|
||||
begin
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from BS_Cloth_Info where BCIID=''' + Trim(FBCIID) + '''');
|
||||
Open;
|
||||
end;
|
||||
|
||||
SCSHData(ADOQueryTemp, ScrollBox1, 2);
|
||||
SCSHData(ADOQueryTemp, ScrollBox1, 0);
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* from BS_Cloth_Yarn A ');
|
||||
sql.Add(' where YRType=''经丝'' and A.BCIID=''' + Trim(FBCIID) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryTemp, CDS_1);
|
||||
SInitCDSData(ADOQueryTemp, CDS_1);
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* from BS_Cloth_Yarn A ');
|
||||
sql.Add(' where YRType=''纬丝'' and A.BCIID=''' + Trim(FBCIID) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryTemp, CDS_2);
|
||||
SInitCDSData(ADOQueryTemp, CDS_2);
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
if CopyInt = 1 then
|
||||
begin
|
||||
FBCIID := '';
|
||||
BCIID.text := '';
|
||||
C_Code.text := '';
|
||||
|
||||
end;
|
||||
// if C_Code.text = '' then
|
||||
// begin
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add(' exec P_YP_Get_CPBH ');
|
||||
// sql.Add('@CTID=' + quotedstr(Trim(FCTID)));
|
||||
//
|
||||
// Open;
|
||||
// end;
|
||||
// end;
|
||||
// if trim(C_Code.Text) = '' then
|
||||
// begin
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add(' exec P_YP_Get_No @Str=''CP'' ');
|
||||
// Open;
|
||||
// end;
|
||||
// C_Code.Text := trim(ADOQueryTemp.FieldByName('NewC_Code').asstring);
|
||||
// end;
|
||||
|
||||
// if FCPName = '针织' then
|
||||
// begin
|
||||
// CYPUnit.text := 'KG';
|
||||
// end;
|
||||
// if FCPName = '梭织' then
|
||||
// begin
|
||||
// CYPUnit.text := 'M';
|
||||
// end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
function TfrmTatClothInfoInput.SaveData(): Boolean;
|
||||
var
|
||||
maxId, maxpbno: string;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if Trim(FBCIID) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd, maxId, 'Y', 'BS_Cloth_Info', 4, 1) = False then
|
||||
begin
|
||||
Result := False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
BCIID.Text := trim(maxId);
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxId := Trim(FBCIID);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BS_Cloth_Info where BCIID=''' + Trim(FBCIID) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FBCIID) = '' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('CTID').Value := Trim(FCTID);
|
||||
FieldByName('FILLID').Value := Trim(DCode);
|
||||
FieldByName('FILLER').Value := Trim(DName);
|
||||
FieldByName('FILLTIME').Value := SGetServerDateTime(ADOQueryTemp);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('EDITER').Value := Trim(DName);
|
||||
FieldByName('EDITTIME').Value := SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('BCIID').Value := Trim(maxId);
|
||||
if trim(C_Code.Text) = '' then
|
||||
C_Code.Text := Trim(maxId);
|
||||
RTSetsavedata(ADOQueryCmd, 'BS_Cloth_Info', ScrollBox1, 2);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select count(*) as AA from BS_Cloth_Info where C_Code=''' + Trim(C_Code.Text) + '''');
|
||||
Open;
|
||||
if FieldByName('AA').AsInteger > 1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result := False;
|
||||
Application.MessageBox('编号重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
////////////////////////// 保存经丝配比表 //////////////////////////
|
||||
with CDS_1 do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Trim(CDS_1.fieldbyname('YRId').AsString) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryTemp, maxpbno, 'RJ', 'BS_Cloth_Yarn', 4, 1) = False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取配比子流水号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxpbno := Trim(CDS_1.fieldbyname('YRId').AsString);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BS_Cloth_Yarn where ');
|
||||
sql.Add(' YRId=''' + Trim(maxpbno) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(CDS_1.fieldbyname('YRId').AsString) = '' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
FieldByName('FillTime').Value := SGetServerDateTime(ADOQueryTemp);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value := Trim(DName);
|
||||
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('YRType').Value := '经丝';
|
||||
FieldByName('BCIID').Value := Trim(maxId);
|
||||
FieldByName('YRId').Value := Trim(maxpbno);
|
||||
RTSetSaveDataCDS(ADOQueryCmd, Tv2, CDS_1, 'BS_Cloth_Yarn', 0);
|
||||
Post;
|
||||
end;
|
||||
CDS_1.Edit;
|
||||
CDS_1.FieldByName('BCIID').Value := Trim(maxId);
|
||||
CDS_1.FieldByName('YRId').Value := Trim(maxpbno);
|
||||
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
////////////////////////// 保存经丝配比表 //////////////////////////
|
||||
|
||||
////////////////////////// 保存纬丝配比表 //////////////////////////
|
||||
with CDS_2 do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Trim(CDS_2.fieldbyname('YRId').AsString) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryTemp, maxpbno, 'RJ', 'BS_Cloth_Yarn', 4, 1) = False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取配比子流水号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxpbno := Trim(CDS_2.fieldbyname('YRId').AsString);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BS_Cloth_Yarn where ');
|
||||
sql.Add(' YRId=''' + Trim(maxpbno) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(CDS_2.fieldbyname('YRId').AsString) = '' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
FieldByName('FillTime').Value := SGetServerDateTime(ADOQueryTemp);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value := Trim(DName);
|
||||
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('YRType').Value := '纬丝';
|
||||
FieldByName('BCIID').Value := Trim(maxId);
|
||||
FieldByName('YRId').Value := Trim(maxpbno);
|
||||
RTSetSaveDataCDS(ADOQueryCmd, Tv2, CDS_2, 'BS_Cloth_Yarn', 0);
|
||||
Post;
|
||||
end;
|
||||
CDS_2.Edit;
|
||||
CDS_2.FieldByName('BCIID').Value := Trim(maxId);
|
||||
CDS_2.FieldByName('YRId').Value := Trim(maxpbno);
|
||||
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
////////////////////////// 保存纬丝配比表 //////////////////////////
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
FBCIID := maxId;
|
||||
Result := True;
|
||||
except
|
||||
Result := False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.CYJGGYBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
MC_Code: string;
|
||||
begin
|
||||
C_Name.SetFocus;
|
||||
if C_Name.Text = '' then
|
||||
begin
|
||||
Application.MessageBox('产品名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if trim(C_Code.Text) = '' then
|
||||
begin
|
||||
|
||||
if GetLSNo(ADOQueryCmd, MC_Code, 'C', 'BS_Cloth_Info', 4, 0) = False then
|
||||
begin
|
||||
Application.MessageBox('取最成品编号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
C_Code.Text := MC_Code;
|
||||
|
||||
end;
|
||||
CALCYarnQty();
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
ModalResult := 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmYarnInfoSel := TfrmYarnInfoSel.Create(Application);
|
||||
with frmYarnInfoSel do
|
||||
begin
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
with self.CDS_1 do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Brand').Value := frmYarnInfoSel.CDS_1.fieldbyname('Brand').Value;
|
||||
FieldByName('Y_Code').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Code').Value;
|
||||
FieldByName('Y_Name').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Name').Value;
|
||||
FieldByName('Y_Spec').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Spec').Value;
|
||||
FieldByName('Y_Color').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Color').Value;
|
||||
FieldByName('Denier').Value := frmYarnInfoSel.CDS_1.fieldbyname('Denier').Value;
|
||||
FieldByName('Y_Ratio').Value := 0;
|
||||
Post;
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmYarnInfoSel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
if Trim(CDS_1.fieldbyname('YRId').AsString) <> '' then
|
||||
begin
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete BS_Cloth_Yarn where YRId=''' + Trim(CDS_1.fieldbyname('YRId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
CDS_1.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.ToolButton4Click(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmYarnInfoSel := TfrmYarnInfoSel.Create(Application);
|
||||
with frmYarnInfoSel do
|
||||
begin
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
with self.CDS_2 do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Brand').Value := frmYarnInfoSel.CDS_1.fieldbyname('Brand').Value;
|
||||
FieldByName('Y_Code').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Code').Value;
|
||||
FieldByName('Y_Name').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Name').Value;
|
||||
FieldByName('Y_Spec').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Spec').Value;
|
||||
FieldByName('Y_Color').Value := frmYarnInfoSel.CDS_1.fieldbyname('Y_Color').Value;
|
||||
FieldByName('Denier').Value := frmYarnInfoSel.CDS_1.fieldbyname('Denier').Value;
|
||||
FieldByName('Y_Ratio').Value := 0;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmYarnInfoSel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.ToolButton5Click(Sender: TObject);
|
||||
begin
|
||||
C_Name.SetFocus;
|
||||
CALCYarnQty();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.CYColorKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
Key := #0;
|
||||
SelectNext(ActiveControl as TWinControl, True, True);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.CYKZExit(Sender: TObject);
|
||||
begin
|
||||
// if pos('G/M2', trim(CYKZ.Text)) = 0 then
|
||||
// begin
|
||||
// if pos('G/M', trim(CYKZ.Text)) = 0 then
|
||||
// begin
|
||||
// CYKZ.Text := trim(CYKZ.Text) + 'G/M2';
|
||||
// end;
|
||||
// end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.C_WidthBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text := '';
|
||||
TBtnEditC(Sender).TxtCode := '';
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.C_WidthBtnUpClick(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 TfrmTatClothInfoInput.CYMFExit(Sender: TObject);
|
||||
begin
|
||||
// if pos('"', trim(CYMF.Text)) = 0 then
|
||||
// begin
|
||||
// if pos('CM', trim(CYMF.Text)) = 0 then
|
||||
// CYMF.Text := trim(CYMF.Text) + 'CM';
|
||||
// end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.FormCreate(Sender: TObject);
|
||||
begin
|
||||
|
||||
// LaYangDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.ToolButton6Click(Sender: TObject);
|
||||
begin
|
||||
if trim(C_Code.Text) = '' then
|
||||
Exit;
|
||||
try
|
||||
frmAttachmentUpload := TfrmAttachmentUpload.Create(Application);
|
||||
with frmAttachmentUpload do
|
||||
begin
|
||||
FEditAuthority := True;
|
||||
fkeyNO := trim(C_Code.Text);
|
||||
fType := '成品档案';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmAttachmentUpload.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.ToolButton7Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_2.IsEmpty then
|
||||
Exit;
|
||||
if Trim(CDS_2.fieldbyname('YRId').AsString) <> '' then
|
||||
begin
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete BS_Cloth_Yarn where YRId=''' + Trim(CDS_2.fieldbyname('YRId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
CDS_2.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.ToolButton8Click(Sender: TObject);
|
||||
begin
|
||||
C_Name.SetFocus;
|
||||
CALCYarnQty();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.WB_CodeBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
Self.WB_Code.Text := '';
|
||||
Self.WB_Spec.Text := '';
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfoInput.WB_CodeBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmWBSpecSel := TfrmWBSpecSel.Create(Application);
|
||||
with frmWBSpecSel do
|
||||
begin
|
||||
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.WB_Code.Text := Trim(frmWBSpecSel.CDS_1.fieldbyname('WB_Code').AsString);
|
||||
Self.WB_Spec.Text := Trim(frmWBSpecSel.CDS_1.fieldbyname('WB_Spec').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmWBSpecSel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
77
A02基础产品管理/U_iniParam.pas
Normal file
77
A02基础产品管理/U_iniParam.pas
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
unit U_iniParam;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
IniFiles, SysUtils;
|
||||
|
||||
var
|
||||
Filename: string; //文件名
|
||||
iParam2: integer;
|
||||
bParam1: Boolean;
|
||||
bParam2: Boolean;
|
||||
SCXFlag: string; //生产线 根据此标志获取卷条码前缀 不能包含字母 1,2
|
||||
SCXCount: string; //机台个数
|
||||
PortNoStr: string; //端口号
|
||||
DllName: string; //端口Dll文件
|
||||
DZCDYDllName: string; //电子秤调用Dll文件
|
||||
MBDYDllName: string; // 码表调用Dll文件
|
||||
|
||||
function IsINIFile(): Boolean; //判断InI配置文件是否存在
|
||||
|
||||
procedure ReadINIFile();
|
||||
|
||||
procedure WriteINIFile();
|
||||
|
||||
implementation
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//读取ini文件设置参数
|
||||
//参数:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
procedure ReadINIFile();
|
||||
var
|
||||
programIni: Tinifile; //配置文件名
|
||||
begin
|
||||
FileName := ExtractFilePath(Paramstr(0)) + 'File.INI';
|
||||
programIni := Tinifile.create(FileName);
|
||||
SCXFlag := programIni.ReadString('生产车间配置', '卷条码机台标志', '1');
|
||||
SCXCount := programIni.ReadString('生产车间配置', '机台个数', '1');
|
||||
PortNoStr := programIni.ReadString('生产车间配置', '端口号', 'com1');
|
||||
DllName := programIni.ReadString('生产车间配置', '端口Dll文件', 'JZCRS323C.DLL');
|
||||
DZCDYDllName := programIni.ReadString('生产车间配置', '电子秤调用Dll文件', '');
|
||||
MBDYDllName := programIni.ReadString('生产车间配置', '码表调用Dll文件', '');
|
||||
programIni.Free;
|
||||
end;
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
//写设置信息到INI文件
|
||||
//参数
|
||||
//////////////////////////////////////////////////////////////////
|
||||
procedure WriteINIFile();
|
||||
var
|
||||
programIni: Tinifile; //配置文件名
|
||||
begin
|
||||
FileName := ExtractFilePath(Paramstr(0)) + 'File.INI';
|
||||
programIni := Tinifile.create(FileName);
|
||||
programIni.WriteString('生产车间配置', '卷条码机台标志', SCXFlag);
|
||||
programIni.WriteString('生产车间配置', '机台个数', SCXCount);
|
||||
programIni.WriteString('生产车间配置', '端口号', PortNoStr);
|
||||
programIni.WriteString('生产车间配置', '端口Dll文件', DllName);
|
||||
programIni.Free;
|
||||
end;
|
||||
//////////////////////////////////////////////////////////////////
|
||||
//判断InI文件是否存在
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
function IsINIFile(): Boolean;
|
||||
begin
|
||||
FileName := ExtractFilePath(Paramstr(0)) + 'File.INI';
|
||||
if FileExists(FileName) then
|
||||
Result := true
|
||||
else
|
||||
Result := false;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
220
A02基础产品管理/U_testdll.dfm
Normal file
220
A02基础产品管理/U_testdll.dfm
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
object Form1: TForm1
|
||||
Left = 203
|
||||
Top = 121
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 426
|
||||
ClientWidth = 716
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
FormStyle = fsMDIForm
|
||||
Menu = MainMenu1
|
||||
OldCreateOrder = False
|
||||
WindowState = wsMaximized
|
||||
OnClose = FormClose
|
||||
OnResize = FormResize
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 716
|
||||
Height = 25
|
||||
ButtonWidth = 57
|
||||
Caption = 'ToolBar1'
|
||||
Images = ImageList1
|
||||
TabOrder = 0
|
||||
object Edit1: TEdit
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 81
|
||||
Height = 22
|
||||
TabOrder = 0
|
||||
Text = '1'
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 81
|
||||
Top = 0
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 0
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 138
|
||||
Top = 0
|
||||
Width = 79
|
||||
Height = 22
|
||||
Caption = ' DllName'#65306
|
||||
end
|
||||
object DllName: TEdit
|
||||
Left = 217
|
||||
Top = 0
|
||||
Width = 135
|
||||
Height = 22
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object MainMenu1: TMainMenu
|
||||
Left = 232
|
||||
Top = 40
|
||||
object test1: TMenuItem
|
||||
Caption = 'test'
|
||||
OnClick = test1Click
|
||||
end
|
||||
end
|
||||
object ImageList1: TImageList
|
||||
Left = 320
|
||||
Top = 56
|
||||
Bitmap = {
|
||||
494C010101000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
|
||||
0000000000003600000028000000400000001000000001002000000000000010
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000EFEFEF000000
|
||||
0000EFEFEF00EFEFEF000000000000000000EFEFEF0000000000000000000000
|
||||
0000EFEFEF00EFEFEF0000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000EFEFEF0000000000EFEFEF00EFEFEF0000000000EFEFEF00000000008080
|
||||
00008080000000000000C0C0C000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000000000000EFEFEF00EFEFEF000000
|
||||
0000EFEFEF00EFEFEF000000000000000000C0C0C00000000000000000008080
|
||||
00008080000080800000EFEFEF00EFEFEF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000EFEFEF0000000000000000000000000000000000000000008080
|
||||
0000808000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000EFEFEF0000000000808080008080800080808000000000008080
|
||||
0000808000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000008080000000000000808080008080800080808000000000008080
|
||||
0000000000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000EFEFEF00EFEF
|
||||
EF0000000000FFFF000080800000000000008080800080808000000000000000
|
||||
0000000000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000FFFF0000FFFF0000808000000000000080808000000000008080
|
||||
0000000000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000808000008080
|
||||
000080800000FFFF0000FFFF0000FFFF00000000000080808000000000008080
|
||||
0000808000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000FFFF0000FFFF
|
||||
0000FFFF0000FFFF000000000000FFFF00000000000080808000000000008080
|
||||
0000808000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000FFFF0000FFFF0000FFFF00000000000080808000000000008080
|
||||
0000808000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000808000000000000080808000808080008080800080808000FFFF
|
||||
0000808000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000808080008080800080808000808080000000
|
||||
0000808000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000424D3E000000000000003E000000
|
||||
2800000040000000100000000100010000000000800000000000000000000000
|
||||
000000000000000000000000FFFFFF00FFFF000000000000D343000000000000
|
||||
F4810000000000009340000000000000F801000000000000F001000000000000
|
||||
F001000000000000C001000000000000C001000000000000C001000000000000
|
||||
C201000000000000C001000000000000F001000000000000F001000000000000
|
||||
FC03000000000000FFFF00000000000000000000000000000000000000000000
|
||||
000000000000}
|
||||
end
|
||||
object ADOConnection1: TADOConnection
|
||||
ConnectionString =
|
||||
'Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ' +
|
||||
'ID=sa;Initial Catalog=rzdata;Data Source=6GMFFMYKYMJDZW7'
|
||||
LoginPrompt = False
|
||||
Provider = 'SQLOLEDB.1'
|
||||
Left = 408
|
||||
Top = 64
|
||||
end
|
||||
end
|
||||
94
A02基础产品管理/U_testdll.pas
Normal file
94
A02基础产品管理/U_testdll.pas
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
unit U_testdll;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ExtCtrls, StdCtrls, Menus, ToolWin, ComCtrls, ImgList, DB, ADODB,
|
||||
System.ImageList;
|
||||
|
||||
type
|
||||
TForm1 = class(TForm)
|
||||
MainMenu1: TMainMenu;
|
||||
test1: TMenuItem;
|
||||
ToolBar1: TToolBar;
|
||||
Edit1: TEdit;
|
||||
ToolButton1: TToolButton;
|
||||
ImageList1: TImageList;
|
||||
ADOConnection1: TADOConnection;
|
||||
DllName: TEdit;
|
||||
Label1: TLabel;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure test1Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormResize(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
newh: hwnd;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
sendmessage(newh, 1034, 4, 0);
|
||||
Action := cafree;
|
||||
end;
|
||||
|
||||
procedure TForm1.test1Click(Sender: TObject);
|
||||
type
|
||||
TMyFunc = function(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; stdcall;
|
||||
var
|
||||
Tf: TMyFunc;
|
||||
Tp: TFarProc;
|
||||
Th: Thandle;
|
||||
begin
|
||||
//静态加载
|
||||
//newh:=getForm(Application,1,ADOConnection1,PChar('sa'),PChar('dsa'));
|
||||
|
||||
//动态加载
|
||||
// showMessage(intTostr(application.Handle));
|
||||
Th := LoadLibrary('ClothInfo.dll');
|
||||
if Th > 0 then
|
||||
begin
|
||||
try
|
||||
Tp := GetProcAddress(Th, 'GetDllForm');
|
||||
if Tp <> nil then
|
||||
begin
|
||||
Tf := TMyFunc(Tp);
|
||||
newh := Tf(Application, 0, strToint(edit1.text), 0, 0, PChar('ygcode'), PChar('ygname'), PChar('datebase'), PChar('title'), PChar(''), PChar(''), '', '', '', '', '', '', '', '', '');
|
||||
end
|
||||
else
|
||||
begin
|
||||
ShowMessage('打印执行错误');
|
||||
end;
|
||||
finally
|
||||
// FreeLibrary();
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
ShowMessage('找不到' + Trim(DllName.Text));
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm1.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormResize(Sender: TObject);
|
||||
begin
|
||||
sendmessage(newh, 1034, 1, 0);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
2
A02基础产品管理/consvr.ini
Normal file
2
A02基础产品管理/consvr.ini
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[SERVER]
|
||||
SERVER=192.168.88.254
|
||||
38
A02基础产品管理/testDll.cfg
Normal file
38
A02基础产品管理/testDll.cfg
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
-$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"
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
||||
136
A02基础产品管理/testDll.dof
Normal file
136
A02基础产品管理/testDll.dof
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
[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=
|
||||
Packages=
|
||||
Conditionals=
|
||||
DebugSourceDirs=
|
||||
UsePackages=0
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=D:\selfware_83398\selfware\马国钢开发代码\项目代码\self\坯布码单待检DDMD.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=
|
||||
14
A02基础产品管理/testDll.dpr
Normal file
14
A02基础产品管理/testDll.dpr
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
program testDll;
|
||||
|
||||
uses
|
||||
Forms,
|
||||
U_testdll in 'U_testdll.pas' {Form1};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
||||
184
A02基础产品管理/testDll.dproj
Normal file
184
A02基础产品管理/testDll.dproj
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{6ED24B72-E038-4A45-BA13-AC1AB432C410}</ProjectGuid>
|
||||
<MainSource>testDll.dpr</MainSource>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<TargetedPlatforms>38017</TargetedPlatforms>
|
||||
<AppType>Application</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="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
|
||||
<Cfg_1_Win32>true</Cfg_1_Win32>
|
||||
<CfgParent>Cfg_1</CfgParent>
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<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>
|
||||
<SanitizedProjectName>testDll</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>Winapi;System.Win;Data.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>
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
<Icon_MainIcon>testDll_Icon.ico</Icon_MainIcon>
|
||||
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
|
||||
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<Icon_MainIcon>testDll_Icon.ico</Icon_MainIcon>
|
||||
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
|
||||
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
|
||||
</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_1_Win32)'!=''">
|
||||
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
|
||||
</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)'!=''">
|
||||
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
|
||||
<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_testdll.pas">
|
||||
<Form>Form1</Form>
|
||||
</DCCReference>
|
||||
<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">testDll.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>
|
||||
</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')"/>
|
||||
</Project>
|
||||
2
A02基础产品管理/testDll.dproj.local
Normal file
2
A02基础产品管理/testDll.dproj.local
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject/>
|
||||
BIN
A02基础产品管理/testDll.identcache
Normal file
BIN
A02基础产品管理/testDll.identcache
Normal file
Binary file not shown.
BIN
A02基础产品管理/testDll.res
Normal file
BIN
A02基础产品管理/testDll.res
Normal file
Binary file not shown.
38
A02基础产品管理/testDllDJ.cfg
Normal file
38
A02基础产品管理/testDllDJ.cfg
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
-$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"
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
||||
136
A02基础产品管理/testDllDJ.dof
Normal file
136
A02基础产品管理/testDllDJ.dof
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
[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=
|
||||
Packages=
|
||||
Conditionals=
|
||||
DebugSourceDirs=
|
||||
UsePackages=0
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=D:\selfware_83398\selfware\马国钢开发代码\项目代码\self\长阳针织(CYZZ.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=
|
||||
BIN
A02基础产品管理/testDllDJ.res
Normal file
BIN
A02基础产品管理/testDllDJ.res
Normal file
Binary file not shown.
BIN
A02基础产品管理/testDll_Icon.ico
Normal file
BIN
A02基础产品管理/testDll_Icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 766 B |
4814
T00贸易通用窗体/U_PurchaseContractSel.dfm
Normal file
4814
T00贸易通用窗体/U_PurchaseContractSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
275
T00贸易通用窗体/U_PurchaseContractSel.pas
Normal file
275
T00贸易通用窗体/U_PurchaseContractSel.pas
Normal file
|
|
@ -0,0 +1,275 @@
|
|||
unit U_PurchaseContractSel;
|
||||
|
||||
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, cxPC;
|
||||
|
||||
type
|
||||
TfrmPurchaseContractSel = 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;
|
||||
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;
|
||||
cxTabControl1: TcxTabControl;
|
||||
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();
|
||||
{ Private declarations }
|
||||
public
|
||||
FCoType, FAuthority, FConNo, FC_Code: string;
|
||||
|
||||
FPrtType: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmPurchaseContractSel: TfrmPurchaseContractSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmPurchaseContractSel.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 TfrmPurchaseContractSel.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 TfrmPurchaseContractSel.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmPurchaseContractSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
ConNo.SetFocus;
|
||||
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmPurchaseContractSel.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(' where isnull(A.status,''0'')=''9''');
|
||||
if trim(fconNo) <> '' then
|
||||
sql.Add(' and conNo=' + quotedstr(fconNo));
|
||||
if trim(fC_Code) <> '' then
|
||||
sql.Add(' and C_Code=' + quotedstr(fC_Code));
|
||||
sql.Add(' and A.ConType in (''采购'',''加工'') ');
|
||||
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
if FPrtType = '坯布' then
|
||||
begin
|
||||
sql.Add(' and TPNPlan=''坯布采购'' ');
|
||||
sql.add('and NOT exists(select X.FromPurSId from Bs_Cloth_IO X where X.FromPurSId=B.ConSId ) ');
|
||||
end;
|
||||
if FPrtType = '成品' then
|
||||
begin
|
||||
sql.Add(' and TPNPlan=''成品采购'' ');
|
||||
sql.add('and NOT exists(select X.FromPurSId from Bs_Cloth_IO X where X.FromPurSId=B.ConSId ) ');
|
||||
end;
|
||||
if FPrtType = '纱线' then
|
||||
begin
|
||||
sql.Add(' and TPNType=''纱线'' ');
|
||||
sql.add('and NOT exists(select X.FromPurSId from BS_Yarn_IO X where X.FromPurSId=B.ConSId ) ');
|
||||
end;
|
||||
if FPrtType = '母粒' then
|
||||
begin
|
||||
sql.Add(' and TPNType=''母粒'' ');
|
||||
sql.add('and NOT exists(select X.FromPurSId from Bs_Product_IO X where X.FromPurSId=B.ConSId ) ');
|
||||
end;
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
if FPrtType = '坯布' then
|
||||
begin
|
||||
sql.Add(' and TPNPlan=''坯布采购'' ');
|
||||
end;
|
||||
if FPrtType = '成品' then
|
||||
begin
|
||||
sql.Add(' and TPNPlan=''成品采购'' ');
|
||||
end;
|
||||
if FPrtType = '纱线' then
|
||||
begin
|
||||
sql.Add(' and TPNType=''纱线'' ');
|
||||
end;
|
||||
if FPrtType = '母粒' then
|
||||
begin
|
||||
sql.Add(' and TPNType=''母粒'' ');
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPurchaseContractSel.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_1, True);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmPurchaseContractSel.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_1, False);
|
||||
end;
|
||||
|
||||
procedure TfrmPurchaseContractSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
InitGrid();
|
||||
|
||||
ReadCxGrid(Trim(self.Caption), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmPurchaseContractSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmPurchaseContractSel.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(Trim(self.Caption), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmPurchaseContractSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ConNo.SetFocus;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmPurchaseContractSel.TV1DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmPurchaseContractSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmPurchaseContractSel := nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
4734
T00贸易通用窗体/U_TradePlanSel.dfm
Normal file
4734
T00贸易通用窗体/U_TradePlanSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
190
T00贸易通用窗体/U_TradePlanSel.pas
Normal file
190
T00贸易通用窗体/U_TradePlanSel.pas
Normal file
|
|
@ -0,0 +1,190 @@
|
|||
unit U_TradePlanSel;
|
||||
|
||||
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, cxCheckBox,
|
||||
cxCalendar;
|
||||
|
||||
type
|
||||
TfrmTradePlanSel = 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;
|
||||
GPM_1: TcxGridPopupMenu;
|
||||
ImageList1: TImageList;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
cxStyle1: TcxStyle;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1OrderNo: TcxGridDBColumn;
|
||||
v1ConNo: TcxGridDBColumn;
|
||||
Tv1Column11: TcxGridDBColumn;
|
||||
v1OrdDefStr1: TcxGridDBColumn;
|
||||
v1MPRTCodeName: TcxGridDBColumn;
|
||||
v1MPRTSpec: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
v1MPRTMF: TcxGridDBColumn;
|
||||
v1MPRTKZ: TcxGridDBColumn;
|
||||
v1PRTColor: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1PRTOrderQty: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1DeliveryDate: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Label3: TLabel;
|
||||
Label2: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
Label7: TLabel;
|
||||
Label8: TLabel;
|
||||
OrderNo: TEdit;
|
||||
C_Name: TEdit;
|
||||
C_Color: TEdit;
|
||||
C_ColorNo: TEdit;
|
||||
C_Pattern: TEdit;
|
||||
C_Code: TEdit;
|
||||
ConNo: TEdit;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure OrderNoChange(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
FCoType, FAuthority: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmTradePlanSel: TfrmTradePlanSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmTradePlanSel.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 TfrmTradePlanSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmTradePlanSel := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmTradePlanSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmTradePlanSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* from V_Trade_Plan_Fty A ');
|
||||
sql.add('where Status=''9'' ');
|
||||
// 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 TfrmTradePlanSel.OrderNoChange(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 TfrmTradePlanSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
ReadCxGrid('单位名称' + Trim(FCoType), TV1, '自定义数据');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmTradePlanSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmTradePlanSel.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('单位名称' + Trim(FCoType), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTradePlanSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmTradePlanSel.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
4810
T00贸易通用窗体/U_TradeSalesContractSel.dfm
Normal file
4810
T00贸易通用窗体/U_TradeSalesContractSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
221
T00贸易通用窗体/U_TradeSalesContractSel.pas
Normal file
221
T00贸易通用窗体/U_TradeSalesContractSel.pas
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
unit U_TradeSalesContractSel;
|
||||
|
||||
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
|
||||
TfrmTradeSalesContractSel = 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, FConNo, FC_Code: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmTradeSalesContractSel: TfrmTradeSalesContractSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmTradeSalesContractSel.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 TfrmTradeSalesContractSel.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 TfrmTradeSalesContractSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
|
||||
ConNo.SetFocus;
|
||||
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmTradeSalesContractSel.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(' 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));
|
||||
Open;
|
||||
end;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS(ADOQueryMain, CDS_1);
|
||||
SInitCDSData(ADOQueryMain, CDS_1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTradeSalesContractSel.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_1, True);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTradeSalesContractSel.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_1, False);
|
||||
end;
|
||||
|
||||
procedure TfrmTradeSalesContractSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
InitGrid();
|
||||
|
||||
ReadCxGrid(Trim(self.Caption), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTradeSalesContractSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmTradeSalesContractSel.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(Trim(self.Caption), TV1, '自定义数据');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTradeSalesContractSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ConNo.SetFocus;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmTradeSalesContractSel.TV1DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmTradeSalesContractSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
frmTradeSalesContractSel := nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
4
T02贸易汇总仓库/File.INI
Normal file
4
T02贸易汇总仓库/File.INI
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[生产车间配置]
|
||||
卷条码机台标志=99
|
||||
成品DLL文件=CYZZ.dll
|
||||
成品DLL调用号=11
|
||||
7
T02贸易汇总仓库/FileHelp.ini
Normal file
7
T02贸易汇总仓库/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
|
||||
BIN
T02贸易汇总仓库/InformationBase_Icon.ico
Normal file
BIN
T02贸易汇总仓库/InformationBase_Icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 766 B |
23
T02贸易汇总仓库/ProjectGroup1.bpg
Normal file
23
T02贸易汇总仓库/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)
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user