~
This commit is contained in:
parent
d40c72dd65
commit
1971993b03
|
@ -1,6 +1,5 @@
|
||||||
[SERVER]
|
[SERVER]
|
||||||
服务器地址=122.226.88.254
|
服务器地址=101.132.143.144
|
||||||
服务器地址类型=10
|
服务器地址类型=943
|
||||||
是否自动更新=1
|
是否自动更新=1
|
||||||
软件名称=华恒管理软件
|
软件名称=恒铭纺织管理软件
|
||||||
122.226.88.254
|
|
|
@ -22,7 +22,7 @@ object frmCPTypeBM: TfrmCPTypeBM
|
||||||
Width = 854
|
Width = 854
|
||||||
Height = 33
|
Height = 33
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 83
|
ButtonWidth = 107
|
||||||
Caption = 'ToolBar1'
|
Caption = 'ToolBar1'
|
||||||
Color = clSkyBlue
|
Color = clSkyBlue
|
||||||
DisabledImages = BaseData10_DataLink.ThreeImgList
|
DisabledImages = BaseData10_DataLink.ThreeImgList
|
||||||
|
@ -64,9 +64,16 @@ object frmCPTypeBM: TfrmCPTypeBM
|
||||||
ImageIndex = 17
|
ImageIndex = 17
|
||||||
OnClick = TBDelClick
|
OnClick = TBDelClick
|
||||||
end
|
end
|
||||||
object TBClose: TToolButton
|
object ToolButton2: TToolButton
|
||||||
Left = 276
|
Left = 276
|
||||||
Top = 0
|
Top = 0
|
||||||
|
Caption = #39029#22836#22270#29255#19978#20256
|
||||||
|
ImageIndex = 68
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 383
|
||||||
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20851#38381
|
Caption = #20851#38381
|
||||||
ImageIndex = 55
|
ImageIndex = 55
|
||||||
|
|
|
@ -42,6 +42,7 @@ type
|
||||||
CPTopName: TEdit;
|
CPTopName: TEdit;
|
||||||
CPName: TEdit;
|
CPName: TEdit;
|
||||||
CPNo: TEdit;
|
CPNo: TEdit;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure TBRafreshClick(Sender: TObject);
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
@ -52,6 +53,7 @@ type
|
||||||
procedure TBDelClick(Sender: TObject);
|
procedure TBDelClick(Sender: TObject);
|
||||||
procedure CPNameKeyPress(Sender: TObject; var Key: Char);
|
procedure CPNameKeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
PState: Integer;
|
PState: Integer;
|
||||||
|
@ -68,7 +70,7 @@ var
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
U_DataLink, U_Fun;
|
U_DataLink, U_Fun,U_FileUp;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
|
@ -266,5 +268,24 @@ begin
|
||||||
InitTree();
|
InitTree();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPTypeBM.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmFileUp := TfrmFileUp.Create(Application);
|
||||||
|
with frmFileUp do
|
||||||
|
begin
|
||||||
|
Code.Text :='ҳͷͼƬ';
|
||||||
|
CYID :='YTTP20250101';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
// Self.InitGrid();
|
||||||
|
// Self.CDS_Main.Locate('CYID', CYID, []);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmFileUp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,21 @@ interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
||||||
Windows,Messages,forms,OleCtnrs,DateUtils, ExtCtrls, AppEvnts, cxClasses;
|
Windows,Messages,forms,OleCtnrs,DateUtils, ExtCtrls, AppEvnts, cxClasses,
|
||||||
|
dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
|
||||||
|
dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
|
||||||
|
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans,
|
||||||
|
dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
|
||||||
|
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||||
|
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||||
|
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||||
|
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||||
|
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||||
|
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
|
||||||
|
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
||||||
|
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
||||||
|
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
|
||||||
|
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue;
|
||||||
var
|
var
|
||||||
DConString:String; {全局连接字符串}
|
DConString:String; {全局连接字符串}
|
||||||
server, dtbase, user, pswd: String; {数据库连接参数}
|
server, dtbase, user, pswd: String; {数据库连接参数}
|
||||||
|
@ -13,6 +27,7 @@ var
|
||||||
DCode:string ; //#用户编号#//
|
DCode:string ; //#用户编号#//
|
||||||
Ddatabase:string; //#数据库名称#//
|
Ddatabase:string; //#数据库名称#//
|
||||||
DTitCaption:string; //#主窗体名称#//
|
DTitCaption:string; //#主窗体名称#//
|
||||||
|
UserDataFlag:string;
|
||||||
PicSvr:string;
|
PicSvr:string;
|
||||||
DParameters1,DParameters2,DParameters3,DParameters4,DParameters5:string;// 外部参数;
|
DParameters1,DParameters2,DParameters3,DParameters4,DParameters5:string;// 外部参数;
|
||||||
DParameters6,DParameters7,DParameters8,DParameters9,DParameters10:string;//外部参数;
|
DParameters6,DParameters7,DParameters8,DParameters9,DParameters10:string;//外部参数;
|
||||||
|
|
190
基础数据/U_FileUp.dfm
Normal file
190
基础数据/U_FileUp.dfm
Normal file
|
@ -0,0 +1,190 @@
|
||||||
|
object frmFileUp: TfrmFileUp
|
||||||
|
Left = 247
|
||||||
|
Top = 162
|
||||||
|
Width = 660
|
||||||
|
Height = 441
|
||||||
|
Caption = #19978#20256#25991#20214
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object cxGrid7: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 41
|
||||||
|
Width = 581
|
||||||
|
Height = 361
|
||||||
|
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 FileDate: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #19978#20256#26085#26399
|
||||||
|
DataBinding.FieldName = 'FileDate'
|
||||||
|
FooterAlignmentHorz = taCenter
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 104
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel6: TcxGridLevel
|
||||||
|
GridView = TV7
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel16: TPanel
|
||||||
|
Left = 190
|
||||||
|
Top = 126
|
||||||
|
Width = 138
|
||||||
|
Height = 30
|
||||||
|
BevelInner = bvRaised
|
||||||
|
Caption = #27491#22312#19978#20256#12290#12290#12290
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ToolBar6: TToolBar
|
||||||
|
Left = 581
|
||||||
|
Top = 41
|
||||||
|
Width = 63
|
||||||
|
Height = 361
|
||||||
|
Align = alRight
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Flat = True
|
||||||
|
Images = BaseData10_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 2
|
||||||
|
object FileUp: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #19978#20256
|
||||||
|
ImageIndex = 109
|
||||||
|
Wrap = True
|
||||||
|
OnClick = FileUpClick
|
||||||
|
end
|
||||||
|
object FileDel: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Wrap = True
|
||||||
|
OnClick = FileDelClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 644
|
||||||
|
Height = 41
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 3
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 8
|
||||||
|
Top = 14
|
||||||
|
Width = 68
|
||||||
|
Height = 16
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Image2: TImage
|
||||||
|
Left = 445
|
||||||
|
Top = 9
|
||||||
|
Width = 60
|
||||||
|
Height = 28
|
||||||
|
end
|
||||||
|
object Code: TEdit
|
||||||
|
Left = 78
|
||||||
|
Top = 9
|
||||||
|
Width = 211
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 0
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ODPat: TOpenDialog
|
||||||
|
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||||
|
Left = 404
|
||||||
|
Top = 197
|
||||||
|
end
|
||||||
|
object IdFTP1: TIdFTP
|
||||||
|
MaxLineAction = maException
|
||||||
|
ReadTimeout = 0
|
||||||
|
ProxySettings.ProxyType = fpcmNone
|
||||||
|
ProxySettings.Port = 0
|
||||||
|
Left = 405
|
||||||
|
Top = 236
|
||||||
|
end
|
||||||
|
object SaveDialog1: TSaveDialog
|
||||||
|
Left = 409
|
||||||
|
Top = 285
|
||||||
|
end
|
||||||
|
object ADOQueryFile: TADOQuery
|
||||||
|
Connection = BaseData10_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 488
|
||||||
|
Top = 144
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ADOQueryFile
|
||||||
|
Left = 392
|
||||||
|
Top = 168
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BaseData10_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 496
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = BaseData10_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 504
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
end
|
375
基础数据/U_FileUp.pas
Normal file
375
基础数据/U_FileUp.pas
Normal file
|
@ -0,0 +1,375 @@
|
||||||
|
unit U_FileUp;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||||
|
cxEdit, DB, cxDBData, ComCtrls, ToolWin, ExtCtrls, cxGridLevel,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||||||
|
cxControls, cxGridCustomView, cxGrid, IdBaseComponent, IdComponent,
|
||||||
|
IdTCPConnection, IdTCPClient, IdFTP, StdCtrls, ADODB, jpeg, BtnEdit, IniFiles,
|
||||||
|
strutils, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
|
||||||
|
dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee,
|
||||||
|
dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
|
||||||
|
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
|
||||||
|
dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
|
||||||
|
dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
|
||||||
|
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
|
||||||
|
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
|
||||||
|
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||||
|
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven,
|
||||||
|
dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
|
||||||
|
dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
|
||||||
|
dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint,
|
||||||
|
dxSkinXmas2008Blue, dxSkinscxPCPainter;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmFileUp = class(TForm)
|
||||||
|
cxGrid7: TcxGrid;
|
||||||
|
TV7: TcxGridDBTableView;
|
||||||
|
FileName: TcxGridDBColumn;
|
||||||
|
FileDate: TcxGridDBColumn;
|
||||||
|
cxGridLevel6: TcxGridLevel;
|
||||||
|
Panel16: TPanel;
|
||||||
|
ToolBar6: TToolBar;
|
||||||
|
FileUp: TToolButton;
|
||||||
|
FileDel: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
Code: TEdit;
|
||||||
|
ODPat: TOpenDialog;
|
||||||
|
IdFTP1: TIdFTP;
|
||||||
|
SaveDialog1: TSaveDialog;
|
||||||
|
ADOQueryFile: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
Image2: TImage;
|
||||||
|
procedure FileUpClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FileDelClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
private
|
||||||
|
lstPat: TStringList;
|
||||||
|
AJpeg: TJPEGImage;
|
||||||
|
procedure CreThumb(AJPeg: TJPEGImage; Image1: TImage; Width, Height: Integer);
|
||||||
|
procedure SaveImageOther(FTFID: string);
|
||||||
|
procedure ReadINIFile10();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
CYID: string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmFileUp: TfrmFileUp;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmFileUp.ReadINIFile10();
|
||||||
|
var
|
||||||
|
programIni: Tinifile; //配置文件名
|
||||||
|
FileName: string;
|
||||||
|
begin
|
||||||
|
FileName := ExtractFilePath(Paramstr(0)) + 'SYSTEMSET.INI';
|
||||||
|
programIni := Tinifile.create(FileName);
|
||||||
|
server := programIni.ReadString('SERVER', '服务器地址', '127.0.0.1');
|
||||||
|
programIni.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFileUp.FileUpClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i, j: Integer;
|
||||||
|
PatFile: string;
|
||||||
|
FTPPath, FConNo, MaxNo: string;
|
||||||
|
AJpeg: TJPEGImage;
|
||||||
|
myStream: TADOBlobStream;
|
||||||
|
begin
|
||||||
|
if Trim(Code.Text) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('编号不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
lstPat.Clear;
|
||||||
|
if ODPat.Execute then
|
||||||
|
begin
|
||||||
|
lstPat.AddStrings(ODPat.Files);
|
||||||
|
end;
|
||||||
|
if lstPat.Count > 0 then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ReadINIFile10();
|
||||||
|
server := ReadINIFileStr('SYSTEMSET.INI', 'SERVER', '服务器地址', '127.0.0.1');
|
||||||
|
// IdFTP1.Host := server; //PicSvr;
|
||||||
|
IdFTP1.Host := PicSvr; //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 XD_File');
|
||||||
|
sql.Add('where CYID=''' + trim(CYID) + ''' ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
// PatFile:=Copy(ExtractFileName(lstPat[i]),(Pos('.',ExtractFileName(lstPat[i]))+1),(Length(ExtractFileName(lstPat[i]))-Pos('.',ExtractFileName(lstPat[i]))) ) ;
|
||||||
|
PatFile := trim(Code.Text) + '-' + inttostr(ADOQueryTemp.fieldbyname('BH').AsInteger) + '.' + Copy(ExtractFileName(lstPat[i]), (Pos('.', ExtractFileName(lstPat[i])) + 1), (Length(ExtractFileName(lstPat[i])) - Pos('.', ExtractFileName(lstPat[i]))));
|
||||||
|
|
||||||
|
AJpeg.LoadFromFile(ExtractFileName(lstPat[i]));
|
||||||
|
CreThumb(AJpeg, Image2, 160, 120);
|
||||||
|
|
||||||
|
if IdFTP1.Connected then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
IdFTP1.Put(lstPat[i], Trim(UserDataFlag + 'YMTP') + '\' + Trim(PatFile));
|
||||||
|
|
||||||
|
if GetLSNo(ADOQueryCmd, MaxNo, 'YP', 'XD_File', 4, 1) = False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取图片最大号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from XD_File where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('XFID').Value := Trim(MaxNo);
|
||||||
|
FieldByName('CYID').Value := Trim(CYID);
|
||||||
|
FieldByName('CYNO').Value := Trim(Code.Text);
|
||||||
|
FieldByName('filename').Value := Trim(PatFile);
|
||||||
|
FieldByName('FileDate').Value := SGetServerDate(ADOQueryTemp);
|
||||||
|
fieldbyname('FileType').value := Trim('页面图片');
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
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);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value := Trim(DName);
|
||||||
|
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('TFID').Value := Trim(MaxNo);
|
||||||
|
FieldByName('WBID').Value := Trim(CYID);
|
||||||
|
FieldByName('TFType').Value := '样品';
|
||||||
|
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
|
||||||
|
AJpeg.Assign(Image2.Picture.Graphic);
|
||||||
|
AJpeg.SaveToStream(myStream);
|
||||||
|
myStream.Free;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update CP_YDang Set TPFlag=1 where CYID=''' + Trim(CYID) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
AJpeg.Free;
|
||||||
|
except
|
||||||
|
AJpeg.Free;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('图片上传失败!', '提示', 0);
|
||||||
|
end;
|
||||||
|
if IdFTP1.Connected then
|
||||||
|
IdFTP1.Quit;
|
||||||
|
with ADOQueryFile do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from XD_File where CYID=''' + Trim(CYID) + '''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
{ with ADOQueryFile do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||||
|
SQL.Add(' and FileType=''YP''');
|
||||||
|
Open;
|
||||||
|
end;}
|
||||||
|
Panel16.Visible := False;
|
||||||
|
if i > 0 then
|
||||||
|
Application.MessageBox(PChar(inttostr(i) + '个文件上传成功!'), '提示', 0);
|
||||||
|
ModalResult := 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFileUp.CreThumb(AJPeg: TJPEGImage; Image1: TImage; Width, Height: Integer);
|
||||||
|
var
|
||||||
|
Bitmap: TBitmap;
|
||||||
|
Ratio: Double;
|
||||||
|
ARect: TRect;
|
||||||
|
AHeight, AHeightOffset: Integer;
|
||||||
|
AWidth, AWidthOffset: Integer;
|
||||||
|
begin
|
||||||
|
Bitmap := TBitmap.Create;
|
||||||
|
try
|
||||||
|
Ratio := AJPeg.Width / AJPeg.Height;
|
||||||
|
if Ratio > 1.333 then
|
||||||
|
begin
|
||||||
|
AHeight := Round(Width / Ratio);
|
||||||
|
AHeightOffset := (Height - AHeight) div 2;
|
||||||
|
AWidth := Width;
|
||||||
|
AWidthOffset := 0;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
AWidth := Round(Height * Ratio);
|
||||||
|
AWidthOffset := (Width - AWidth) div 2;
|
||||||
|
AHeight := Height;
|
||||||
|
AHeightOffset := 0;
|
||||||
|
end;
|
||||||
|
Bitmap.Width := Width;
|
||||||
|
Bitmap.Height := Height;
|
||||||
|
Bitmap.Canvas.Brush.Color := clBtnFace;
|
||||||
|
Bitmap.Canvas.FillRect(Rect(0, 0, Width, Height));
|
||||||
|
ARect := Rect(AWidthOffset, AHeightOffset, AWidth + AWidthOffset, AHeight + AHeightOffset);
|
||||||
|
Bitmap.Canvas.StretchDraw(ARect, AJPeg);
|
||||||
|
Image1.Picture.Assign(Bitmap);
|
||||||
|
finally
|
||||||
|
Bitmap.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFileUp.SaveImageOther(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(CYID);
|
||||||
|
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 TfrmFileUp.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
lstPat := TStringList.Create;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFileUp.FileDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add(' Delete XD_File where XFID=''' + Trim(ADOQueryFile.fieldbyname('XFID').AsString) + '''');
|
||||||
|
SQL.Add(' Delete TP_File where TFID=''' + Trim(ADOQueryFile.fieldbyname('XFID').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryFile do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from XD_File where CYID=''' + Trim(CYID) + '''');
|
||||||
|
SQL.Add(' and FileType=''页面图片''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryFile.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update CP_YDang Set TPFlag=0 where CYID=''' + Trim(CYID) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFileUp.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
with ADOQueryFile do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from XD_File where CYID=''' + Trim(CYID) + '''');
|
||||||
|
SQL.Add(' and FileType=''页面图片''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
|
@ -69,7 +69,7 @@ begin
|
||||||
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
||||||
if trim(DataBaseStr) <> '' then
|
if trim(DataBaseStr) <> '' then
|
||||||
DConString := DataBaseStr;
|
DConString := DataBaseStr;
|
||||||
|
// DParameters2:='Å÷²¼³§';
|
||||||
// DParameters1:='²éѯ';
|
// DParameters1:='²éѯ';
|
||||||
// DParameters1:='1';
|
// DParameters1:='1';
|
||||||
// DataBase:='¼Ó¹¤³§';
|
// DataBase:='¼Ó¹¤³§';
|
||||||
|
@ -128,8 +128,8 @@ begin
|
||||||
with frmZdyAttachGYS do
|
with frmZdyAttachGYS do
|
||||||
begin
|
begin
|
||||||
caption := Trim(Title);
|
caption := Trim(Title);
|
||||||
// fDEFstr5:=trim('');
|
fDEFstr5:=trim(DParameters2);
|
||||||
fDEFstr5 := trim(DataBase);
|
// fDEFstr5 := trim(DataBase);
|
||||||
FormStyle := mstyle;
|
FormStyle := mstyle;
|
||||||
windowState := mstate;
|
windowState := mstate;
|
||||||
BorderStyle := mborderstyle;
|
BorderStyle := mborderstyle;
|
||||||
|
|
227
基础资料维护(BaseInfo.dll)/U_ZDYHelpSel.dfm
Normal file
227
基础资料维护(BaseInfo.dll)/U_ZDYHelpSel.dfm
Normal file
|
@ -0,0 +1,227 @@
|
||||||
|
object frmZDYHelpSel: TfrmZDYHelpSel
|
||||||
|
Left = 392
|
||||||
|
Top = 169
|
||||||
|
Width = 574
|
||||||
|
Height = 598
|
||||||
|
Caption = #39033#30446#32500#25252
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnClose = FormClose
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 73
|
||||||
|
Width = 558
|
||||||
|
Height = 486
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
object TV1: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
OnCellDblClick = TV1CellDblClick
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
object V1Code: TcxGridDBColumn
|
||||||
|
Caption = #32534#21495
|
||||||
|
DataBinding.FieldName = 'ZDYNo'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 97
|
||||||
|
end
|
||||||
|
object V1Column1: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 48
|
||||||
|
end
|
||||||
|
object V1Name: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #21517#31216
|
||||||
|
DataBinding.FieldName = 'ZDYName'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = V1NamePropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 208
|
||||||
|
end
|
||||||
|
object V1Note: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 57
|
||||||
|
end
|
||||||
|
object V1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #39034#24207#21495
|
||||||
|
DataBinding.FieldName = 'OrderNo'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 53
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = TV1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 558
|
||||||
|
Height = 29
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 1
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Caption = #30830#23450
|
||||||
|
ImageIndex = 41
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 59
|
||||||
|
Top = 0
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 118
|
||||||
|
Top = 0
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 177
|
||||||
|
Top = 0
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBSave: TToolButton
|
||||||
|
Left = 236
|
||||||
|
Top = 0
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 8
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBSaveClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 295
|
||||||
|
Top = 0
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 29
|
||||||
|
Width = 558
|
||||||
|
Height = 44
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 2
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 19
|
||||||
|
Top = 17
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #21517#31216
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 240
|
||||||
|
Top = 11
|
||||||
|
Width = 120
|
||||||
|
Height = 24
|
||||||
|
Caption = #27880#65306#28966#28857#31163#24320#24403#21069#32534#36753#13#10' '#21333#20803#26684#20445#23384#25968#25454#12290
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object ZDYName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 54
|
||||||
|
Top = 12
|
||||||
|
Width = 169
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ZDYNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 48
|
||||||
|
Top = 136
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 80
|
||||||
|
Top = 144
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 112
|
||||||
|
Top = 152
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ClientDataSet1
|
||||||
|
Left = 280
|
||||||
|
Top = 144
|
||||||
|
end
|
||||||
|
object ClientDataSet1: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 200
|
||||||
|
Top = 144
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 352
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
end
|
481
基础资料维护(BaseInfo.dll)/U_ZDYHelpSel.pas
Normal file
481
基础资料维护(BaseInfo.dll)/U_ZDYHelpSel.pas
Normal file
|
@ -0,0 +1,481 @@
|
||||||
|
unit U_ZDYHelpSel;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||||
|
cxEdit, DB, cxDBData, ToolWin, ComCtrls, cxGridCustomTableView,
|
||||||
|
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||||
|
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
||||||
|
cxCheckBox, cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
|
||||||
|
cxLookAndFeelPainters, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
|
||||||
|
dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
|
||||||
|
dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
|
||||||
|
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
|
||||||
|
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||||
|
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||||
|
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||||
|
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||||
|
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
|
||||||
|
dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
|
||||||
|
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
|
||||||
|
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
|
||||||
|
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
|
||||||
|
dxSkinscxPCPainter, cxNavigator;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZDYHelpSel = class(TForm)
|
||||||
|
TV1: TcxGridDBTableView;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
V1Code: TcxGridDBColumn;
|
||||||
|
V1Name: TcxGridDBColumn;
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
ClientDataSet1: TClientDataSet;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBSave: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
V1Note: TcxGridDBColumn;
|
||||||
|
V1OrderNo: TcxGridDBColumn;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZDYName: TEdit;
|
||||||
|
V1Column1: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure TBSaveClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure TBEditClick(Sender: TObject);
|
||||||
|
procedure TV1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure ZDYNameChange(Sender: TObject);
|
||||||
|
procedure V1NamePropertiesEditValueChanged(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
flag, flagname, snote, MainType, ReturnStr, FGStr: string;
|
||||||
|
fnote, forderno: Boolean;
|
||||||
|
PPSTE, JiangeStr: integer;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZDYHelpSel: TfrmZDYHelpSel;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmZDYHelpSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
Action := caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelpSel.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
// sql.Add('select * from KH_ZDY where Type='''+flag+'''');
|
||||||
|
// if Trim(MainType)<>'' then
|
||||||
|
// begin
|
||||||
|
// sql.Add(' and MainType='''+Trim(MainType)+'''');
|
||||||
|
// end;
|
||||||
|
sql.Add('select UserName as ZDYName from SY_User where UType=''跟单''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelpSel.TBAddClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
TV1.OptionsData.Editing := True;
|
||||||
|
TV1.OptionsSelection.CellSelect := True;
|
||||||
|
for i := 0 to 5 do
|
||||||
|
begin
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelpSel.TBSaveClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno: string;
|
||||||
|
begin
|
||||||
|
if ClientDataSet1.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from KH_ZDY where ZdyNo=''' + Trim(flag) + '''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('insert into KH_ZDY(ZDYNo,ZDYName,Type,MainType) select :ZDYNo,:ZDYName,:Type,:MainType ');
|
||||||
|
Parameters.ParamByName('ZDYNo').Value := Trim(flag);
|
||||||
|
Parameters.ParamByName('ZDYName').Value := Trim(flagname);
|
||||||
|
Parameters.ParamByName('Type').Value := 'Main';
|
||||||
|
Parameters.ParamByName('MainType').Value := Trim(MainType);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet1.FieldByName('ZDYNO').AsString) = '' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryTemp, maxno, 'SY', 'KH_ZDY', 3, 1) = False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大编号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
maxno := Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('delete KH_ZDY where ZDYNO=''' + Trim(ClientDataSet1.fieldbyname('ZDYNO').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if Trim(ClientDataSet1.FieldByName('ZDYName').AsString) = '' then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(maxno);
|
||||||
|
ADOQueryCmd.FieldByName('ZDYName').Value := ClientDataSet1.fieldbyname('ZDYName').AsString;
|
||||||
|
ADOQueryCmd.FieldByName('note').Value := Trim(snote);
|
||||||
|
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
|
||||||
|
ADOQueryCmd.FieldByName('Type').Value := flag;
|
||||||
|
ADOQueryCmd.FieldByName('valid').Value := 'Y';
|
||||||
|
if Trim(MainType) <> '' then
|
||||||
|
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
|
||||||
|
//ADOQueryCmd.FieldByName('sel').Value:=0;
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
ClientDataSet1.Edit;
|
||||||
|
ClientDataSet1.FieldByName('ZDYNo').Value := Trim(maxno);
|
||||||
|
ClientDataSet1.Post;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('保存成功!', '提示', 0);
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存失败!', '提示', 0);
|
||||||
|
end;
|
||||||
|
// TV1.OptionsData.Editing:=False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelpSel.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ClientDataSet1.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if (Trim(ClientDataSet1.FieldByName('ZDYNo').AsString) <> '') or (Trim(ClientDataSet1.FieldByName('ZDYname').AsString) <> '') then
|
||||||
|
begin
|
||||||
|
if application.MessageBox('确定要删除吗?', '提示信息', 1) = 2 then
|
||||||
|
exit;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete KH_ZDY where ZDYNo=''' + Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString) + '''');
|
||||||
|
SQL.Add(' and Type=''' + Trim(flag) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ClientDataSet1.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelpSel.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ModalResult := 2;
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
WriteCxGrid('自定义' + Trim(flag), TV1, '自定义数据');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelpSel.FormShow(Sender: TObject);
|
||||||
|
var
|
||||||
|
fsj, fsj1: string;
|
||||||
|
begin
|
||||||
|
{if PPSTE=1 then
|
||||||
|
begin
|
||||||
|
Application.Terminate;
|
||||||
|
Exit;
|
||||||
|
end; }
|
||||||
|
InitGrid();
|
||||||
|
fsj := Trim(flag) + '01';
|
||||||
|
fsj1 := Trim(flagname) + '01';
|
||||||
|
ReadCxGrid('自定义' + Trim(flag), TV1, '自定义数据');
|
||||||
|
{if ClientDataSet1.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('insert into KH_ZDY(ZDYNo,ZDYname,Type,note)');
|
||||||
|
sql.Add('select '''+Trim(fsj)+'''');
|
||||||
|
sql.Add(','''+Trim(fsj1)+'''');
|
||||||
|
SQL.Add(','''+Trim(flag)+'''');
|
||||||
|
sql.Add(','''+Trim(snote)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
InitGrid();
|
||||||
|
end;}
|
||||||
|
//frmZDYHelp.Caption:=Trim(flagname)+'<'+Trim(flag)+'>';
|
||||||
|
frmZDYHelpSel.Caption := Trim(flagname);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelpSel.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReturnStr := '';
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if FieldByName('SSel').AsBoolean = True then
|
||||||
|
begin
|
||||||
|
if JiangeStr <> 99 then
|
||||||
|
begin
|
||||||
|
if FGStr <> '' then
|
||||||
|
ReturnStr := ReturnStr + Trim(fieldbyname('ZDYName').AsString) + FGStr
|
||||||
|
else
|
||||||
|
ReturnStr := ReturnStr + Trim(fieldbyname('ZDYName').AsString) + ';'
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ReturnStr := ReturnStr + Trim(fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if JiangeStr <> 99 then
|
||||||
|
ReturnStr := Copy(ReturnStr, 1, Length(ReturnStr) - 1);
|
||||||
|
ModalResult := 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelpSel.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
TV1.OptionsData.Editing := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelpSel.TV1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
if TV1.OptionsData.Editing = False then
|
||||||
|
begin
|
||||||
|
ModalResult := 1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelpSel.ZDYNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
|
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelpSel.V1NamePropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno, mvalue: string;
|
||||||
|
begin
|
||||||
|
mvalue := TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue) = '' then
|
||||||
|
begin
|
||||||
|
//Application.MessageBox('名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ZdyName').Value := Trim(mvalue);
|
||||||
|
//Post;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from KH_ZDY where ZdyNo=''' + Trim(flag) + '''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('insert into KH_ZDY(ZDYNo,ZDYName,Type,MainType) select :ZDYNo,:ZDYName,:Type,:MainType ');
|
||||||
|
Parameters.ParamByName('ZDYNo').Value := Trim(flag);
|
||||||
|
Parameters.ParamByName('ZDYName').Value := Trim(flagname);
|
||||||
|
Parameters.ParamByName('Type').Value := 'Main';
|
||||||
|
Parameters.ParamByName('MainType').Value := Trim(MainType);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
//ClientDataSet1.DisableControls;
|
||||||
|
//with ClientDataSet1 do
|
||||||
|
//begin
|
||||||
|
//First;
|
||||||
|
//while not eof do
|
||||||
|
//begin
|
||||||
|
if Trim(ClientDataSet1.FieldByName('ZDYNO').AsString) = '' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryTemp, maxno, 'SY', 'KH_ZDY', 3, 1) = False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
//ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('取最大编号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
maxno := Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('select * from KH_Zdy where Type=''' + Trim(flag) + '''');
|
||||||
|
if Trim(MainType) <> '' then
|
||||||
|
SQL.Add(' and MainType=''' + Trim(MainType) + '''');
|
||||||
|
sql.Add(' and ZdyName=''' + Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty = False then
|
||||||
|
begin
|
||||||
|
if ADOQueryTemp.RecordCount > 1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
//ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('名称重复!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) = '' then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
//ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('名称重复!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if Trim(ADOQueryTemp.fieldbyname('ZdyNo').AsString) <> Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
//ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('名称重复!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('delete KH_ZDY where ZDYNO=''' + Trim(ClientDataSet1.fieldbyname('ZDYNO').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(maxno);
|
||||||
|
ADOQueryCmd.FieldByName('ZDYName').Value := ClientDataSet1.fieldbyname('ZDYName').AsString;
|
||||||
|
ADOQueryCmd.FieldByName('note').Value := Trim(snote);
|
||||||
|
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
|
||||||
|
ADOQueryCmd.FieldByName('Type').Value := flag;
|
||||||
|
ADOQueryCmd.FieldByName('valid').Value := 'Y';
|
||||||
|
if Trim(MainType) <> '' then
|
||||||
|
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
|
||||||
|
//ADOQueryCmd.FieldByName('sel').Value:=0;
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
ClientDataSet1.Edit;
|
||||||
|
ClientDataSet1.FieldByName('ZDYNo').Value := Trim(maxno);
|
||||||
|
//ClientDataSet1.Post;
|
||||||
|
// Next;
|
||||||
|
//end;
|
||||||
|
//end;
|
||||||
|
// ClientDataSet1.EnableControls;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
//Application.MessageBox('保存成功!','提示',0);
|
||||||
|
//TV1.OptionsData.Editing:=False;
|
||||||
|
//TV1.OptionsSelection.CellSelect:=False;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存失败!', '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
|
@ -91,13 +91,6 @@ object frmZdyAttInputCP: TfrmZdyAttInputCP
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 124
|
Width = 124
|
||||||
end
|
end
|
||||||
object v2defstr9: TcxGridDBColumn
|
|
||||||
Caption = #20013#25991#21517#31216
|
|
||||||
DataBinding.FieldName = 'defNote3'
|
|
||||||
PropertiesClassName = 'TcxTextEditProperties'
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Width = 103
|
|
||||||
end
|
|
||||||
object v2Column11: TcxGridDBColumn
|
object v2Column11: TcxGridDBColumn
|
||||||
Caption = #31867#22411
|
Caption = #31867#22411
|
||||||
DataBinding.FieldName = 'DEFstr5'
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
@ -178,12 +171,6 @@ object frmZdyAttInputCP: TfrmZdyAttInputCP
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 114
|
Width = 114
|
||||||
end
|
end
|
||||||
object Tv2Column1: TcxGridDBColumn
|
|
||||||
Caption = #20135#21697#32534#21495
|
|
||||||
DataBinding.FieldName = 'ZdyCode'
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Width = 60
|
|
||||||
end
|
|
||||||
object Tv2Column2: TcxGridDBColumn
|
object Tv2Column2: TcxGridDBColumn
|
||||||
Caption = #38376#24133'(cm)'
|
Caption = #38376#24133'(cm)'
|
||||||
DataBinding.FieldName = 'DEFstr1'
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
|
|
@ -53,7 +53,6 @@ type
|
||||||
v2Column1: TcxGridDBColumn;
|
v2Column1: TcxGridDBColumn;
|
||||||
cxGridLevel1: TcxGridLevel;
|
cxGridLevel1: TcxGridLevel;
|
||||||
v2Column11: TcxGridDBColumn;
|
v2Column11: TcxGridDBColumn;
|
||||||
v2defstr9: TcxGridDBColumn;
|
|
||||||
v2Column13: TcxGridDBColumn;
|
v2Column13: TcxGridDBColumn;
|
||||||
v2Mrate: TcxGridDBColumn;
|
v2Mrate: TcxGridDBColumn;
|
||||||
ToolBar2: TToolBar;
|
ToolBar2: TToolBar;
|
||||||
|
@ -68,7 +67,6 @@ type
|
||||||
ADOQueryGC: TADOQuery;
|
ADOQueryGC: TADOQuery;
|
||||||
Tv1Column1: TcxGridDBColumn;
|
Tv1Column1: TcxGridDBColumn;
|
||||||
Tv1Column2: TcxGridDBColumn;
|
Tv1Column2: TcxGridDBColumn;
|
||||||
Tv2Column1: TcxGridDBColumn;
|
|
||||||
Tv2Column2: TcxGridDBColumn;
|
Tv2Column2: TcxGridDBColumn;
|
||||||
Tv2Column3: TcxGridDBColumn;
|
Tv2Column3: TcxGridDBColumn;
|
||||||
Tv2Column4: TcxGridDBColumn;
|
Tv2Column4: TcxGridDBColumn;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
object frmZdyAttInputGYS: TfrmZdyAttInputGYS
|
object frmZdyAttInputGYS: TfrmZdyAttInputGYS
|
||||||
Left = 619
|
Left = 467
|
||||||
Top = 426
|
Top = 415
|
||||||
Width = 920
|
Width = 920
|
||||||
Height = 370
|
Height = 370
|
||||||
Caption = #20379#24212#21830#36164#26009#24405#20837
|
Caption = #20379#24212#21830#36164#26009#24405#20837
|
||||||
|
|
|
@ -15,18 +15,17 @@ uses
|
||||||
cxTextEdit, cxDropDownEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
|
cxTextEdit, cxDropDownEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
|
||||||
dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
|
dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
|
||||||
dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
|
dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
|
||||||
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans,
|
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
|
||||||
dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
|
dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
|
||||||
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
|
||||||
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
|
||||||
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
|
||||||
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||||
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven,
|
||||||
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
|
dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
|
||||||
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
|
||||||
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint,
|
||||||
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
|
dxSkinXmas2008Blue, dxSkinscxPCPainter;
|
||||||
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter;
|
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmZdyAttInputGYS = class(TForm)
|
TfrmZdyAttInputGYS = class(TForm)
|
||||||
|
@ -78,7 +77,7 @@ var
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
U_DataLink, U_Fun, U_ZDYHelp;
|
U_DataLink, U_Fun, U_ZDYHelp, U_ZDYHelpSel;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
|
@ -221,14 +220,14 @@ begin
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('select * from KH_Zdy_Attachment where ZdyCode=''' + Trim(CDS_HZ.fieldbyname('ZdyCode').AsString) + '''');
|
sql.Add('select * from KH_Zdy_Attachment where ZdyName=''' + Trim(CDS_HZ.fieldbyname('ZdyName').AsString) + '''');
|
||||||
sql.Add(' and Type=''GYS'' ');
|
sql.Add(' and Type=''GYS'' ');
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
if ADOQueryCmd.RecordCount > 1 then
|
if ADOQueryCmd.RecordCount > 1 then
|
||||||
begin
|
begin
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
Application.MessageBox('±àºÅÖØ¸´!', 'Ìáʾ', 0);
|
Application.MessageBox('Ãû³ÆÖظ´!', 'Ìáʾ', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
with CDS_HZ do
|
with CDS_HZ do
|
||||||
|
@ -267,20 +266,43 @@ end;
|
||||||
procedure TfrmZdyAttInputGYS.Tv2Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
procedure TfrmZdyAttInputGYS.Tv2Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
frmZDYHelpSel := TfrmZDYHelpSel.Create(Application);
|
||||||
with frmZDYHelp do
|
with frmZDYHelpSel do
|
||||||
begin
|
begin
|
||||||
flag := 'PRTCodeName';
|
flag := 'PRTCodeName';
|
||||||
flagname := '¸úµ¥';
|
flagname := '¸úµ¥';
|
||||||
if ShowModal = 1 then
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
ClientDataSet1.DisableControls;
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if FieldByName('SSel').AsBoolean = True then
|
||||||
begin
|
begin
|
||||||
Self.CDS_hz.Edit;
|
Self.CDS_hz.Edit;
|
||||||
|
if Self.CDS_hz.FieldByName('DEFNote2').AsString = '' then
|
||||||
|
begin
|
||||||
Self.CDS_hz.FieldByName('DEFNote2').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
Self.CDS_hz.FieldByName('DEFNote2').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Self.CDS_hz.FieldByName('DEFNote2').Value := Trim(Self.CDS_hz.fieldbyname('DEFNote2').AsString) + ',' + Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
//// Self.CDS_hz.Edit;
|
||||||
|
//// Self.CDS_hz.FieldByName('DEFNote2').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
ClientDataSet1.EnableControls;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
frmZDYHelp.Free;
|
frmZDYHelpSel.Free;
|
||||||
end;
|
end;
|
||||||
|
// Self.CDS_hz.Edit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
|
@ -91,13 +91,6 @@ object frmZdyAttInputPB: TfrmZdyAttInputPB
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 124
|
Width = 124
|
||||||
end
|
end
|
||||||
object v2defstr9: TcxGridDBColumn
|
|
||||||
Caption = #20013#25991#21517#31216
|
|
||||||
DataBinding.FieldName = 'defNote3'
|
|
||||||
PropertiesClassName = 'TcxTextEditProperties'
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Width = 103
|
|
||||||
end
|
|
||||||
object v2Column11: TcxGridDBColumn
|
object v2Column11: TcxGridDBColumn
|
||||||
Caption = #31867#22411
|
Caption = #31867#22411
|
||||||
DataBinding.FieldName = 'DEFstr5'
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
@ -163,14 +156,6 @@ object frmZdyAttInputPB: TfrmZdyAttInputPB
|
||||||
VisibleForCustomization = False
|
VisibleForCustomization = False
|
||||||
Width = 61
|
Width = 61
|
||||||
end
|
end
|
||||||
object v2Column15: TcxGridDBColumn
|
|
||||||
Caption = #20215#26684#22686#24133
|
|
||||||
DataBinding.FieldName = 'defflt1'
|
|
||||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
|
||||||
Properties.DisplayFormat = '0.##;-,0.##'
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Width = 92
|
|
||||||
end
|
|
||||||
object v2Column1: TcxGridDBColumn
|
object v2Column1: TcxGridDBColumn
|
||||||
Caption = #22791#27880
|
Caption = #22791#27880
|
||||||
DataBinding.FieldName = 'Note'
|
DataBinding.FieldName = 'Note'
|
||||||
|
@ -192,12 +177,6 @@ object frmZdyAttInputPB: TfrmZdyAttInputPB
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 60
|
Width = 60
|
||||||
end
|
end
|
||||||
object Tv2Column2: TcxGridDBColumn
|
|
||||||
Caption = #20135#21697#32534#21495
|
|
||||||
DataBinding.FieldName = 'ZdyCode'
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Width = 60
|
|
||||||
end
|
|
||||||
object Tv2Column3: TcxGridDBColumn
|
object Tv2Column3: TcxGridDBColumn
|
||||||
Caption = #38376#24133'(cm)'
|
Caption = #38376#24133'(cm)'
|
||||||
DataBinding.FieldName = 'DEFstr1'
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
@ -205,7 +184,7 @@ object frmZdyAttInputPB: TfrmZdyAttInputPB
|
||||||
Width = 60
|
Width = 60
|
||||||
end
|
end
|
||||||
object Tv2Column4: TcxGridDBColumn
|
object Tv2Column4: TcxGridDBColumn
|
||||||
Caption = #20811#37325'(g/'#13217')'
|
Caption = #31859#20811#37325
|
||||||
DataBinding.FieldName = 'DEFstr2'
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 60
|
Width = 60
|
||||||
|
|
|
@ -52,12 +52,9 @@ type
|
||||||
v2Column1: TcxGridDBColumn;
|
v2Column1: TcxGridDBColumn;
|
||||||
cxGridLevel1: TcxGridLevel;
|
cxGridLevel1: TcxGridLevel;
|
||||||
v2Column11: TcxGridDBColumn;
|
v2Column11: TcxGridDBColumn;
|
||||||
v2defstr9: TcxGridDBColumn;
|
|
||||||
v2Column13: TcxGridDBColumn;
|
v2Column13: TcxGridDBColumn;
|
||||||
v2Mrate: TcxGridDBColumn;
|
v2Mrate: TcxGridDBColumn;
|
||||||
v2Column15: TcxGridDBColumn;
|
|
||||||
Tv2Column1: TcxGridDBColumn;
|
Tv2Column1: TcxGridDBColumn;
|
||||||
Tv2Column2: TcxGridDBColumn;
|
|
||||||
Tv2Column3: TcxGridDBColumn;
|
Tv2Column3: TcxGridDBColumn;
|
||||||
Tv2Column4: TcxGridDBColumn;
|
Tv2Column4: TcxGridDBColumn;
|
||||||
Tv2Column5: TcxGridDBColumn;
|
Tv2Column5: TcxGridDBColumn;
|
||||||
|
|
|
@ -209,15 +209,6 @@ object frmZdyAttachCP: TfrmZdyAttachCP
|
||||||
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
Styles.Header = DataLink_BaseInfo.handBlack
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
object v2Column2: TcxGridDBColumn
|
|
||||||
Caption = #20135#21697#32534#21495
|
|
||||||
DataBinding.FieldName = 'ZdyCode'
|
|
||||||
PropertiesClassName = 'TcxTextEditProperties'
|
|
||||||
Visible = False
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Options.Sorting = False
|
|
||||||
Width = 94
|
|
||||||
end
|
|
||||||
object v2Column6: TcxGridDBColumn
|
object v2Column6: TcxGridDBColumn
|
||||||
Caption = #20135#21697#21517#31216
|
Caption = #20135#21697#21517#31216
|
||||||
DataBinding.FieldName = 'ZdyName'
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
@ -233,13 +224,6 @@ object frmZdyAttachCP: TfrmZdyAttachCP
|
||||||
Options.Sorting = False
|
Options.Sorting = False
|
||||||
Width = 120
|
Width = 120
|
||||||
end
|
end
|
||||||
object v2Column12: TcxGridDBColumn
|
|
||||||
Caption = #20013#25991#21517#31216
|
|
||||||
DataBinding.FieldName = 'defNote3'
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Options.Sorting = False
|
|
||||||
Width = 100
|
|
||||||
end
|
|
||||||
object v2Column5: TcxGridDBColumn
|
object v2Column5: TcxGridDBColumn
|
||||||
Caption = #39068#33394
|
Caption = #39068#33394
|
||||||
DataBinding.FieldName = 'DEFstr3'
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
@ -334,12 +318,6 @@ object frmZdyAttachCP: TfrmZdyAttachCP
|
||||||
Options.Sorting = False
|
Options.Sorting = False
|
||||||
Width = 188
|
Width = 188
|
||||||
end
|
end
|
||||||
object Tv2Column1: TcxGridDBColumn
|
|
||||||
Caption = #20135#21697#32534#21495
|
|
||||||
DataBinding.FieldName = 'ZdyCode'
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Width = 60
|
|
||||||
end
|
|
||||||
object Tv2Column2: TcxGridDBColumn
|
object Tv2Column2: TcxGridDBColumn
|
||||||
Caption = #38376#24133'(cm)'
|
Caption = #38376#24133'(cm)'
|
||||||
DataBinding.FieldName = 'DEFstr1'
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
|
|
@ -59,7 +59,6 @@ type
|
||||||
ToolButton3: TToolButton;
|
ToolButton3: TToolButton;
|
||||||
v2Column6: TcxGridDBColumn;
|
v2Column6: TcxGridDBColumn;
|
||||||
v2Column1: TcxGridDBColumn;
|
v2Column1: TcxGridDBColumn;
|
||||||
v2Column2: TcxGridDBColumn;
|
|
||||||
v2Column3: TcxGridDBColumn;
|
v2Column3: TcxGridDBColumn;
|
||||||
v2Column4: TcxGridDBColumn;
|
v2Column4: TcxGridDBColumn;
|
||||||
v2Column5: TcxGridDBColumn;
|
v2Column5: TcxGridDBColumn;
|
||||||
|
@ -71,7 +70,6 @@ type
|
||||||
DEFstr5: TComboBox;
|
DEFstr5: TComboBox;
|
||||||
v2Column7: TcxGridDBColumn;
|
v2Column7: TcxGridDBColumn;
|
||||||
v2Column11: TcxGridDBColumn;
|
v2Column11: TcxGridDBColumn;
|
||||||
v2Column12: TcxGridDBColumn;
|
|
||||||
v2Column13: TcxGridDBColumn;
|
v2Column13: TcxGridDBColumn;
|
||||||
OpenDialog1: TOpenDialog;
|
OpenDialog1: TOpenDialog;
|
||||||
ToolButton5: TToolButton;
|
ToolButton5: TToolButton;
|
||||||
|
@ -92,7 +90,6 @@ type
|
||||||
DS_GC: TDataSource;
|
DS_GC: TDataSource;
|
||||||
Tv1Column1: TcxGridDBColumn;
|
Tv1Column1: TcxGridDBColumn;
|
||||||
Tv1Column2: TcxGridDBColumn;
|
Tv1Column2: TcxGridDBColumn;
|
||||||
Tv2Column1: TcxGridDBColumn;
|
|
||||||
Tv2Column2: TcxGridDBColumn;
|
Tv2Column2: TcxGridDBColumn;
|
||||||
Tv2Column3: TcxGridDBColumn;
|
Tv2Column3: TcxGridDBColumn;
|
||||||
Tv2Column4: TcxGridDBColumn;
|
Tv2Column4: TcxGridDBColumn;
|
||||||
|
|
|
@ -208,15 +208,6 @@ object frmZdyAttachPB: TfrmZdyAttachPB
|
||||||
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
Styles.Header = DataLink_BaseInfo.handBlack
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
object v2Column2: TcxGridDBColumn
|
|
||||||
Caption = #20135#21697#32534#21495
|
|
||||||
DataBinding.FieldName = 'ZdyCode'
|
|
||||||
PropertiesClassName = 'TcxTextEditProperties'
|
|
||||||
Visible = False
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Options.Sorting = False
|
|
||||||
Width = 94
|
|
||||||
end
|
|
||||||
object v2Column6: TcxGridDBColumn
|
object v2Column6: TcxGridDBColumn
|
||||||
Caption = #20135#21697#21517#31216
|
Caption = #20135#21697#21517#31216
|
||||||
DataBinding.FieldName = 'ZdyName'
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
@ -232,13 +223,6 @@ object frmZdyAttachPB: TfrmZdyAttachPB
|
||||||
Options.Sorting = False
|
Options.Sorting = False
|
||||||
Width = 120
|
Width = 120
|
||||||
end
|
end
|
||||||
object v2Column12: TcxGridDBColumn
|
|
||||||
Caption = #20013#25991#21517#31216
|
|
||||||
DataBinding.FieldName = 'defNote3'
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Options.Sorting = False
|
|
||||||
Width = 100
|
|
||||||
end
|
|
||||||
object v2Column11: TcxGridDBColumn
|
object v2Column11: TcxGridDBColumn
|
||||||
Caption = #31867#22411
|
Caption = #31867#22411
|
||||||
DataBinding.FieldName = 'DEFstr5'
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
@ -303,13 +287,6 @@ object frmZdyAttachPB: TfrmZdyAttachPB
|
||||||
VisibleForCustomization = False
|
VisibleForCustomization = False
|
||||||
Width = 61
|
Width = 61
|
||||||
end
|
end
|
||||||
object v2defflt1: TcxGridDBColumn
|
|
||||||
Caption = #20215#26684#22686#24133
|
|
||||||
DataBinding.FieldName = 'defflt1'
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Options.Editing = False
|
|
||||||
Width = 60
|
|
||||||
end
|
|
||||||
object v2Column1: TcxGridDBColumn
|
object v2Column1: TcxGridDBColumn
|
||||||
Caption = #22791#27880
|
Caption = #22791#27880
|
||||||
DataBinding.FieldName = 'Note'
|
DataBinding.FieldName = 'Note'
|
||||||
|
@ -338,12 +315,6 @@ object frmZdyAttachPB: TfrmZdyAttachPB
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 60
|
Width = 60
|
||||||
end
|
end
|
||||||
object Tv2Column2: TcxGridDBColumn
|
|
||||||
Caption = #20135#21697#32534#21495
|
|
||||||
DataBinding.FieldName = 'ZdyCode'
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Width = 60
|
|
||||||
end
|
|
||||||
object Tv2Column3: TcxGridDBColumn
|
object Tv2Column3: TcxGridDBColumn
|
||||||
Caption = #38376#24133'(cm)'
|
Caption = #38376#24133'(cm)'
|
||||||
DataBinding.FieldName = 'DEFstr1'
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
@ -351,7 +322,7 @@ object frmZdyAttachPB: TfrmZdyAttachPB
|
||||||
Width = 60
|
Width = 60
|
||||||
end
|
end
|
||||||
object Tv2Column4: TcxGridDBColumn
|
object Tv2Column4: TcxGridDBColumn
|
||||||
Caption = #20811#37325'(g/'#13217')'
|
Caption = #31859#20811#37325
|
||||||
DataBinding.FieldName = 'DEFstr2'
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 60
|
Width = 60
|
||||||
|
|
|
@ -3,38 +3,38 @@ unit U_ZdyAttachPB;
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, ComObj,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
ComObj, Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB,
|
||||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
ADODB, cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||||
cxButtonEdit, cxTextEdit, Menus, cxLookAndFeelPainters, cxButtons,
|
cxTextEdit, Menus, cxLookAndFeelPainters, cxButtons, cxLookAndFeels,
|
||||||
cxLookAndFeels, cxNavigator, dxSkinsCore, dxSkinBlack, dxSkinBlue,
|
cxNavigator, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
|
||||||
dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom,
|
dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
|
||||||
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle,
|
dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
|
||||||
dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary,
|
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
|
||||||
dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin,
|
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||||
dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
|
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||||
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
|
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||||
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
|
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||||
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
|
||||||
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
|
dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
|
||||||
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
|
||||||
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
|
||||||
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
|
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
|
||||||
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter;
|
dxSkinscxPCPainter;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
FdDy = record
|
||||||
FdDy=record
|
|
||||||
inc: integer; //客户端套接字句柄
|
inc: integer; //客户端套接字句柄
|
||||||
FDdys:string[32]; //客户端套接字
|
FDdys: string[32]; //客户端套接字
|
||||||
FdDysName:string[32]; //客户端套接字
|
FdDysName: string[32]; //客户端套接字
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TfrmZdyAttachPB = class(TForm)
|
TfrmZdyAttachPB = class(TForm)
|
||||||
ToolBar1: TToolBar;
|
ToolBar1: TToolBar;
|
||||||
TBRafresh: TToolButton;
|
TBRafresh: TToolButton;
|
||||||
|
@ -59,7 +59,6 @@ type
|
||||||
ToolButton3: TToolButton;
|
ToolButton3: TToolButton;
|
||||||
v2Column6: TcxGridDBColumn;
|
v2Column6: TcxGridDBColumn;
|
||||||
v2Column1: TcxGridDBColumn;
|
v2Column1: TcxGridDBColumn;
|
||||||
v2Column2: TcxGridDBColumn;
|
|
||||||
v2Column3: TcxGridDBColumn;
|
v2Column3: TcxGridDBColumn;
|
||||||
v2Column4: TcxGridDBColumn;
|
v2Column4: TcxGridDBColumn;
|
||||||
v2Column9: TcxGridDBColumn;
|
v2Column9: TcxGridDBColumn;
|
||||||
|
@ -70,14 +69,12 @@ type
|
||||||
DEFstr5: TComboBox;
|
DEFstr5: TComboBox;
|
||||||
v2Column7: TcxGridDBColumn;
|
v2Column7: TcxGridDBColumn;
|
||||||
v2Column11: TcxGridDBColumn;
|
v2Column11: TcxGridDBColumn;
|
||||||
v2Column12: TcxGridDBColumn;
|
|
||||||
v2Column13: TcxGridDBColumn;
|
v2Column13: TcxGridDBColumn;
|
||||||
OpenDialog1: TOpenDialog;
|
OpenDialog1: TOpenDialog;
|
||||||
ToolButton5: TToolButton;
|
ToolButton5: TToolButton;
|
||||||
v2Mrate: TcxGridDBColumn;
|
v2Mrate: TcxGridDBColumn;
|
||||||
v2Column14: TcxGridDBColumn;
|
v2Column14: TcxGridDBColumn;
|
||||||
v2Column15: TcxGridDBColumn;
|
v2Column15: TcxGridDBColumn;
|
||||||
v2defflt1: TcxGridDBColumn;
|
|
||||||
ToolButton6: TToolButton;
|
ToolButton6: TToolButton;
|
||||||
Panel2: TPanel;
|
Panel2: TPanel;
|
||||||
RadioGroup1: TRadioGroup;
|
RadioGroup1: TRadioGroup;
|
||||||
|
@ -85,7 +82,6 @@ type
|
||||||
cxButton1: TcxButton;
|
cxButton1: TcxButton;
|
||||||
cxButton2: TcxButton;
|
cxButton2: TcxButton;
|
||||||
Tv2Column1: TcxGridDBColumn;
|
Tv2Column1: TcxGridDBColumn;
|
||||||
Tv2Column2: TcxGridDBColumn;
|
|
||||||
Tv2Column3: TcxGridDBColumn;
|
Tv2Column3: TcxGridDBColumn;
|
||||||
Tv2Column4: TcxGridDBColumn;
|
Tv2Column4: TcxGridDBColumn;
|
||||||
Tv2Column5: TcxGridDBColumn;
|
Tv2Column5: TcxGridDBColumn;
|
||||||
|
@ -107,9 +103,8 @@ type
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
|
|
||||||
public
|
public
|
||||||
fkhType:string;
|
fkhType: string;
|
||||||
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -117,65 +112,66 @@ var
|
||||||
frmZdyAttachPB: TfrmZdyAttachPB;
|
frmZdyAttachPB: TfrmZdyAttachPB;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
U_DataLink,U_Fun,U_ZDYHelp,U_ZdyAttInputPB;
|
U_DataLink, U_Fun, U_ZDYHelp, U_ZdyAttInputPB;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.InitGrid();
|
procedure TfrmZdyAttachPB.InitGrid();
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
ADOQueryMain.DisableControls;
|
ADOQueryMain.DisableControls;
|
||||||
with ADOQueryMain do
|
with ADOQueryMain do
|
||||||
begin
|
begin
|
||||||
Filtered:=False;
|
Filtered := False;
|
||||||
Close;
|
Close;
|
||||||
SQL.Clear;
|
SQL.Clear;
|
||||||
sql.Add(' select ATID,ZdyName,ZdyCode,DEFstr1,DEFstr2,defNote1,Mrate,defNote2,defNote3,DEFstr3,DEFstr5,DEFstr4,');
|
sql.Add(' select ATID,ZdyName,ZdyCode,DEFstr1,DEFstr2,defNote1,Mrate,defNote2,defNote3,DEFstr3,DEFstr5,DEFstr4,');
|
||||||
sql.Add(' DEFstr6,DEFstr7,DEFstr8,Note,DEFstr4,DEFstr5,defflt1,CPhh,Filler,FillTime ');
|
sql.Add(' DEFstr6,DEFstr7,DEFstr8,Note,DEFstr4,DEFstr5,defflt1,CPhh,Filler,FillTime ');
|
||||||
sql.Add(' from KH_Zdy_Attachment where Type=''CP'' and DEFstr5=''坯布'' ');
|
sql.Add(' from KH_Zdy_Attachment where Type=''CP'' and DEFstr5=''坯布'' ');
|
||||||
sql.Add(' and isnull(khType,'''')='+quotedstr(trim(fkhType)));
|
sql.Add(' and isnull(khType,'''')=' + quotedstr(trim(fkhType)));
|
||||||
sql.Add(' order by zdyName,dbo.getNum(Defstr3) ');
|
sql.Add(' order by zdyName,dbo.getNum(Defstr3) ');
|
||||||
// sql.Add(' order by zdyName ');
|
// sql.Add(' order by zdyName ');
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||||
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||||
finally
|
finally
|
||||||
ADOQueryMain.EnableControls;
|
ADOQueryMain.EnableControls;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.FormDestroy(Sender: TObject);
|
procedure TfrmZdyAttachPB.FormDestroy(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
frmZdyAttachPB:=nil;
|
frmZdyAttachPB := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure TfrmZdyAttachPB.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
begin
|
begin
|
||||||
Action:=caFree;
|
Action := caFree;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.TBCloseClick(Sender: TObject);
|
procedure TfrmZdyAttachPB.TBCloseClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
WriteCxGrid('产品资料13',Tv2,'客户自定义');
|
WriteCxGrid('产品资料131', Tv2, '客户自定义131');
|
||||||
Close;
|
Close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.TBDelClick(Sender: TObject);
|
procedure TfrmZdyAttachPB.TBDelClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if CDS_HZ.IsEmpty then Exit;
|
if CDS_HZ.IsEmpty then
|
||||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
Exit;
|
||||||
if Trim(CDS_HZ.fieldbyname('ATID').AsString)<>'' then
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('ATID').AsString) <> '' then
|
||||||
begin
|
begin
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
SQL.Clear;
|
SQL.Clear;
|
||||||
sql.Add('delete KH_Zdy_Attachment where ATID='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
sql.Add('delete KH_Zdy_Attachment where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
sql.Add('delete KH_Zdy where ZdyNo='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
sql.Add('delete KH_Zdy where ZdyNo=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
ExecSQL;
|
ExecSQL;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -184,7 +180,7 @@ end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.FormShow(Sender: TObject);
|
procedure TfrmZdyAttachPB.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ReadCxGrid('产品资料13',Tv2,'客户自定义');
|
ReadCxGrid('产品资料131', Tv2, '客户自定义131');
|
||||||
InitGrid();
|
InitGrid();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -197,9 +193,9 @@ procedure TfrmZdyAttachPB.ToolButton2Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ADOQueryMain.Active then
|
if ADOQueryMain.Active then
|
||||||
begin
|
begin
|
||||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||||
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -208,23 +204,23 @@ begin
|
||||||
ToolButton2.Click;
|
ToolButton2.Click;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.ToolButton1Click(Sender: TObject);
|
procedure TfrmZdyAttachPB.ToolButton1Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ADOQueryMain.IsEmpty then Exit;
|
if ADOQueryMain.IsEmpty then
|
||||||
TcxGridToExcel(self.Caption,cxgrid2);
|
Exit;
|
||||||
|
TcxGridToExcel(self.Caption, cxgrid2);
|
||||||
// SelExportData(Tv2,ADOQueryMain,'产品资料列表');
|
// SelExportData(Tv2,ADOQueryMain,'产品资料列表');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.ToolButton4Click(Sender: TObject);
|
procedure TfrmZdyAttachPB.ToolButton4Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
frmZdyAttInputPB:=TfrmZdyAttInputPB.Create(Application);
|
frmZdyAttInputPB := TfrmZdyAttInputPB.Create(Application);
|
||||||
with frmZdyAttInputPB do
|
with frmZdyAttInputPB do
|
||||||
begin
|
begin
|
||||||
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
FCYID := Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
fkhType:=self.fkhType;
|
fkhType := self.fkhType;
|
||||||
if ShowModal=1 then
|
if ShowModal = 1 then
|
||||||
begin
|
begin
|
||||||
TBRafresh.Click;
|
TBRafresh.Click;
|
||||||
end;
|
end;
|
||||||
|
@ -237,12 +233,12 @@ end;
|
||||||
procedure TfrmZdyAttachPB.ToolButton3Click(Sender: TObject);
|
procedure TfrmZdyAttachPB.ToolButton3Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
frmZdyAttInputPB:=TfrmZdyAttInputPB.Create(Application);
|
frmZdyAttInputPB := TfrmZdyAttInputPB.Create(Application);
|
||||||
with frmZdyAttInputPB do
|
with frmZdyAttInputPB do
|
||||||
begin
|
begin
|
||||||
FCYID:='';
|
FCYID := '';
|
||||||
fkhType:=self.fkhType;
|
fkhType := self.fkhType;
|
||||||
if ShowModal=1 then
|
if ShowModal = 1 then
|
||||||
begin
|
begin
|
||||||
TBRafresh.Click;
|
TBRafresh.Click;
|
||||||
end;
|
end;
|
||||||
|
@ -254,99 +250,99 @@ end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.ToolButton5Click(Sender: TObject);
|
procedure TfrmZdyAttachPB.ToolButton5Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
excelApp,WorkBook:Variant;
|
excelApp, WorkBook: Variant;
|
||||||
i,j,k,ExcelRowCount:integer;
|
i, j, k, ExcelRowCount: integer;
|
||||||
maxId:string;
|
maxId: string;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
try
|
try
|
||||||
ExcelApp := CreateOleObject('Excel.Application');
|
excelApp := CreateOleObject('Excel.Application');
|
||||||
openDialog1.Filter:='*.CSV;*.xls';
|
openDialog1.Filter := '*.CSV;*.xls';
|
||||||
if opendialog1.Execute then
|
if opendialog1.Execute then
|
||||||
begin
|
begin
|
||||||
WorkBook :=ExcelApp.WorkBooks.Open(OpenDialog1.FileName);
|
WorkBook := excelApp.WorkBooks.Open(OpenDialog1.FileName);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
ExcelApp.Visible := false;
|
excelApp.Visible := false;
|
||||||
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
|
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
|
||||||
except
|
except
|
||||||
application.MessageBox('加载EXCEL错误!','错误信息',MB_ICONERROR);
|
application.MessageBox('加载EXCEL错误!', '错误信息', MB_ICONERROR);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
try
|
try
|
||||||
k:=0;
|
k := 0;
|
||||||
for i:=1 to 20 do
|
for i := 1 to 20 do
|
||||||
begin
|
begin
|
||||||
if trim(excelapp.Cells[1,i].value)='' then break;
|
if trim(excelApp.Cells[1, i].value) = '' then
|
||||||
if trim(excelapp.Cells[1,i].value)='产品编号' then
|
break;
|
||||||
|
if trim(excelApp.Cells[1, i].value) = '产品编号' then
|
||||||
begin
|
begin
|
||||||
dFdDy[k].inc:=i;
|
dFdDy[k].inc := i;
|
||||||
dFdDy[k].FDdys:='ZdyCode';
|
dFdDy[k].FDdys := 'ZdyCode';
|
||||||
dFdDy[k].FdDysName:='产品编号';
|
dFdDy[k].FdDysName := '产品编号';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if trim(excelapp.Cells[1,i].value)='产品名称' then
|
if trim(excelApp.Cells[1, i].value) = '产品名称' then
|
||||||
begin
|
begin
|
||||||
dFdDy[k].inc:=i;
|
dFdDy[k].inc := i;
|
||||||
dFdDy[k].FDdys:='ZdyName';
|
dFdDy[k].FDdys := 'ZdyName';
|
||||||
dFdDy[k].FdDysName:='产品名称';
|
dFdDy[k].FdDysName := '产品名称';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if trim(excelapp.Cells[1,i].value)='中文名称' then
|
if trim(excelApp.Cells[1, i].value) = '中文名称' then
|
||||||
begin
|
begin
|
||||||
dFdDy[k].inc:=i;
|
dFdDy[k].inc := i;
|
||||||
dFdDy[k].FDdys:='defNote3';
|
dFdDy[k].FDdys := 'defNote3';
|
||||||
dFdDy[k].FdDysName:='中文名称';
|
dFdDy[k].FdDysName := '中文名称';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if trim(excelapp.Cells[1,i].value)='颜色' then
|
if trim(excelApp.Cells[1, i].value) = '颜色' then
|
||||||
begin
|
begin
|
||||||
dFdDy[k].inc:=i;
|
dFdDy[k].inc := i;
|
||||||
dFdDy[k].FDdys:='DEFstr3';
|
dFdDy[k].FDdys := 'DEFstr3';
|
||||||
dFdDy[k].FdDysName:='颜色';
|
dFdDy[k].FdDysName := '颜色';
|
||||||
end;
|
end;
|
||||||
if trim(excelapp.Cells[1,i].value)='中文颜色' then
|
if trim(excelApp.Cells[1, i].value) = '中文颜色' then
|
||||||
begin
|
begin
|
||||||
dFdDy[k].inc:=i;
|
dFdDy[k].inc := i;
|
||||||
dFdDy[k].FDdys:='DEFstr6';
|
dFdDy[k].FDdys := 'DEFstr6';
|
||||||
dFdDy[k].FdDysName:='中文颜色';
|
dFdDy[k].FdDysName := '中文颜色';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if trim(excelApp.Cells[1, i].value) = '类型' then
|
||||||
if trim(excelapp.Cells[1,i].value)='类型' then
|
|
||||||
begin
|
begin
|
||||||
dFdDy[k].inc:=i;
|
dFdDy[k].inc := i;
|
||||||
dFdDy[k].FDdys:='DEFstr5';
|
dFdDy[k].FDdys := 'DEFstr5';
|
||||||
dFdDy[k].FdDysName:='类型';
|
dFdDy[k].FdDysName := '类型';
|
||||||
end;
|
end;
|
||||||
if trim(excelapp.Cells[1,i].value)='规格' then
|
if trim(excelApp.Cells[1, i].value) = '规格' then
|
||||||
begin
|
begin
|
||||||
dFdDy[k].inc:=i;
|
dFdDy[k].inc := i;
|
||||||
dFdDy[k].FDdys:='DEFstr1';
|
dFdDy[k].FDdys := 'DEFstr1';
|
||||||
dFdDy[k].FdDysName:='规格';
|
dFdDy[k].FdDysName := '规格';
|
||||||
end;
|
end;
|
||||||
if trim(excelapp.Cells[1,i].value)='成份' then
|
if trim(excelApp.Cells[1, i].value) = '成份' then
|
||||||
begin
|
begin
|
||||||
dFdDy[k].inc:=i;
|
dFdDy[k].inc := i;
|
||||||
dFdDy[k].FDdys:='DEFstr2';
|
dFdDy[k].FDdys := 'DEFstr2';
|
||||||
dFdDy[k].FdDysName:='成份';
|
dFdDy[k].FdDysName := '成份';
|
||||||
end;
|
end;
|
||||||
k:=k+1;
|
k := k + 1;
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ADOQueryCmd.Connection.BeginTrans;
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
try
|
try
|
||||||
for i := 2 to excelrowcount do
|
for i := 2 to ExcelRowCount do
|
||||||
begin
|
begin
|
||||||
if GetLSNo(ADOQueryCmd,maxId,'AT','KH_Zdy_Attachment',4,1)=False then
|
if GetLSNo(ADOQueryCmd, maxId, 'AT', 'KH_Zdy_Attachment', 4, 1) = False then
|
||||||
begin
|
begin
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
Application.MessageBox('取最大号失败!','提示',0);
|
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -358,28 +354,28 @@ begin
|
||||||
open;
|
open;
|
||||||
end;
|
end;
|
||||||
ADOQueryCmd.Append;
|
ADOQueryCmd.Append;
|
||||||
for j:=0 to k-1 do
|
for j := 0 to k - 1 do
|
||||||
begin
|
begin
|
||||||
ADOQueryCmd.fieldbyname(dFdDy[j].FDdys).Value:=excelapp.Cells[i,dFdDy[j].inc].Value;
|
ADOQueryCmd.fieldbyname(dFdDy[j].FDdys).Value := excelApp.Cells[i, dFdDy[j].inc].Value;
|
||||||
end;
|
end;
|
||||||
ADOQueryCmd.FieldByName('ATID').Value:=Trim(maxId);
|
ADOQueryCmd.FieldByName('ATID').Value := Trim(maxId);
|
||||||
ADOQueryCmd.FieldByName('zdyCode').Value:=Trim(maxId);
|
ADOQueryCmd.FieldByName('zdyCode').Value := Trim(maxId);
|
||||||
ADOQueryCmd.FieldByName('khType').Value:=Trim(fkhType);
|
ADOQueryCmd.FieldByName('khType').Value := Trim(fkhType);
|
||||||
ADOQueryCmd.FieldByName('Type').Value:='CP';
|
ADOQueryCmd.FieldByName('Type').Value := 'CP';
|
||||||
ADOQueryCmd.FieldByName('Filler').Value:=Trim(DName);
|
ADOQueryCmd.FieldByName('Filler').Value := Trim(DName);
|
||||||
ADOQueryCmd.Post;
|
ADOQueryCmd.Post;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
WorkBook.Close;
|
WorkBook.Close;
|
||||||
ExcelApp.Quit;
|
excelApp.Quit;
|
||||||
ExcelApp := Unassigned;
|
excelApp := Unassigned;
|
||||||
WorkBook := Unassigned;
|
WorkBook := Unassigned;
|
||||||
ADOQueryCmd.Connection.CommitTrans;
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
InitGrid();
|
InitGrid();
|
||||||
except
|
except
|
||||||
WorkBook.Close;
|
WorkBook.Close;
|
||||||
ExcelApp.Quit;
|
excelApp.Quit;
|
||||||
ExcelApp := Unassigned;
|
excelApp := Unassigned;
|
||||||
WorkBook := Unassigned;
|
WorkBook := Unassigned;
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
end;
|
end;
|
||||||
|
@ -387,54 +383,55 @@ end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.cxButton2Click(Sender: TObject);
|
procedure TfrmZdyAttachPB.cxButton2Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Panel2.Visible:=false;
|
Panel2.Visible := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.cxButton1Click(Sender: TObject);
|
procedure TfrmZdyAttachPB.cxButton1Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
fPrintFile:string;
|
fPrintFile: string;
|
||||||
Txt,fImagePath:string;
|
Txt, fImagePath: string;
|
||||||
Moudle: THandle;
|
Moudle: THandle;
|
||||||
Makebar:TMakebar;
|
Makebar: TMakebar;
|
||||||
Mixtext:TMixtext;
|
Mixtext: TMixtext;
|
||||||
begin
|
begin
|
||||||
IF CDS_HZ.IsEmpty then exit;
|
if CDS_HZ.IsEmpty then
|
||||||
|
exit;
|
||||||
try
|
try
|
||||||
Moudle:=LoadLibrary('MakeQRBarcode.dll');
|
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||||
@Makebar:=GetProcAddress(Moudle,'Make');
|
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||||
@Mixtext:=GetProcAddress(Moudle,'MixText');
|
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||||
Txt:=Trim(CDS_HZ.fieldbyname('ZDYCODE').AsString);
|
Txt := Trim(CDS_HZ.fieldbyname('ZDYCODE').AsString);
|
||||||
fImagePath:=ExtractFilePath(Application.ExeName)+'image\temp.bmp' ;
|
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||||
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName)+'image')) then
|
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||||
CreateDirectory(pchar(ExtractFilePath(Application.ExeName)+'image'),nil);
|
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||||
if FileExists(fImagePath) then DeleteFile(fImagePath);
|
if FileExists(fImagePath) then
|
||||||
Makebar(pchar(Txt),Length(Txt),3,3,0,PChar(fImagePath),3);
|
DeleteFile(fImagePath);
|
||||||
|
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||||
except
|
except
|
||||||
application.MessageBox('条形码生成失败!','提示信息',MB_ICONERROR);
|
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
fPrintFile:=ExtractFilePath(Application.ExeName)+'Report\'+trim(RadioGroup1.Items[RadioGroup1.ItemIndex])+'.rmf' ;
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + trim(RadioGroup1.Items[RadioGroup1.ItemIndex]) + '.rmf';
|
||||||
if FileExists(fPrintFile) then
|
if FileExists(fPrintFile) then
|
||||||
begin
|
begin
|
||||||
RMVariables['QRBARCODE']:=fImagePath;
|
RMVariables['QRBARCODE'] := fImagePath;
|
||||||
RM1.LoadFromFile(fPrintFile);
|
RM1.LoadFromFile(fPrintFile);
|
||||||
// Rm2.DefaultCopies:=strtointdef(trim(ComboBox1.Text),1);
|
// Rm2.DefaultCopies:=strtointdef(trim(ComboBox1.Text),1);
|
||||||
// RM1.ShowReport;
|
// RM1.ShowReport;
|
||||||
RM1.PrintReport;
|
RM1.PrintReport;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Application.MessageBox(PChar('没有找到文件'+fPrintFile),'提示',0);
|
Application.MessageBox(PChar('没有找到文件' + fPrintFile), '提示', 0);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.ToolButton6Click(Sender: TObject);
|
procedure TfrmZdyAttachPB.ToolButton6Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Panel2.Left:=(self.Width-Panel2.Width) div 2;
|
Panel2.Left := (self.Width - Panel2.Width) div 2;
|
||||||
Panel2.Top:=(self.Height-Panel2.Height) div 2 -100;
|
Panel2.Top := (self.Height - Panel2.Height) div 2 - 100;
|
||||||
Panel2.Visible:=true;
|
Panel2.Visible := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
|
770
管理系统/U_ClothContractCPCKList.dfm
Normal file
770
管理系统/U_ClothContractCPCKList.dfm
Normal file
|
@ -0,0 +1,770 @@
|
||||||
|
object frmClothContractCPCKList: TfrmClothContractCPCKList
|
||||||
|
Left = 309
|
||||||
|
Top = 284
|
||||||
|
Width = 1222
|
||||||
|
Height = 738
|
||||||
|
Caption = #25104#21697#20986#24211#20449#24687
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1206
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_TradeManage.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#30475
|
||||||
|
ImageIndex = 58
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 441
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 504
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1206
|
||||||
|
Height = 53
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #30331#35760#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 161
|
||||||
|
Top = 22
|
||||||
|
Width = 6
|
||||||
|
Height = 12
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 271
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20219#21153#21333#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 420
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 572
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268#26684
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 704
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#26041
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 836
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21040#36135#22320#28857
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 18
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 167
|
||||||
|
Top = 18
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object ConNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 329
|
||||||
|
Top = 18
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ConNoChange
|
||||||
|
OnKeyPress = conPress
|
||||||
|
end
|
||||||
|
object C_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 473
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object C_Spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 600
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object FactoryNoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 732
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object JHPlace: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 892
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 0
|
||||||
|
Top = 85
|
||||||
|
Width = 1206
|
||||||
|
Height = 497
|
||||||
|
Align = alTop
|
||||||
|
BorderStyle = bsNone
|
||||||
|
TabOrder = 2
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1206
|
||||||
|
Height = 497
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnMouseDown = Tv1MouseDown
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
OnCellDblClick = Tv1CellDblClick
|
||||||
|
OnCustomDrawCell = Tv1CustomDrawCell
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1PRTOrderQty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty1
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
OptionsView.IndicatorWidth = 20
|
||||||
|
Styles.Inactive = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Selection = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
OnCustomDrawIndicatorCell = Tv1CustomDrawIndicatorCell
|
||||||
|
object v1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #20219#21153#21333#21495
|
||||||
|
DataBinding.FieldName = 'ConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object v1Column8: TcxGridDBColumn
|
||||||
|
Caption = #37319#36141#35745#21010#21333#21495
|
||||||
|
DataBinding.FieldName = 'fromConNo'
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 86
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1DeliveryDate: TcxGridDBColumn
|
||||||
|
Caption = #21040#36135#26085#26399
|
||||||
|
DataBinding.FieldName = 'DeliveryDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.SaveTime = False
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #31614#35746#26085#26399
|
||||||
|
DataBinding.FieldName = 'QDTime'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1FactoryNo1Name: TcxGridDBColumn
|
||||||
|
Caption = #20379#26041
|
||||||
|
DataBinding.FieldName = 'FactoryNoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1PRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'C_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1PRTMF: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133'(cm)'
|
||||||
|
DataBinding.FieldName = 'MF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325'(g/'#13217')'
|
||||||
|
DataBinding.FieldName = 'KZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v1Qty1: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = cxStyle_fontclBlue
|
||||||
|
Styles.Footer = cxStyle_fontclBlue
|
||||||
|
Styles.Header = cxStyle_fontclBlue
|
||||||
|
Width = 46
|
||||||
|
end
|
||||||
|
object v1PRTOrderQty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'T_Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = cxStyle_fontclBlue
|
||||||
|
Styles.Footer = cxStyle_fontclBlue
|
||||||
|
Styles.Header = cxStyle_fontclBlue
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1OrderUnit: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'C_Unit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 47
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'C_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'LXPerson'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#26041#24335
|
||||||
|
DataBinding.FieldName = 'LXTel'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #21040#36135#22320#28857
|
||||||
|
DataBinding.FieldName = 'JHPlace'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 101
|
||||||
|
end
|
||||||
|
object v1Column18: TcxGridDBColumn
|
||||||
|
Caption = #21046#21333#20154
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column20: TcxGridDBColumn
|
||||||
|
Caption = #21046#21333#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column19: TcxGridDBColumn
|
||||||
|
Caption = #20462#25913#20154
|
||||||
|
DataBinding.FieldName = 'editer'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column21: TcxGridDBColumn
|
||||||
|
Caption = #20462#25913#26102#38388
|
||||||
|
DataBinding.FieldName = 'editTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSel'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'C_Color'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column3: TcxGridDBColumn
|
||||||
|
Caption = #33394#21495
|
||||||
|
DataBinding.FieldName = 'C_ColorNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 1128
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 936
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1000
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1040
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 1168
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 1096
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ClientDataSet3: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 1112
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = ClientDataSet2
|
||||||
|
Left = 880
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object DataSource3: TDataSource
|
||||||
|
DataSet = ClientDataSet3
|
||||||
|
Left = 1112
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object ClientDataSet2: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 920
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDBMain
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 352
|
||||||
|
Top = 192
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDBMain: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_PRT
|
||||||
|
Left = 400
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 416
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object CDS_PRT: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 32
|
||||||
|
end
|
||||||
|
object cxStyleRepository1: TcxStyleRepository
|
||||||
|
Left = 305
|
||||||
|
Top = 310
|
||||||
|
PixelsPerInch = 96
|
||||||
|
object cxStyle1: TcxStyle
|
||||||
|
AssignedValues = [svColor]
|
||||||
|
Color = clInactiveCaption
|
||||||
|
end
|
||||||
|
object cxStyle2: TcxStyle
|
||||||
|
AssignedValues = [svColor, svTextColor]
|
||||||
|
Color = 4707838
|
||||||
|
TextColor = clBtnText
|
||||||
|
end
|
||||||
|
object cxStyle_gridRow: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = 16311512
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
end
|
||||||
|
object cxStyle_gridFoot: TcxStyle
|
||||||
|
AssignedValues = [svFont]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_gridHead: TcxStyle
|
||||||
|
AssignedValues = [svFont]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_gridGroupBox: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = clMoneyGreen
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_yellow: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = 8454143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
end
|
||||||
|
object cxStyle_Red: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = clRed
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
end
|
||||||
|
object cxStyle_fontBlack: TcxStyle
|
||||||
|
AssignedValues = [svFont]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_fontclFuchsia: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clFuchsia
|
||||||
|
end
|
||||||
|
object cxStyle_fontclPurple: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clPurple
|
||||||
|
end
|
||||||
|
object cxStyle_fontclGreen: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clGreen
|
||||||
|
end
|
||||||
|
object cxStyle_fontclBlue: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clBlue
|
||||||
|
end
|
||||||
|
object cxStyle_fontclTeal: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clTeal
|
||||||
|
end
|
||||||
|
object cxStyle_fontclOlive: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clOlive
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
870
管理系统/U_ClothContractCPCKList.pas
Normal file
870
管理系统/U_ClothContractCPCKList.pas
Normal file
|
@ -0,0 +1,870 @@
|
||||||
|
unit U_ClothContractCPCKList;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses, cxControls,
|
||||||
|
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||||
|
cxGrid, DBClient, cxCalendar, cxButtonEdit, cxSplitter, RM_Common, RM_Class,
|
||||||
|
RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, cxTextEdit, cxPC, cxCheckBox,
|
||||||
|
cxCurrencyEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
|
||||||
|
dxBarBuiltInMenu, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
|
||||||
|
dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
|
||||||
|
dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
|
||||||
|
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
|
||||||
|
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||||
|
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||||
|
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||||
|
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||||
|
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
|
||||||
|
dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
|
||||||
|
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
|
||||||
|
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
|
||||||
|
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
|
||||||
|
dxSkinscxPCPainter;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmClothContractCPCKList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Label3: TLabel;
|
||||||
|
ConNo: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
C_CodeName: TEdit;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
Label4: TLabel;
|
||||||
|
C_Spec: TEdit;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1OrderNo: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1DeliveryDate: TcxGridDBColumn;
|
||||||
|
v1FactoryNo1Name: TcxGridDBColumn;
|
||||||
|
v1PRTSpec: TcxGridDBColumn;
|
||||||
|
v1PRTMF: TcxGridDBColumn;
|
||||||
|
v1PRTKZ: TcxGridDBColumn;
|
||||||
|
v1PRTOrderQty: TcxGridDBColumn;
|
||||||
|
v1OrderUnit: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
ClientDataSet3: TClientDataSet;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
DataSource3: TDataSource;
|
||||||
|
ClientDataSet2: TClientDataSet;
|
||||||
|
v1Qty1: TcxGridDBColumn;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDBMain: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
v1Column7: TcxGridDBColumn;
|
||||||
|
CDS_PRT: TClientDataSet;
|
||||||
|
Label6: TLabel;
|
||||||
|
FactoryNoName: TEdit;
|
||||||
|
v1Column8: TcxGridDBColumn;
|
||||||
|
cxStyleRepository1: TcxStyleRepository;
|
||||||
|
cxStyle1: TcxStyle;
|
||||||
|
cxStyle2: TcxStyle;
|
||||||
|
cxStyle_gridRow: TcxStyle;
|
||||||
|
cxStyle_gridFoot: TcxStyle;
|
||||||
|
cxStyle_gridHead: TcxStyle;
|
||||||
|
cxStyle_gridGroupBox: TcxStyle;
|
||||||
|
cxStyle_yellow: TcxStyle;
|
||||||
|
cxStyle_Red: TcxStyle;
|
||||||
|
cxStyle_fontBlack: TcxStyle;
|
||||||
|
cxStyle_fontclFuchsia: TcxStyle;
|
||||||
|
cxStyle_fontclPurple: TcxStyle;
|
||||||
|
cxStyle_fontclGreen: TcxStyle;
|
||||||
|
cxStyle_fontclBlue: TcxStyle;
|
||||||
|
cxStyle_fontclTeal: TcxStyle;
|
||||||
|
cxStyle_fontclOlive: TcxStyle;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
Label7: TLabel;
|
||||||
|
JHPlace: TEdit;
|
||||||
|
v1Column18: TcxGridDBColumn;
|
||||||
|
v1Column19: TcxGridDBColumn;
|
||||||
|
v1Column20: TcxGridDBColumn;
|
||||||
|
v1Column21: TcxGridDBColumn;
|
||||||
|
Tv1Column2: TcxGridDBColumn;
|
||||||
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
Tv1Column3: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBFindClick(Sender: TObject);
|
||||||
|
procedure TBEditClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure ConNoChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure Tv2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure conPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure tchkClick(Sender: TObject);
|
||||||
|
procedure TnochkClick(Sender: TObject);
|
||||||
|
procedure Tv1CustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
||||||
|
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
procedure cxTabControl1Change(Sender: TObject);
|
||||||
|
private
|
||||||
|
FInt, PFInt: Integer;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData(): Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fDParameters1: string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmClothContractCPCKList: TfrmClothContractCPCKList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_ClothContractCPInPut, U_Fun, U_ProductOrderList, U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmClothContractCPCKList := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action := caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ScrollBox1.Align := alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid(self.Caption, Tv1, '指示单管理');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Get_Contract_CP');
|
||||||
|
sql.Add('@begdate=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + ''' ');
|
||||||
|
sql.Add(',@enddate=''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + ''' ');
|
||||||
|
sql.Add(',@conType=''成品发货'' ');
|
||||||
|
sql.Add(',@status=''2'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
TBFind.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.InitForm();
|
||||||
|
begin
|
||||||
|
if fDParameters1 = '查询' then
|
||||||
|
begin
|
||||||
|
TBADD.Visible := false;
|
||||||
|
// TBEdit.Visible:=false;
|
||||||
|
TBDel.Visible := false;
|
||||||
|
// Tchk.Visible:=false;
|
||||||
|
// TNochk.Visible:=false;
|
||||||
|
// v1T_money.Visible := false;
|
||||||
|
// v1T_money.Hidden := true;
|
||||||
|
ToolButton1.Visible := false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// TBEdit.Enabled := false;
|
||||||
|
// TBDel.Enabled := false;
|
||||||
|
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.TBFindClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active = False then
|
||||||
|
Exit;
|
||||||
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.TBEditClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select YFID from YF_money_CR ');
|
||||||
|
sql.Add('where mainID=''' + trim(Order_Main.FieldByName('mainID').AsString) + ''' ');
|
||||||
|
sql.Add('and status>0 ');
|
||||||
|
open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('财务数据已审核,不能修改!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
// with ADOQueryTemp do
|
||||||
|
// begin
|
||||||
|
// close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('select * from contract_sub ');
|
||||||
|
// sql.Add('where kcsubid=''' + trim(Order_Main.FieldByName('subid').AsString) + ''' ');
|
||||||
|
//// sql.Add(' ');
|
||||||
|
// open;
|
||||||
|
// if not IsEmpty then
|
||||||
|
// begin
|
||||||
|
// application.MessageBox('已出库不能修改!', '提示信息', MB_ICONERROR);
|
||||||
|
// exit;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
try
|
||||||
|
frmClothContractCPInPut := TfrmClothContractCPInPut.Create(Application);
|
||||||
|
with frmClothContractCPInPut do
|
||||||
|
begin
|
||||||
|
|
||||||
|
PState := 1;
|
||||||
|
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
// TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractCPInPut.Free;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select YFID from YF_money_CR ');
|
||||||
|
sql.Add('where mainID=''' + trim(Order_Main.FieldByName('mainID').AsString) + ''' ');
|
||||||
|
sql.Add('and status>0 ');
|
||||||
|
open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('财务数据已审核,不能删除!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from contract_sub ');
|
||||||
|
sql.Add('where kcsubid=''' + trim(Order_Main.FieldByName('subid').AsString) + ''' ');
|
||||||
|
open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('已出库不能修改!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
if trim(Order_Main.FieldByName('mainID').AsString) = 'CM001' then
|
||||||
|
exit;
|
||||||
|
if DelData() then
|
||||||
|
begin
|
||||||
|
Order_Main.Delete;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmClothContractCPCKList.DelData(): Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result := false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete YF_Money_CR where MainID=''' + Trim(Order_Main.fieldbyname('MainID').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
// sql.Add(' where CRID='+CRID);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub where SubId=''' + Trim(Order_Main.fieldbyname('SubId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Trim(Order_Main.fieldbyname('SubId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result := True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result := False;
|
||||||
|
Application.MessageBox('数据删除异常!', '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
TcxGridToExcel('坯布合同订单列表', cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile, FConNoM: string;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\坯布到货单.rmf';
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select *,fromConNo=(select Top 1 conNo from Contract_Main X where X.MainID=A.fromMainID) ');
|
||||||
|
sql.Add('from Contract_Main A');
|
||||||
|
sql.Add('inner join Contract_sub B on B.MainID=A.mainID ');
|
||||||
|
sql.Add('where A.FillTime>= ''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + ''' ');
|
||||||
|
sql.Add('and A.FillTime< ''' + Trim(FormatDateTime('yyyy-MM-dd', endDate.DateTime + 1)) + ''' ');
|
||||||
|
sql.Add('and A.mainID=' + quotedstr(trim(Order_Main.fieldbyname('MainID').AsString)));
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp, CDS_PRT);
|
||||||
|
SInitCDSData20(ADOQueryTemp, CDS_PRT);
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['dtxz'] := formatdateTime('yyyy-MM-dd', Now);
|
||||||
|
RMVariables['zdr'] := Trim(dName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找' + ExtractFilePath(Application.ExeName) + 'Report\坯布到货单.rmf'), '提示', 0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.TBAddClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmClothContractCPInPut := frmClothContractCPInPut.Create(Application);
|
||||||
|
with frmClothContractCPInPut do
|
||||||
|
begin
|
||||||
|
PState := 0;
|
||||||
|
FMainId := '';
|
||||||
|
FConType := '坯布预投坯';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractCPInPut.Free;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.ConNoChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active = False then
|
||||||
|
Exit;
|
||||||
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption, Tv1, '指示单管理');
|
||||||
|
BegDate.DateTime := SGetServerDate10(ADOQueryTemp) - 7;
|
||||||
|
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||||
|
initForm();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.Tv2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt := 2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt := 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno: string;
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if ClientDataSet2.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MXId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('到货数量未确定!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ClientDataSet3.Locate('OrderNo', null, []) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('指定订单编号不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
BegDate.SetFocus;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
//保存去向表
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd, maxno, 'To', 'Contract_Sub_MxTo', 4, 1) = False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取去向流水号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
maxno := Trim(ClientDataSet3.fieldbyname('ToId').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub_MxTo where ToId=''' + Trim(ClientDataSet3.fieldbyname('ToId').AsString) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString) = '' then
|
||||||
|
Append
|
||||||
|
else
|
||||||
|
Edit;
|
||||||
|
FieldByName('MxId').Value := Trim(ClientDataSet2.fieldbyname('MxId').AsString);
|
||||||
|
FieldByName('ToId').Value := Trim(maxno);
|
||||||
|
FieldByName('OrdSubId').Value := Trim(ClientDataSet3.fieldbyname('OrdSubId').AsString);
|
||||||
|
FieldByName('TPDate').Value := ClientDataSet3.fieldbyname('TPDate').Value;
|
||||||
|
FieldByName('TPPerson').Value := ClientDataSet3.fieldbyname('TPPerson').Value;
|
||||||
|
FieldByName('TPNote').Value := ClientDataSet3.fieldbyname('TPNote').Value;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('TPQty').AsString) <> '' then
|
||||||
|
FieldByName('TPQty').Value := ClientDataSet3.fieldbyname('TPQty').Value
|
||||||
|
else
|
||||||
|
FieldByName('TPQty').Value := 0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty1').AsString) <> '' then
|
||||||
|
FieldByName('Qty1').Value := ClientDataSet3.fieldbyname('Qty1').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty1').Value := 0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty2').AsString) <> '' then
|
||||||
|
FieldByName('Qty2').Value := ClientDataSet3.fieldbyname('Qty2').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty2').Value := 0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty3').AsString) <> '' then
|
||||||
|
FieldByName('Qty3').Value := ClientDataSet3.fieldbyname('Qty3').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty3').Value := 0;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ToId').Value := Trim(maxno);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('操作成功!', '提示', 0);
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('操作异常!', '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FInt = 2 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet2.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if ClientDataSet3.IsEmpty = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生坯布领料数据,不能删除到坯记录!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MxId').AsString) <> '' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_Mx where MxId=''' + Trim(ClientDataSet2.fieldbyname('MxId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet2.Delete;
|
||||||
|
end
|
||||||
|
else if FInt = 3 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString) <> '' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_MxTo where ToId=''' + Trim(ClientDataSet3.fieldbyname('ToId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet3.Delete;
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
if ClientDataSet3.IsEmpty = False then
|
||||||
|
// FieldByName('KCSL').Value:=ClientDataSet2.fieldbyname('MxQty').Value-tv3.DataController.Summary.FooterSummaryValues[0]
|
||||||
|
|
||||||
|
else
|
||||||
|
FieldByName('KCSL').Value := ClientDataSet2.fieldbyname('MxQty').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.v2Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'RKPlace';
|
||||||
|
flagname := '入库地点';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('RKPlace').Value := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.conPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
{ if Key=#13 then
|
||||||
|
begin
|
||||||
|
if Length(Trim(ConNoM.Text))<4 then Exit;
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec ClothContract_QryList :MainId,:WSql');
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and OM.conNo like '''+'%'+Trim(ConNoM.Text)+'%'+'''';
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
try
|
||||||
|
frmClothContractCPInPut := TfrmClothContractCPInPut.Create(Application);
|
||||||
|
with frmClothContractCPInPut do
|
||||||
|
begin
|
||||||
|
PState := 3;
|
||||||
|
TBSave.Enabled := false;
|
||||||
|
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractCPInPut.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
ToolButton1.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.tchkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
{ try
|
||||||
|
frmClothContractInPut := TfrmClothContractInPut.Create(Application);
|
||||||
|
with frmClothContractInPut do
|
||||||
|
begin
|
||||||
|
PState := 1;
|
||||||
|
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
with self.ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''1'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(self.Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(self.Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
self.InitGrid();
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractInPut.Free;
|
||||||
|
// TBRafresh.Click;
|
||||||
|
end; }
|
||||||
|
|
||||||
|
if Order_Main.Locate('ssel', true, []) = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''1'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('操作失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.TnochkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
if Order_Main.Locate('ssel', true, []) = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
{with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''0'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end; }
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''0'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('操作失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.Tv1CustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
||||||
|
var
|
||||||
|
FValue: string;
|
||||||
|
FBounds: TRect;
|
||||||
|
begin
|
||||||
|
// FBounds := AViewInfo.Bounds;
|
||||||
|
// if (AViewInfo is TcxGridIndicatorRowItemViewInfo) then
|
||||||
|
// begin
|
||||||
|
// ACanvas.FillRect(FBounds);
|
||||||
|
// ACanvas.DrawComplexFrame(FBounds, clBtnHighlight, clBtnShadow, [bBottom, bLeft, bRight], 1);
|
||||||
|
// FValue := IntToStr(TcxGridIndicatorRowItemViewInfo(AViewInfo).GridRecord.Index + 1);
|
||||||
|
// InflateRect(FBounds, -1, -1);
|
||||||
|
// ACanvas.Font.Color := clBlack;
|
||||||
|
// ACanvas.Brush.Style := bsClear;
|
||||||
|
// ACanvas.DrawText(FValue, FBounds, cxAlignCenter or cxAlignTop);
|
||||||
|
// ADone := True;
|
||||||
|
// end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
begin
|
||||||
|
// if AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('H_PS').Index] >= AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('Qty1').Index] then
|
||||||
|
// begin
|
||||||
|
// ACanvas.Brush.Color := clSkyBlue;
|
||||||
|
// end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPCKList.cxTabControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
initForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
628
管理系统/U_ClothContractCPInPut.dfm
Normal file
628
管理系统/U_ClothContractCPInPut.dfm
Normal file
|
@ -0,0 +1,628 @@
|
||||||
|
object frmClothContractCPInPut: TfrmClothContractCPInPut
|
||||||
|
Left = 725
|
||||||
|
Top = 322
|
||||||
|
Width = 1030
|
||||||
|
Height = 478
|
||||||
|
Caption = #25104#21697#21457#36135#20449#24687
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1014
|
||||||
|
Height = 29
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
EdgeInner = esNone
|
||||||
|
EdgeOuter = esNone
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_TradeManage.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBSave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = TBSaveClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 0
|
||||||
|
Top = 29
|
||||||
|
Width = 1014
|
||||||
|
Height = 92
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvNone
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Ctl3D = False
|
||||||
|
ParentCtl3D = False
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 20
|
||||||
|
Top = 14
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #20219#21153#21333#21495#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 = 290
|
||||||
|
Top = 14
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #23436#25104#26085#26399#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 = 502
|
||||||
|
Top = 14
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #25237#22383#35760#24405#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 = 28
|
||||||
|
Top = 166
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #31614#35746#26085#26399#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 268
|
||||||
|
Top = 150
|
||||||
|
Width = 67
|
||||||
|
Height = 12
|
||||||
|
Caption = #38656' '#26041#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 231
|
||||||
|
Top = 270
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #31614#35746#22320#28857#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 274
|
||||||
|
Top = 178
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #20132#36135#22320#28857#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 510
|
||||||
|
Top = 146
|
||||||
|
Width = 91
|
||||||
|
Height = 12
|
||||||
|
Caption = #37319#36141#35745#21010#21333#21495#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 20
|
||||||
|
Top = 46
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #23436#25104#22791#27880#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label14: TLabel
|
||||||
|
Left = 723
|
||||||
|
Top = 13
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #23384#25918#26579#21378#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object ConNo: TEdit
|
||||||
|
Left = 86
|
||||||
|
Top = 11
|
||||||
|
Width = 137
|
||||||
|
Height = 18
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object DeliveryDate: TDateTimePicker
|
||||||
|
Left = 353
|
||||||
|
Top = 10
|
||||||
|
Width = 134
|
||||||
|
Height = 20
|
||||||
|
BevelInner = bvNone
|
||||||
|
Date = 40916.000000000000000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40916.000000000000000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object FactoryNoName: TcxButtonEdit
|
||||||
|
Left = 790
|
||||||
|
Top = 10
|
||||||
|
Hint = 'FactoryNo'
|
||||||
|
BeepOnEnter = False
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = FactoryNoNamePropertiesButtonClick
|
||||||
|
Properties.OnChange = FactoryNoNamePropertiesChange
|
||||||
|
Style.BorderStyle = ebsSingle
|
||||||
|
TabOrder = 2
|
||||||
|
Width = 134
|
||||||
|
end
|
||||||
|
object PanZDY: TPanel
|
||||||
|
Left = 861
|
||||||
|
Top = 128
|
||||||
|
Width = 202
|
||||||
|
Height = 153
|
||||||
|
TabOrder = 3
|
||||||
|
Visible = False
|
||||||
|
object CXGridZDY: TcxGrid
|
||||||
|
Left = 3
|
||||||
|
Top = 4
|
||||||
|
Width = 197
|
||||||
|
Height = 113
|
||||||
|
TabOrder = 0
|
||||||
|
object TVZDY: TcxGridDBTableView
|
||||||
|
OnKeyPress = TVZDYKeyPress
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
OnCellDblClick = TVZDYCellDblClick
|
||||||
|
DataController.DataSource = DataSource2
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
object VHelpZDYName: TcxGridDBColumn
|
||||||
|
DataBinding.FieldName = 'ZDYName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.handBlack
|
||||||
|
Width = 163
|
||||||
|
IsCaptionAssigned = True
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object CXGridZDYLevel1: TcxGridLevel
|
||||||
|
GridView = TVZDY
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Button1: TButton
|
||||||
|
Left = 64
|
||||||
|
Top = 120
|
||||||
|
Width = 65
|
||||||
|
Height = 25
|
||||||
|
Caption = #20851#38381
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = Button1Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object QDTime: TDateTimePicker
|
||||||
|
Left = 90
|
||||||
|
Top = 162
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
BevelInner = bvNone
|
||||||
|
Date = 40916.670856296290000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40916.670856296290000000
|
||||||
|
ShowCheckbox = True
|
||||||
|
TabOrder = 4
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object CompanyName: TcxButtonEdit
|
||||||
|
Left = 333
|
||||||
|
Top = 146
|
||||||
|
BeepOnEnter = False
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = CompanyNamePropertiesButtonClick
|
||||||
|
Style.BorderStyle = ebsSingle
|
||||||
|
TabOrder = 5
|
||||||
|
Visible = False
|
||||||
|
Width = 132
|
||||||
|
end
|
||||||
|
object QDPalce: TEdit
|
||||||
|
Left = 311
|
||||||
|
Top = 271
|
||||||
|
Width = 131
|
||||||
|
Height = 18
|
||||||
|
TabOrder = 6
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object JHPlace: TcxButtonEdit
|
||||||
|
Left = 341
|
||||||
|
Top = 174
|
||||||
|
BeepOnEnter = False
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = JHPlacePropertiesButtonClick
|
||||||
|
TabOrder = 7
|
||||||
|
Visible = False
|
||||||
|
Width = 388
|
||||||
|
end
|
||||||
|
object fromConNo: TcxButtonEdit
|
||||||
|
Tag = 1
|
||||||
|
Left = 565
|
||||||
|
Top = 10
|
||||||
|
BeepOnEnter = False
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = fromConNoPropertiesButtonClick
|
||||||
|
Style.BorderStyle = ebsSingle
|
||||||
|
TabOrder = 8
|
||||||
|
OnKeyPress = fromConNoKeyPress
|
||||||
|
Width = 116
|
||||||
|
end
|
||||||
|
object GxNote1: TEdit
|
||||||
|
Left = 86
|
||||||
|
Top = 45
|
||||||
|
Width = 595
|
||||||
|
Height = 18
|
||||||
|
TabOrder = 9
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ToolBar2: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 121
|
||||||
|
Width = 1014
|
||||||
|
Height = 29
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
EdgeInner = esNone
|
||||||
|
EdgeOuter = esNone
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_TradeManage.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 2
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 150
|
||||||
|
Width = 1014
|
||||||
|
Height = 179
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 3
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'C_Code'
|
||||||
|
Column = v1Column1
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsCustomize.ColumnSorting = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1Column1PropertiesButtonClick
|
||||||
|
Properties.OnEditValueChanged = v1Column1PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v1PRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684#22411#21495
|
||||||
|
DataBinding.FieldName = 'C_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Styles.Header = DataLink_TradeManage.handBlack
|
||||||
|
Width = 103
|
||||||
|
end
|
||||||
|
object Tv1Column3: TcxGridDBColumn
|
||||||
|
Caption = #33394#21495
|
||||||
|
DataBinding.FieldName = 'C_ColorNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1C_Color: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'C_Color'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1C_ColorPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1PRTColor: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325'(g/'#13217')'
|
||||||
|
DataBinding.FieldName = 'KZQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Styles.Header = DataLink_TradeManage.handBlack
|
||||||
|
Width = 78
|
||||||
|
end
|
||||||
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133'(cm)'
|
||||||
|
DataBinding.FieldName = 'MFQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Styles.Header = DataLink_TradeManage.handBlack
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Qty2: TcxGridDBColumn
|
||||||
|
Caption = #32568#25968
|
||||||
|
DataBinding.FieldName = 'Qty2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object v1ClothUnit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'C_Qty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1ClothUnitPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.handBlack
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'C_Unit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'M'
|
||||||
|
'Kg')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 46
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'C_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 137
|
||||||
|
end
|
||||||
|
object Tv1Column4: TcxGridDBColumn
|
||||||
|
Caption = #24037#33402
|
||||||
|
DataBinding.FieldName = 'gongyi'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 716
|
||||||
|
Top = 125
|
||||||
|
Width = 289
|
||||||
|
Height = 25
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
object Label22: TLabel
|
||||||
|
Left = 32
|
||||||
|
Top = 4
|
||||||
|
Width = 45
|
||||||
|
Height = 14
|
||||||
|
Caption = #21305#25968#65306
|
||||||
|
end
|
||||||
|
object Label23: TLabel
|
||||||
|
Left = 144
|
||||||
|
Top = 4
|
||||||
|
Width = 45
|
||||||
|
Height = 14
|
||||||
|
Caption = #25968#37327#65306
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOTemp: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 816
|
||||||
|
Top = 85
|
||||||
|
end
|
||||||
|
object ADOCmd: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 800
|
||||||
|
Top = 109
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Sub
|
||||||
|
Left = 356
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object Order_Sub: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 424
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = ADOZDY
|
||||||
|
Left = 240
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ADOZDY: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 280
|
||||||
|
Top = 5
|
||||||
|
end
|
||||||
|
object CDS_ZDY: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 208
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 744
|
||||||
|
Top = 129
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 528
|
||||||
|
Top = 97
|
||||||
|
end
|
||||||
|
end
|
1317
管理系统/U_ClothContractCPInPut.pas
Normal file
1317
管理系统/U_ClothContractCPInPut.pas
Normal file
File diff suppressed because it is too large
Load Diff
770
管理系统/U_ClothContractCPRKList.dfm
Normal file
770
管理系统/U_ClothContractCPRKList.dfm
Normal file
|
@ -0,0 +1,770 @@
|
||||||
|
object frmClothContractCPRKList: TfrmClothContractCPRKList
|
||||||
|
Left = 309
|
||||||
|
Top = 284
|
||||||
|
Width = 1222
|
||||||
|
Height = 738
|
||||||
|
Caption = #25104#21697#20837#24211#20449#24687
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1206
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_TradeManage.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#30475
|
||||||
|
ImageIndex = 58
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 441
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 504
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1206
|
||||||
|
Height = 53
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #30331#35760#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 161
|
||||||
|
Top = 22
|
||||||
|
Width = 6
|
||||||
|
Height = 12
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 271
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20219#21153#21333#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 420
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 572
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268#26684
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 704
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#26041
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 836
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21040#36135#22320#28857
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 18
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 167
|
||||||
|
Top = 18
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object ConNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 329
|
||||||
|
Top = 18
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ConNoChange
|
||||||
|
OnKeyPress = conPress
|
||||||
|
end
|
||||||
|
object C_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 473
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object C_Spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 600
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object FactoryNoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 732
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object JHPlace: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 892
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 0
|
||||||
|
Top = 85
|
||||||
|
Width = 1206
|
||||||
|
Height = 497
|
||||||
|
Align = alTop
|
||||||
|
BorderStyle = bsNone
|
||||||
|
TabOrder = 2
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1206
|
||||||
|
Height = 497
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnMouseDown = Tv1MouseDown
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
OnCellDblClick = Tv1CellDblClick
|
||||||
|
OnCustomDrawCell = Tv1CustomDrawCell
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1PRTOrderQty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty1
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
OptionsView.IndicatorWidth = 20
|
||||||
|
Styles.Inactive = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Selection = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
OnCustomDrawIndicatorCell = Tv1CustomDrawIndicatorCell
|
||||||
|
object v1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #20219#21153#21333#21495
|
||||||
|
DataBinding.FieldName = 'ConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object v1Column8: TcxGridDBColumn
|
||||||
|
Caption = #25237#22383#21333#21495
|
||||||
|
DataBinding.FieldName = 'fromConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 86
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1DeliveryDate: TcxGridDBColumn
|
||||||
|
Caption = #21040#36135#26085#26399
|
||||||
|
DataBinding.FieldName = 'DeliveryDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.SaveTime = False
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #31614#35746#26085#26399
|
||||||
|
DataBinding.FieldName = 'QDTime'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1FactoryNo1Name: TcxGridDBColumn
|
||||||
|
Caption = #23384#25918#26579#21378
|
||||||
|
DataBinding.FieldName = 'FactoryNoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1PRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'C_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1PRTMF: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133'(cm)'
|
||||||
|
DataBinding.FieldName = 'MF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325'(g/'#13217')'
|
||||||
|
DataBinding.FieldName = 'KZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v1Qty1: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = cxStyle_fontclBlue
|
||||||
|
Styles.Footer = cxStyle_fontclBlue
|
||||||
|
Styles.Header = cxStyle_fontclBlue
|
||||||
|
Width = 46
|
||||||
|
end
|
||||||
|
object v1PRTOrderQty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'T_Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = cxStyle_fontclBlue
|
||||||
|
Styles.Footer = cxStyle_fontclBlue
|
||||||
|
Styles.Header = cxStyle_fontclBlue
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1OrderUnit: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'C_Unit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 47
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'C_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'LXPerson'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#26041#24335
|
||||||
|
DataBinding.FieldName = 'LXTel'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #21040#36135#22320#28857
|
||||||
|
DataBinding.FieldName = 'JHPlace'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 101
|
||||||
|
end
|
||||||
|
object v1Column18: TcxGridDBColumn
|
||||||
|
Caption = #21046#21333#20154
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column20: TcxGridDBColumn
|
||||||
|
Caption = #21046#21333#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column19: TcxGridDBColumn
|
||||||
|
Caption = #20462#25913#20154
|
||||||
|
DataBinding.FieldName = 'editer'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column21: TcxGridDBColumn
|
||||||
|
Caption = #20462#25913#26102#38388
|
||||||
|
DataBinding.FieldName = 'editTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSel'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'C_Color'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column3: TcxGridDBColumn
|
||||||
|
Caption = #33394#21495
|
||||||
|
DataBinding.FieldName = 'C_ColorNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 1128
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 936
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1000
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1040
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 1168
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 1096
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ClientDataSet3: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 1112
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = ClientDataSet2
|
||||||
|
Left = 880
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object DataSource3: TDataSource
|
||||||
|
DataSet = ClientDataSet3
|
||||||
|
Left = 1112
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object ClientDataSet2: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 920
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDBMain
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 352
|
||||||
|
Top = 192
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDBMain: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_PRT
|
||||||
|
Left = 400
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 416
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object CDS_PRT: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 32
|
||||||
|
end
|
||||||
|
object cxStyleRepository1: TcxStyleRepository
|
||||||
|
Left = 305
|
||||||
|
Top = 310
|
||||||
|
PixelsPerInch = 96
|
||||||
|
object cxStyle1: TcxStyle
|
||||||
|
AssignedValues = [svColor]
|
||||||
|
Color = clInactiveCaption
|
||||||
|
end
|
||||||
|
object cxStyle2: TcxStyle
|
||||||
|
AssignedValues = [svColor, svTextColor]
|
||||||
|
Color = 4707838
|
||||||
|
TextColor = clBtnText
|
||||||
|
end
|
||||||
|
object cxStyle_gridRow: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = 16311512
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
end
|
||||||
|
object cxStyle_gridFoot: TcxStyle
|
||||||
|
AssignedValues = [svFont]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_gridHead: TcxStyle
|
||||||
|
AssignedValues = [svFont]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_gridGroupBox: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = clMoneyGreen
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_yellow: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = 8454143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
end
|
||||||
|
object cxStyle_Red: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = clRed
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
end
|
||||||
|
object cxStyle_fontBlack: TcxStyle
|
||||||
|
AssignedValues = [svFont]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_fontclFuchsia: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clFuchsia
|
||||||
|
end
|
||||||
|
object cxStyle_fontclPurple: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clPurple
|
||||||
|
end
|
||||||
|
object cxStyle_fontclGreen: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clGreen
|
||||||
|
end
|
||||||
|
object cxStyle_fontclBlue: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clBlue
|
||||||
|
end
|
||||||
|
object cxStyle_fontclTeal: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clTeal
|
||||||
|
end
|
||||||
|
object cxStyle_fontclOlive: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clOlive
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
889
管理系统/U_ClothContractCPRKList.pas
Normal file
889
管理系统/U_ClothContractCPRKList.pas
Normal file
|
@ -0,0 +1,889 @@
|
||||||
|
unit U_ClothContractCPRKList;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses, cxControls,
|
||||||
|
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||||
|
cxGrid, DBClient, cxCalendar, cxButtonEdit, cxSplitter, RM_Common, RM_Class,
|
||||||
|
RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, cxTextEdit, cxPC, cxCheckBox,
|
||||||
|
cxCurrencyEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
|
||||||
|
dxBarBuiltInMenu, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
|
||||||
|
dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
|
||||||
|
dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
|
||||||
|
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
|
||||||
|
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||||
|
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||||
|
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||||
|
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||||
|
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
|
||||||
|
dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
|
||||||
|
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
|
||||||
|
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
|
||||||
|
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
|
||||||
|
dxSkinscxPCPainter;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmClothContractCPRKList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Label3: TLabel;
|
||||||
|
ConNo: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
C_CodeName: TEdit;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
Label4: TLabel;
|
||||||
|
C_Spec: TEdit;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1OrderNo: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1DeliveryDate: TcxGridDBColumn;
|
||||||
|
v1FactoryNo1Name: TcxGridDBColumn;
|
||||||
|
v1PRTSpec: TcxGridDBColumn;
|
||||||
|
v1PRTMF: TcxGridDBColumn;
|
||||||
|
v1PRTKZ: TcxGridDBColumn;
|
||||||
|
v1PRTOrderQty: TcxGridDBColumn;
|
||||||
|
v1OrderUnit: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
ClientDataSet3: TClientDataSet;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
DataSource3: TDataSource;
|
||||||
|
ClientDataSet2: TClientDataSet;
|
||||||
|
v1Qty1: TcxGridDBColumn;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDBMain: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
v1Column7: TcxGridDBColumn;
|
||||||
|
CDS_PRT: TClientDataSet;
|
||||||
|
Label6: TLabel;
|
||||||
|
FactoryNoName: TEdit;
|
||||||
|
v1Column8: TcxGridDBColumn;
|
||||||
|
cxStyleRepository1: TcxStyleRepository;
|
||||||
|
cxStyle1: TcxStyle;
|
||||||
|
cxStyle2: TcxStyle;
|
||||||
|
cxStyle_gridRow: TcxStyle;
|
||||||
|
cxStyle_gridFoot: TcxStyle;
|
||||||
|
cxStyle_gridHead: TcxStyle;
|
||||||
|
cxStyle_gridGroupBox: TcxStyle;
|
||||||
|
cxStyle_yellow: TcxStyle;
|
||||||
|
cxStyle_Red: TcxStyle;
|
||||||
|
cxStyle_fontBlack: TcxStyle;
|
||||||
|
cxStyle_fontclFuchsia: TcxStyle;
|
||||||
|
cxStyle_fontclPurple: TcxStyle;
|
||||||
|
cxStyle_fontclGreen: TcxStyle;
|
||||||
|
cxStyle_fontclBlue: TcxStyle;
|
||||||
|
cxStyle_fontclTeal: TcxStyle;
|
||||||
|
cxStyle_fontclOlive: TcxStyle;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
Label7: TLabel;
|
||||||
|
JHPlace: TEdit;
|
||||||
|
v1Column18: TcxGridDBColumn;
|
||||||
|
v1Column19: TcxGridDBColumn;
|
||||||
|
v1Column20: TcxGridDBColumn;
|
||||||
|
v1Column21: TcxGridDBColumn;
|
||||||
|
Tv1Column2: TcxGridDBColumn;
|
||||||
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
Tv1Column3: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBFindClick(Sender: TObject);
|
||||||
|
procedure TBEditClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure ConNoChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure Tv2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure conPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure tchkClick(Sender: TObject);
|
||||||
|
procedure TnochkClick(Sender: TObject);
|
||||||
|
procedure Tv1CustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
||||||
|
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
procedure cxTabControl1Change(Sender: TObject);
|
||||||
|
private
|
||||||
|
FInt, PFInt: Integer;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData(): Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fDParameters1: string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmClothContractCPRKList: TfrmClothContractCPRKList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_ClothContractCPInPut, U_Fun, U_ProductOrderList, U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmClothContractCPRKList := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action := caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ScrollBox1.Align := alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid(self.Caption, Tv1, '指示单管理');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Get_Contract_CP');
|
||||||
|
sql.Add('@begdate=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + ''' ');
|
||||||
|
sql.Add(',@enddate=''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + ''' ');
|
||||||
|
sql.Add(',@conType=''成品完成'' ');
|
||||||
|
sql.Add(',@status=''2'' ');
|
||||||
|
// ShowMessage(SQL.text);
|
||||||
|
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
TBFind.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.InitForm();
|
||||||
|
begin
|
||||||
|
if fDParameters1 = '查询' then
|
||||||
|
begin
|
||||||
|
TBADD.Visible := false;
|
||||||
|
// TBEdit.Visible:=false;
|
||||||
|
TBDel.Visible := false;
|
||||||
|
// Tchk.Visible:=false;
|
||||||
|
// TNochk.Visible:=false;
|
||||||
|
// v1T_money.Visible := false;
|
||||||
|
// v1T_money.Hidden := true;
|
||||||
|
ToolButton1.Visible := false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// TBEdit.Enabled := false;
|
||||||
|
// TBDel.Enabled := false;
|
||||||
|
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.TBFindClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active = False then
|
||||||
|
Exit;
|
||||||
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.TBEditClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select YFID from YF_money_CR ');
|
||||||
|
sql.Add('where mainID=''' + trim(Order_Main.FieldByName('mainID').AsString) + ''' ');
|
||||||
|
sql.Add('and status>0 ');
|
||||||
|
open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('财务数据已审核,不能修改!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
// with ADOQueryTemp do
|
||||||
|
// begin
|
||||||
|
// close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('select * from contract_sub ');
|
||||||
|
// sql.Add('where kcsubid=''' + trim(Order_Main.FieldByName('subid').AsString) + ''' ');
|
||||||
|
//// sql.Add(' ');
|
||||||
|
// open;
|
||||||
|
// if not IsEmpty then
|
||||||
|
// begin
|
||||||
|
// application.MessageBox('已出库不能修改!', '提示信息', MB_ICONERROR);
|
||||||
|
// exit;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
try
|
||||||
|
frmClothContractCPInPut := TfrmClothContractCPInPut.Create(Application);
|
||||||
|
with frmClothContractCPInPut do
|
||||||
|
begin
|
||||||
|
|
||||||
|
PState := 1;
|
||||||
|
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
// TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractCPInPut.Free;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select YFID from YF_money_CR ');
|
||||||
|
sql.Add('where mainID=''' + trim(Order_Main.FieldByName('mainID').AsString) + ''' ');
|
||||||
|
sql.Add('and status>0 ');
|
||||||
|
open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('财务数据已审核,不能删除!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from contract_sub ');
|
||||||
|
sql.Add('where kcsubid=''' + trim(Order_Main.FieldByName('subid').AsString) + ''' ');
|
||||||
|
open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('已出库不能修改!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
if trim(Order_Main.FieldByName('mainID').AsString) = 'CM001' then
|
||||||
|
exit;
|
||||||
|
if DelData() then
|
||||||
|
begin
|
||||||
|
Order_Main.Delete;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmClothContractCPRKList.DelData(): Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result := false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete YF_Money_CR where MainID=''' + Trim(Order_Main.fieldbyname('MainID').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
// sql.Add(' where CRID='+CRID);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub where SubId=''' + Trim(Order_Main.fieldbyname('SubId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Trim(Order_Main.fieldbyname('SubId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result := True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result := False;
|
||||||
|
Application.MessageBox('数据删除异常!', '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
TcxGridToExcel('坯布合同订单列表', cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile, FConNoM: string;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\坯布到货单.rmf';
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select *,fromConNo=(select Top 1 conNo from Contract_Main X where X.MainID=A.fromMainID) ');
|
||||||
|
sql.Add('from Contract_Main A');
|
||||||
|
sql.Add('inner join Contract_sub B on B.MainID=A.mainID ');
|
||||||
|
sql.Add('where A.FillTime>= ''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + ''' ');
|
||||||
|
sql.Add('and A.FillTime< ''' + Trim(FormatDateTime('yyyy-MM-dd', endDate.DateTime + 1)) + ''' ');
|
||||||
|
sql.Add('and A.mainID=' + quotedstr(trim(Order_Main.fieldbyname('MainID').AsString)));
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp, CDS_PRT);
|
||||||
|
SInitCDSData20(ADOQueryTemp, CDS_PRT);
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['dtxz'] := formatdateTime('yyyy-MM-dd', Now);
|
||||||
|
RMVariables['zdr'] := Trim(dName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找' + ExtractFilePath(Application.ExeName) + 'Report\坯布到货单.rmf'), '提示', 0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.TBAddClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmClothContractCPInPut := TfrmClothContractCPInPut.Create(Application);
|
||||||
|
with frmClothContractCPInPut do
|
||||||
|
begin
|
||||||
|
frmClothContractCPInPut.Caption := '成品发货';
|
||||||
|
PState := 0;
|
||||||
|
FMainId := '';
|
||||||
|
FConType := '成品完成';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractCPInPut.Free;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
// try
|
||||||
|
// frmClothContractCPInPut := frmClothContractCPInPut.Create(Application);
|
||||||
|
// with frmClothContractCPInPut do
|
||||||
|
// begin
|
||||||
|
// PState := 0;
|
||||||
|
// FMainId := '';
|
||||||
|
// FConType := '成品完成';
|
||||||
|
// if ShowModal = 1 then
|
||||||
|
// begin
|
||||||
|
//
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
// finally
|
||||||
|
// frmClothContractCPInPut.Free;
|
||||||
|
// TBRafresh.Click;
|
||||||
|
// end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.ConNoChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active = False then
|
||||||
|
Exit;
|
||||||
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption, Tv1, '指示单管理');
|
||||||
|
BegDate.DateTime := SGetServerDate10(ADOQueryTemp) - 7;
|
||||||
|
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||||
|
initForm();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.Tv2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt := 2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt := 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno: string;
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if ClientDataSet2.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MXId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('到货数量未确定!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ClientDataSet3.Locate('OrderNo', null, []) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('指定订单编号不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
BegDate.SetFocus;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
//保存去向表
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd, maxno, 'To', 'Contract_Sub_MxTo', 4, 1) = False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取去向流水号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
maxno := Trim(ClientDataSet3.fieldbyname('ToId').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub_MxTo where ToId=''' + Trim(ClientDataSet3.fieldbyname('ToId').AsString) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString) = '' then
|
||||||
|
Append
|
||||||
|
else
|
||||||
|
Edit;
|
||||||
|
FieldByName('MxId').Value := Trim(ClientDataSet2.fieldbyname('MxId').AsString);
|
||||||
|
FieldByName('ToId').Value := Trim(maxno);
|
||||||
|
FieldByName('OrdSubId').Value := Trim(ClientDataSet3.fieldbyname('OrdSubId').AsString);
|
||||||
|
FieldByName('TPDate').Value := ClientDataSet3.fieldbyname('TPDate').Value;
|
||||||
|
FieldByName('TPPerson').Value := ClientDataSet3.fieldbyname('TPPerson').Value;
|
||||||
|
FieldByName('TPNote').Value := ClientDataSet3.fieldbyname('TPNote').Value;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('TPQty').AsString) <> '' then
|
||||||
|
FieldByName('TPQty').Value := ClientDataSet3.fieldbyname('TPQty').Value
|
||||||
|
else
|
||||||
|
FieldByName('TPQty').Value := 0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty1').AsString) <> '' then
|
||||||
|
FieldByName('Qty1').Value := ClientDataSet3.fieldbyname('Qty1').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty1').Value := 0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty2').AsString) <> '' then
|
||||||
|
FieldByName('Qty2').Value := ClientDataSet3.fieldbyname('Qty2').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty2').Value := 0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty3').AsString) <> '' then
|
||||||
|
FieldByName('Qty3').Value := ClientDataSet3.fieldbyname('Qty3').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty3').Value := 0;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ToId').Value := Trim(maxno);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('操作成功!', '提示', 0);
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('操作异常!', '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FInt = 2 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet2.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if ClientDataSet3.IsEmpty = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生坯布领料数据,不能删除到坯记录!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MxId').AsString) <> '' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_Mx where MxId=''' + Trim(ClientDataSet2.fieldbyname('MxId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet2.Delete;
|
||||||
|
end
|
||||||
|
else if FInt = 3 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString) <> '' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_MxTo where ToId=''' + Trim(ClientDataSet3.fieldbyname('ToId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet3.Delete;
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
if ClientDataSet3.IsEmpty = False then
|
||||||
|
// FieldByName('KCSL').Value:=ClientDataSet2.fieldbyname('MxQty').Value-tv3.DataController.Summary.FooterSummaryValues[0]
|
||||||
|
|
||||||
|
else
|
||||||
|
FieldByName('KCSL').Value := ClientDataSet2.fieldbyname('MxQty').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.v2Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'RKPlace';
|
||||||
|
flagname := '入库地点';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('RKPlace').Value := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.conPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
{ if Key=#13 then
|
||||||
|
begin
|
||||||
|
if Length(Trim(ConNoM.Text))<4 then Exit;
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec ClothContract_QryList :MainId,:WSql');
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and OM.conNo like '''+'%'+Trim(ConNoM.Text)+'%'+'''';
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
try
|
||||||
|
frmClothContractCPInPut := TfrmClothContractCPInPut.Create(Application);
|
||||||
|
with frmClothContractCPInPut do
|
||||||
|
begin
|
||||||
|
PState := 3;
|
||||||
|
TBSave.Enabled := false;
|
||||||
|
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractCPInPut.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
ToolButton1.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.tchkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
{ try
|
||||||
|
frmClothContractInPut := TfrmClothContractInPut.Create(Application);
|
||||||
|
with frmClothContractInPut do
|
||||||
|
begin
|
||||||
|
PState := 1;
|
||||||
|
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
with self.ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''1'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(self.Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(self.Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
self.InitGrid();
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractInPut.Free;
|
||||||
|
// TBRafresh.Click;
|
||||||
|
end; }
|
||||||
|
|
||||||
|
if Order_Main.Locate('ssel', true, []) = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''1'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('操作失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.TnochkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
if Order_Main.Locate('ssel', true, []) = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
{with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''0'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end; }
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''0'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('操作失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.Tv1CustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
||||||
|
var
|
||||||
|
FValue: string;
|
||||||
|
FBounds: TRect;
|
||||||
|
begin
|
||||||
|
// FBounds := AViewInfo.Bounds;
|
||||||
|
// if (AViewInfo is TcxGridIndicatorRowItemViewInfo) then
|
||||||
|
// begin
|
||||||
|
// ACanvas.FillRect(FBounds);
|
||||||
|
// ACanvas.DrawComplexFrame(FBounds, clBtnHighlight, clBtnShadow, [bBottom, bLeft, bRight], 1);
|
||||||
|
// FValue := IntToStr(TcxGridIndicatorRowItemViewInfo(AViewInfo).GridRecord.Index + 1);
|
||||||
|
// InflateRect(FBounds, -1, -1);
|
||||||
|
// ACanvas.Font.Color := clBlack;
|
||||||
|
// ACanvas.Brush.Style := bsClear;
|
||||||
|
// ACanvas.DrawText(FValue, FBounds, cxAlignCenter or cxAlignTop);
|
||||||
|
// ADone := True;
|
||||||
|
// end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
begin
|
||||||
|
// if AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('H_PS').Index] >= AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('Qty1').Index] then
|
||||||
|
// begin
|
||||||
|
// ACanvas.Brush.Color := clSkyBlue;
|
||||||
|
// end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractCPRKList.cxTabControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
initForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
|
@ -587,16 +587,6 @@ object frmClothContractInPut: TfrmClothContractInPut
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 118
|
Width = 118
|
||||||
end
|
end
|
||||||
object Tv1Column2: TcxGridDBColumn
|
|
||||||
Caption = #24211#23384#35843#25972#21305#25968
|
|
||||||
DataBinding.FieldName = 'kctzps'
|
|
||||||
Width = 90
|
|
||||||
end
|
|
||||||
object Tv1Column3: TcxGridDBColumn
|
|
||||||
Caption = #24211#23384#35843#25972#25968#37327
|
|
||||||
DataBinding.FieldName = 'kctzsl'
|
|
||||||
Width = 90
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
object cxGrid1Level1: TcxGridLevel
|
object cxGrid1Level1: TcxGridLevel
|
||||||
GridView = Tv1
|
GridView = Tv1
|
||||||
|
|
|
@ -91,8 +91,6 @@ type
|
||||||
Panel1: TPanel;
|
Panel1: TPanel;
|
||||||
Label11: TLabel;
|
Label11: TLabel;
|
||||||
Tv1Column1: TcxGridDBColumn;
|
Tv1Column1: TcxGridDBColumn;
|
||||||
Tv1Column2: TcxGridDBColumn;
|
|
||||||
Tv1Column3: TcxGridDBColumn;
|
|
||||||
procedure TBCloseClick(Sender: TObject);
|
procedure TBCloseClick(Sender: TObject);
|
||||||
procedure TVZDYCellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
procedure TVZDYCellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
procedure Button1Click(Sender: TObject);
|
procedure Button1Click(Sender: TObject);
|
||||||
|
|
|
@ -424,7 +424,7 @@ object frmClothContractInPut_CG: TfrmClothContractInPut_CG
|
||||||
Width = 103
|
Width = 103
|
||||||
end
|
end
|
||||||
object v1PRTColor: TcxGridDBColumn
|
object v1PRTColor: TcxGridDBColumn
|
||||||
Caption = #20811#37325'(g/'#13217')'
|
Caption = #31859#20811#37325
|
||||||
DataBinding.FieldName = 'KZQty'
|
DataBinding.FieldName = 'KZQty'
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Sorting = False
|
Options.Sorting = False
|
||||||
|
@ -444,6 +444,7 @@ object frmClothContractInPut_CG: TfrmClothContractInPut_CG
|
||||||
DataBinding.FieldName = 'Price'
|
DataBinding.FieldName = 'Price'
|
||||||
PropertiesClassName = 'TcxTextEditProperties'
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
Properties.OnEditValueChanged = v1PricePropertiesEditValueChanged
|
Properties.OnEditValueChanged = v1PricePropertiesEditValueChanged
|
||||||
|
Visible = False
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Styles.Header = DataLink_TradeManage.handBlack
|
Styles.Header = DataLink_TradeManage.handBlack
|
||||||
Width = 58
|
Width = 58
|
||||||
|
@ -459,6 +460,7 @@ object frmClothContractInPut_CG: TfrmClothContractInPut_CG
|
||||||
end>
|
end>
|
||||||
Properties.ReadOnly = True
|
Properties.ReadOnly = True
|
||||||
Properties.OnButtonClick = v1ClothQtyPropertiesButtonClick
|
Properties.OnButtonClick = v1ClothQtyPropertiesButtonClick
|
||||||
|
Visible = False
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Sorting = False
|
Options.Sorting = False
|
||||||
Styles.Header = DataLink_TradeManage.handBlack
|
Styles.Header = DataLink_TradeManage.handBlack
|
||||||
|
@ -503,6 +505,7 @@ object frmClothContractInPut_CG: TfrmClothContractInPut_CG
|
||||||
object v1PRTQty: TcxGridDBColumn
|
object v1PRTQty: TcxGridDBColumn
|
||||||
Caption = #24635#20215
|
Caption = #24635#20215
|
||||||
DataBinding.FieldName = 'Money'
|
DataBinding.FieldName = 'Money'
|
||||||
|
Visible = False
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Focusing = False
|
Options.Focusing = False
|
||||||
Options.Sorting = False
|
Options.Sorting = False
|
||||||
|
@ -512,6 +515,13 @@ object frmClothContractInPut_CG: TfrmClothContractInPut_CG
|
||||||
object v1Column4: TcxGridDBColumn
|
object v1Column4: TcxGridDBColumn
|
||||||
Caption = #22791#27880
|
Caption = #22791#27880
|
||||||
DataBinding.FieldName = 'C_Note'
|
DataBinding.FieldName = 'C_Note'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1Column4PropertiesButtonClick
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Styles.Header = DataLink_TradeManage.Default
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
Width = 85
|
Width = 85
|
||||||
|
|
|
@ -106,6 +106,7 @@ type
|
||||||
procedure v1PricePropertiesEditValueChanged(Sender: TObject);
|
procedure v1PricePropertiesEditValueChanged(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure v1Column4PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
private
|
private
|
||||||
FXS: Integer;
|
FXS: Integer;
|
||||||
procedure InitData();
|
procedure InitData();
|
||||||
|
@ -290,7 +291,7 @@ begin
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
QDTime.DateTime := SGetServerDate(ADOTemp);
|
QDTime.DateTime := SGetServerDate(ADOTemp);
|
||||||
DeliveryDate.DateTime := QDTime.DateTime;
|
DeliveryDate.DateTime := SGetServerDate(ADOTemp);
|
||||||
QDTime.Checked := True;
|
QDTime.Checked := True;
|
||||||
DeliveryDate.Checked := False;
|
DeliveryDate.Checked := False;
|
||||||
ConNo.Text := '×Ô¶¯Éú³É';
|
ConNo.Text := '×Ô¶¯Éú³É';
|
||||||
|
@ -977,5 +978,24 @@ begin
|
||||||
writeCXgrid(self.Caption, tv1);
|
writeCXgrid(self.Caption, tv1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut_CG.v1Column4PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'C_Note';
|
||||||
|
flagname := '±¸×¢';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
Self.Order_Sub.Edit;
|
||||||
|
Self.Order_Sub.FieldByName('C_Note').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
@ -262,17 +262,6 @@ object frmClothContractInPut_Tp: TfrmClothContractInPut_Tp
|
||||||
Enabled = False
|
Enabled = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object DeliveryDate: TDateTimePicker
|
|
||||||
Left = 353
|
|
||||||
Top = 10
|
|
||||||
Width = 134
|
|
||||||
Height = 20
|
|
||||||
BevelInner = bvNone
|
|
||||||
Date = 40916.000000000000000000
|
|
||||||
Format = 'yyyy-MM-dd'
|
|
||||||
Time = 40916.000000000000000000
|
|
||||||
TabOrder = 1
|
|
||||||
end
|
|
||||||
object FactoryNoName: TcxButtonEdit
|
object FactoryNoName: TcxButtonEdit
|
||||||
Left = 574
|
Left = 574
|
||||||
Top = 10
|
Top = 10
|
||||||
|
@ -286,7 +275,7 @@ object frmClothContractInPut_Tp: TfrmClothContractInPut_Tp
|
||||||
Properties.OnButtonClick = FactoryNoNamePropertiesButtonClick
|
Properties.OnButtonClick = FactoryNoNamePropertiesButtonClick
|
||||||
Properties.OnChange = FactoryNoNamePropertiesChange
|
Properties.OnChange = FactoryNoNamePropertiesChange
|
||||||
Style.BorderStyle = ebsSingle
|
Style.BorderStyle = ebsSingle
|
||||||
TabOrder = 2
|
TabOrder = 1
|
||||||
Width = 134
|
Width = 134
|
||||||
end
|
end
|
||||||
object PanZDY: TPanel
|
object PanZDY: TPanel
|
||||||
|
@ -294,7 +283,7 @@ object frmClothContractInPut_Tp: TfrmClothContractInPut_Tp
|
||||||
Top = 128
|
Top = 128
|
||||||
Width = 202
|
Width = 202
|
||||||
Height = 153
|
Height = 153
|
||||||
TabOrder = 3
|
TabOrder = 2
|
||||||
Visible = False
|
Visible = False
|
||||||
object CXGridZDY: TcxGrid
|
object CXGridZDY: TcxGrid
|
||||||
Left = 3
|
Left = 3
|
||||||
|
@ -345,7 +334,7 @@ object frmClothContractInPut_Tp: TfrmClothContractInPut_Tp
|
||||||
Format = 'yyyy-MM-dd'
|
Format = 'yyyy-MM-dd'
|
||||||
Time = 40916.670856296290000000
|
Time = 40916.670856296290000000
|
||||||
ShowCheckbox = True
|
ShowCheckbox = True
|
||||||
TabOrder = 4
|
TabOrder = 3
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
object CompanyName: TcxButtonEdit
|
object CompanyName: TcxButtonEdit
|
||||||
|
@ -359,7 +348,7 @@ object frmClothContractInPut_Tp: TfrmClothContractInPut_Tp
|
||||||
end>
|
end>
|
||||||
Properties.OnButtonClick = CompanyNamePropertiesButtonClick
|
Properties.OnButtonClick = CompanyNamePropertiesButtonClick
|
||||||
Style.BorderStyle = ebsSingle
|
Style.BorderStyle = ebsSingle
|
||||||
TabOrder = 5
|
TabOrder = 4
|
||||||
Visible = False
|
Visible = False
|
||||||
Width = 132
|
Width = 132
|
||||||
end
|
end
|
||||||
|
@ -368,7 +357,7 @@ object frmClothContractInPut_Tp: TfrmClothContractInPut_Tp
|
||||||
Top = 271
|
Top = 271
|
||||||
Width = 131
|
Width = 131
|
||||||
Height = 18
|
Height = 18
|
||||||
TabOrder = 6
|
TabOrder = 5
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
object LXPerson: TEdit
|
object LXPerson: TEdit
|
||||||
|
@ -376,14 +365,14 @@ object frmClothContractInPut_Tp: TfrmClothContractInPut_Tp
|
||||||
Top = 35
|
Top = 35
|
||||||
Width = 134
|
Width = 134
|
||||||
Height = 18
|
Height = 18
|
||||||
TabOrder = 7
|
TabOrder = 6
|
||||||
end
|
end
|
||||||
object LXTel: TEdit
|
object LXTel: TEdit
|
||||||
Left = 354
|
Left = 354
|
||||||
Top = 35
|
Top = 35
|
||||||
Width = 135
|
Width = 135
|
||||||
Height = 18
|
Height = 18
|
||||||
TabOrder = 8
|
TabOrder = 7
|
||||||
end
|
end
|
||||||
object JHPlace: TcxButtonEdit
|
object JHPlace: TcxButtonEdit
|
||||||
Left = 341
|
Left = 341
|
||||||
|
@ -395,7 +384,7 @@ object frmClothContractInPut_Tp: TfrmClothContractInPut_Tp
|
||||||
Kind = bkEllipsis
|
Kind = bkEllipsis
|
||||||
end>
|
end>
|
||||||
Properties.OnButtonClick = JHPlacePropertiesButtonClick
|
Properties.OnButtonClick = JHPlacePropertiesButtonClick
|
||||||
TabOrder = 9
|
TabOrder = 8
|
||||||
Visible = False
|
Visible = False
|
||||||
Width = 388
|
Width = 388
|
||||||
end
|
end
|
||||||
|
@ -411,7 +400,7 @@ object frmClothContractInPut_Tp: TfrmClothContractInPut_Tp
|
||||||
end>
|
end>
|
||||||
Properties.OnButtonClick = fromConNoPropertiesButtonClick
|
Properties.OnButtonClick = fromConNoPropertiesButtonClick
|
||||||
Style.BorderStyle = ebsSingle
|
Style.BorderStyle = ebsSingle
|
||||||
TabOrder = 10
|
TabOrder = 9
|
||||||
Visible = False
|
Visible = False
|
||||||
OnKeyPress = fromConNoKeyPress
|
OnKeyPress = fromConNoKeyPress
|
||||||
Width = 116
|
Width = 116
|
||||||
|
@ -421,7 +410,7 @@ object frmClothContractInPut_Tp: TfrmClothContractInPut_Tp
|
||||||
Top = 67
|
Top = 67
|
||||||
Width = 627
|
Width = 627
|
||||||
Height = 18
|
Height = 18
|
||||||
TabOrder = 11
|
TabOrder = 10
|
||||||
end
|
end
|
||||||
object OrdPerson1: TBtnEditA
|
object OrdPerson1: TBtnEditA
|
||||||
Left = 572
|
Left = 572
|
||||||
|
@ -429,7 +418,7 @@ object frmClothContractInPut_Tp: TfrmClothContractInPut_Tp
|
||||||
Width = 137
|
Width = 137
|
||||||
Height = 20
|
Height = 20
|
||||||
Hint = 'OrdPerson1'
|
Hint = 'OrdPerson1'
|
||||||
TabOrder = 12
|
TabOrder = 11
|
||||||
OnBtnClick = OrdPerson1BtnClick
|
OnBtnClick = OrdPerson1BtnClick
|
||||||
end
|
end
|
||||||
object CustomerNoName: TBtnEditC
|
object CustomerNoName: TBtnEditC
|
||||||
|
@ -438,7 +427,7 @@ object frmClothContractInPut_Tp: TfrmClothContractInPut_Tp
|
||||||
Width = 140
|
Width = 140
|
||||||
Height = 20
|
Height = 20
|
||||||
Hint = 'CustomerNoname'
|
Hint = 'CustomerNoname'
|
||||||
TabOrder = 13
|
TabOrder = 12
|
||||||
OnBtnUpClick = CustomerNoNameBtnUpClick
|
OnBtnUpClick = CustomerNoNameBtnUpClick
|
||||||
end
|
end
|
||||||
object DYer: TBtnEditC
|
object DYer: TBtnEditC
|
||||||
|
@ -447,10 +436,16 @@ object frmClothContractInPut_Tp: TfrmClothContractInPut_Tp
|
||||||
Width = 140
|
Width = 140
|
||||||
Height = 20
|
Height = 20
|
||||||
Hint = 'DYer'
|
Hint = 'DYer'
|
||||||
TabOrder = 14
|
TabOrder = 13
|
||||||
Visible = False
|
Visible = False
|
||||||
OnBtnUpClick = DYerBtnUpClick
|
OnBtnUpClick = DYerBtnUpClick
|
||||||
end
|
end
|
||||||
|
object DeliveryDate: TcxDateEdit
|
||||||
|
Left = 356
|
||||||
|
Top = 8
|
||||||
|
TabOrder = 14
|
||||||
|
Width = 131
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object ToolBar2: TToolBar
|
object ToolBar2: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
|
@ -646,6 +641,19 @@ object frmClothContractInPut_Tp: TfrmClothContractInPut_Tp
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 60
|
Width = 60
|
||||||
end
|
end
|
||||||
|
object Tv1Column5: TcxGridDBColumn
|
||||||
|
Caption = #26159#21542#25340#32568
|
||||||
|
DataBinding.FieldName = 'ISPG'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
''
|
||||||
|
#26159
|
||||||
|
#21542)
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object cxGrid1Level1: TcxGridLevel
|
object cxGrid1Level1: TcxGridLevel
|
||||||
GridView = Tv1
|
GridView = Tv1
|
||||||
|
|
|
@ -23,7 +23,7 @@ uses
|
||||||
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
|
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
|
||||||
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
|
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
|
||||||
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
|
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
|
||||||
dxSkinscxPCPainter;
|
dxSkinscxPCPainter, dxCore, cxDateUtils, cxCalendar;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmClothContractInPut_Tp = class(TForm)
|
TfrmClothContractInPut_Tp = class(TForm)
|
||||||
|
@ -34,7 +34,6 @@ type
|
||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
ConNo: TEdit;
|
ConNo: TEdit;
|
||||||
Label4: TLabel;
|
Label4: TLabel;
|
||||||
DeliveryDate: TDateTimePicker;
|
|
||||||
Label5: TLabel;
|
Label5: TLabel;
|
||||||
ToolBar2: TToolBar;
|
ToolBar2: TToolBar;
|
||||||
ToolButton1: TToolButton;
|
ToolButton1: TToolButton;
|
||||||
|
@ -98,6 +97,8 @@ type
|
||||||
Label13: TLabel;
|
Label13: TLabel;
|
||||||
DYer: TBtnEditC;
|
DYer: TBtnEditC;
|
||||||
Tv1Column4: TcxGridDBColumn;
|
Tv1Column4: TcxGridDBColumn;
|
||||||
|
DeliveryDate: TcxDateEdit;
|
||||||
|
Tv1Column5: TcxGridDBColumn;
|
||||||
procedure TBCloseClick(Sender: TObject);
|
procedure TBCloseClick(Sender: TObject);
|
||||||
procedure TVZDYCellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
procedure TVZDYCellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
procedure Button1Click(Sender: TObject);
|
procedure Button1Click(Sender: TObject);
|
||||||
|
@ -417,9 +418,15 @@ begin
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
QDTime.DateTime := SGetServerDate(ADOTemp);
|
QDTime.DateTime := SGetServerDate(ADOTemp);
|
||||||
DeliveryDate.DateTime := SGetServerDate(ADOTemp);
|
// DeliveryDate.DateTime := SGetServerDate(ADOTemp);
|
||||||
|
if FConType = '坯布预投坯' then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end
|
||||||
|
else
|
||||||
|
DeliveryDate.Date := SGetServerDate(ADOTemp);
|
||||||
QDTime.Checked := True;
|
QDTime.Checked := True;
|
||||||
DeliveryDate.Checked := False;
|
// DeliveryDate.Checked := False;
|
||||||
ConNo.Text := '自动生成';
|
ConNo.Text := '自动生成';
|
||||||
end;
|
end;
|
||||||
PanZDY.Visible := False;
|
PanZDY.Visible := False;
|
||||||
|
@ -501,6 +508,10 @@ begin
|
||||||
Tv1Column4.Visible := True;
|
Tv1Column4.Visible := True;
|
||||||
// DYer.Visible := True;
|
// DYer.Visible := True;
|
||||||
end;
|
end;
|
||||||
|
if Trim(FConType) = '坯布预投坯' then
|
||||||
|
begin
|
||||||
|
Tv1Column5.Visible := True;
|
||||||
|
end;
|
||||||
readCXgrid(self.Caption, tv1);
|
readCXgrid(self.Caption, tv1);
|
||||||
InitData();
|
InitData();
|
||||||
end;
|
end;
|
||||||
|
@ -730,6 +741,11 @@ begin
|
||||||
Application.MessageBox('合同编号不能为空!', '提示', 0);
|
Application.MessageBox('合同编号不能为空!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
if Trim(DeliveryDate.Text) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('投坯日期不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
if Trim(FactoryNoName.Text) = '' then
|
if Trim(FactoryNoName.Text) = '' then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('加工厂不能为空!', '提示', 0);
|
Application.MessageBox('加工厂不能为空!', '提示', 0);
|
||||||
|
@ -801,6 +817,7 @@ begin
|
||||||
ConNo.Text := '';
|
ConNo.Text := '';
|
||||||
FactoryNoName.Text := '';
|
FactoryNoName.Text := '';
|
||||||
CompanyName.Text := '';
|
CompanyName.Text := '';
|
||||||
|
DeliveryDate.text := '';
|
||||||
LXPerson.Text := '';
|
LXPerson.Text := '';
|
||||||
LXTel.Text := '';
|
LXTel.Text := '';
|
||||||
JHPlace.Text := '';
|
JHPlace.Text := '';
|
||||||
|
|
|
@ -438,15 +438,15 @@ object frmClothContractList: TfrmClothContractList
|
||||||
end
|
end
|
||||||
object v1PRTMF: TcxGridDBColumn
|
object v1PRTMF: TcxGridDBColumn
|
||||||
Caption = #38376#24133'(cm)'
|
Caption = #38376#24133'(cm)'
|
||||||
DataBinding.FieldName = 'MFQty'
|
DataBinding.FieldName = 'MF'
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Styles.Header = DataLink_TradeManage.Default
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
Width = 61
|
Width = 61
|
||||||
end
|
end
|
||||||
object v1PRTKZ: TcxGridDBColumn
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
Caption = #20811#37325'(g/'#13217')'
|
Caption = #31859#20811#37325
|
||||||
DataBinding.FieldName = 'KZQty'
|
DataBinding.FieldName = 'KZ'
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Styles.Header = DataLink_TradeManage.Default
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
|
|
@ -387,7 +387,7 @@ object frmClothContractList_CG: TfrmClothContractList_CG
|
||||||
Width = 61
|
Width = 61
|
||||||
end
|
end
|
||||||
object v1PRTKZ: TcxGridDBColumn
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
Caption = #20811#37325'(g/'#13217')'
|
Caption = #31859#20811#37325
|
||||||
DataBinding.FieldName = 'KZQty'
|
DataBinding.FieldName = 'KZQty'
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Styles.Header = DataLink_TradeManage.Default
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
|
|
@ -131,6 +131,7 @@ object frmClothContractList_CK: TfrmClothContractList_CK
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25171#21360
|
Caption = #25171#21360
|
||||||
ImageIndex = 12
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
OnClick = TBPrintClick
|
OnClick = TBPrintClick
|
||||||
end
|
end
|
||||||
object TBClose: TToolButton
|
object TBClose: TToolButton
|
||||||
|
@ -349,11 +350,9 @@ object frmClothContractList_CK: TfrmClothContractList_CK
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Kind = skSum
|
Kind = skSum
|
||||||
Column = v1Column16
|
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Kind = skSum
|
Kind = skSum
|
||||||
Column = v1Column17
|
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Kind = skSum
|
Kind = skSum
|
||||||
|
@ -441,15 +440,15 @@ object frmClothContractList_CK: TfrmClothContractList_CK
|
||||||
end
|
end
|
||||||
object v1PRTMF: TcxGridDBColumn
|
object v1PRTMF: TcxGridDBColumn
|
||||||
Caption = #38376#24133'(cm)'
|
Caption = #38376#24133'(cm)'
|
||||||
DataBinding.FieldName = 'MFQty'
|
DataBinding.FieldName = 'MF'
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Styles.Header = DataLink_TradeManage.Default
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
Width = 61
|
Width = 61
|
||||||
end
|
end
|
||||||
object v1PRTKZ: TcxGridDBColumn
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
Caption = #20811#37325'(g/'#13217')'
|
Caption = #31859#20811#37325
|
||||||
DataBinding.FieldName = 'KZQty'
|
DataBinding.FieldName = 'KZ'
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Styles.Header = DataLink_TradeManage.Default
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
@ -515,26 +514,6 @@ object frmClothContractList_CK: TfrmClothContractList_CK
|
||||||
Styles.Header = DataLink_TradeManage.Default
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
Width = 101
|
Width = 101
|
||||||
end
|
end
|
||||||
object v1Column16: TcxGridDBColumn
|
|
||||||
Caption = #24211#23384#21305#25968
|
|
||||||
DataBinding.FieldName = 'N_Ps'
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Options.Editing = False
|
|
||||||
Styles.Content = cxStyle_fontclFuchsia
|
|
||||||
Styles.Footer = cxStyle_fontclFuchsia
|
|
||||||
Styles.Header = cxStyle_fontclFuchsia
|
|
||||||
Width = 60
|
|
||||||
end
|
|
||||||
object v1Column17: TcxGridDBColumn
|
|
||||||
Caption = #24211#23384#25968#37327
|
|
||||||
DataBinding.FieldName = 'N_Qty'
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Options.Editing = False
|
|
||||||
Styles.Content = cxStyle_fontclFuchsia
|
|
||||||
Styles.Footer = cxStyle_fontclFuchsia
|
|
||||||
Styles.Header = cxStyle_fontclFuchsia
|
|
||||||
Width = 60
|
|
||||||
end
|
|
||||||
object v1Column18: TcxGridDBColumn
|
object v1Column18: TcxGridDBColumn
|
||||||
Caption = #21046#21333#20154
|
Caption = #21046#21333#20154
|
||||||
DataBinding.FieldName = 'Filler'
|
DataBinding.FieldName = 'Filler'
|
||||||
|
|
|
@ -105,8 +105,6 @@ type
|
||||||
cxTabControl1: TcxTabControl;
|
cxTabControl1: TcxTabControl;
|
||||||
tchk: TToolButton;
|
tchk: TToolButton;
|
||||||
Tnochk: TToolButton;
|
Tnochk: TToolButton;
|
||||||
v1Column16: TcxGridDBColumn;
|
|
||||||
v1Column17: TcxGridDBColumn;
|
|
||||||
Label7: TLabel;
|
Label7: TLabel;
|
||||||
JHPlace: TEdit;
|
JHPlace: TEdit;
|
||||||
v1Column18: TcxGridDBColumn;
|
v1Column18: TcxGridDBColumn;
|
||||||
|
@ -198,7 +196,7 @@ begin
|
||||||
sql.Add(',@enddate=''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + ''' ');
|
sql.Add(',@enddate=''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + ''' ');
|
||||||
sql.Add(',@conType=''Å÷²¼³ö¿â'' ');
|
sql.Add(',@conType=''Å÷²¼³ö¿â'' ');
|
||||||
sql.Add(',@status=''' + inttostr(cxTabControl1.TabIndex) + ''' ');
|
sql.Add(',@status=''' + inttostr(cxTabControl1.TabIndex) + ''' ');
|
||||||
ShowMessage(SQL.text);
|
// ShowMessage(SQL.text);
|
||||||
{ sql.Add('select *,fromConNo=(select Top 1 conNo from Contract_Main X where X.MainID=A.fromMainID) ');
|
{ sql.Add('select *,fromConNo=(select Top 1 conNo from Contract_Main X where X.MainID=A.fromMainID) ');
|
||||||
sql.Add('from Contract_Main A');
|
sql.Add('from Contract_Main A');
|
||||||
sql.Add('inner join Contract_sub B on B.MainID=A.mainID ');
|
sql.Add('inner join Contract_sub B on B.MainID=A.mainID ');
|
||||||
|
|
813
管理系统/U_ClothContractList_CK_help.dfm
Normal file
813
管理系统/U_ClothContractList_CK_help.dfm
Normal file
|
@ -0,0 +1,813 @@
|
||||||
|
object frmClothContractList_CK_help: TfrmClothContractList_CK_help
|
||||||
|
Left = 309
|
||||||
|
Top = 284
|
||||||
|
Width = 1222
|
||||||
|
Height = 738
|
||||||
|
Caption = #22383#24067#20986#24211#20449#24687
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1206
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_TradeManage.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object tchk: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #30830#35748#23436#25104
|
||||||
|
ImageIndex = 41
|
||||||
|
Visible = False
|
||||||
|
OnClick = tchkClick
|
||||||
|
end
|
||||||
|
object Tnochk: TToolButton
|
||||||
|
Left = 402
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25764#38144#23436#25104
|
||||||
|
Enabled = False
|
||||||
|
ImageIndex = 56
|
||||||
|
Visible = False
|
||||||
|
OnClick = TnochkClick
|
||||||
|
end
|
||||||
|
object Tth: TToolButton
|
||||||
|
Left = 489
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36864#36135
|
||||||
|
ImageIndex = 129
|
||||||
|
Visible = False
|
||||||
|
OnClick = TthClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 552
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#30475
|
||||||
|
ImageIndex = 58
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 615
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 678
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 741
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1206
|
||||||
|
Height = 53
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #30331#35760#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 161
|
||||||
|
Top = 22
|
||||||
|
Width = 6
|
||||||
|
Height = 12
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 271
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20219#21153#21333#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 420
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 572
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268#26684
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 704
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#26041
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 836
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21040#36135#22320#28857
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 18
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 167
|
||||||
|
Top = 18
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object ConNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 329
|
||||||
|
Top = 18
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ConNoChange
|
||||||
|
OnKeyPress = conPress
|
||||||
|
end
|
||||||
|
object C_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 473
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object C_Spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 600
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object FactoryNoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 732
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object JHPlace: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 892
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 0
|
||||||
|
Top = 107
|
||||||
|
Width = 1206
|
||||||
|
Height = 497
|
||||||
|
Align = alTop
|
||||||
|
BorderStyle = bsNone
|
||||||
|
TabOrder = 2
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1206
|
||||||
|
Height = 497
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnMouseDown = Tv1MouseDown
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
OnCellDblClick = Tv1CellDblClick
|
||||||
|
OnCustomDrawCell = Tv1CustomDrawCell
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1PRTOrderQty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty1
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
OptionsView.IndicatorWidth = 20
|
||||||
|
Styles.Inactive = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Selection = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
OnCustomDrawIndicatorCell = Tv1CustomDrawIndicatorCell
|
||||||
|
object v1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #20219#21153#21333#21495
|
||||||
|
DataBinding.FieldName = 'ConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object v1Column8: TcxGridDBColumn
|
||||||
|
Caption = #37319#36141#35745#21010#21333#21495
|
||||||
|
DataBinding.FieldName = 'fromConNo'
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 86
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1DeliveryDate: TcxGridDBColumn
|
||||||
|
Caption = #21040#36135#26085#26399
|
||||||
|
DataBinding.FieldName = 'DeliveryDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.SaveTime = False
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #31614#35746#26085#26399
|
||||||
|
DataBinding.FieldName = 'QDTime'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1FactoryNo1Name: TcxGridDBColumn
|
||||||
|
Caption = #20379#26041
|
||||||
|
DataBinding.FieldName = 'FactoryNoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1PRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'C_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1PRTMF: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133'(cm)'
|
||||||
|
DataBinding.FieldName = 'MF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325'(g/'#13217')'
|
||||||
|
DataBinding.FieldName = 'KZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v1Qty1: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = cxStyle_fontclBlue
|
||||||
|
Styles.Footer = cxStyle_fontclBlue
|
||||||
|
Styles.Header = cxStyle_fontclBlue
|
||||||
|
Width = 46
|
||||||
|
end
|
||||||
|
object v1PRTOrderQty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'T_Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = cxStyle_fontclBlue
|
||||||
|
Styles.Footer = cxStyle_fontclBlue
|
||||||
|
Styles.Header = cxStyle_fontclBlue
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1OrderUnit: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'C_Unit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 47
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'C_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'LXPerson'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#26041#24335
|
||||||
|
DataBinding.FieldName = 'LXTel'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #21040#36135#22320#28857
|
||||||
|
DataBinding.FieldName = 'JHPlace'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 101
|
||||||
|
end
|
||||||
|
object v1Column18: TcxGridDBColumn
|
||||||
|
Caption = #21046#21333#20154
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column20: TcxGridDBColumn
|
||||||
|
Caption = #21046#21333#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column19: TcxGridDBColumn
|
||||||
|
Caption = #20462#25913#20154
|
||||||
|
DataBinding.FieldName = 'editer'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column21: TcxGridDBColumn
|
||||||
|
Caption = #20462#25913#26102#38388
|
||||||
|
DataBinding.FieldName = 'editTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#21697#21517
|
||||||
|
DataBinding.FieldName = 'CP_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSel'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxTabControl1: TcxTabControl
|
||||||
|
Left = 0
|
||||||
|
Top = 85
|
||||||
|
Width = 1206
|
||||||
|
Height = 22
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 3
|
||||||
|
Visible = False
|
||||||
|
Properties.CustomButtons.Buttons = <>
|
||||||
|
Properties.Style = 9
|
||||||
|
Properties.TabIndex = 0
|
||||||
|
Properties.Tabs.Strings = (
|
||||||
|
#26410#23436#25104
|
||||||
|
#24050#23436#25104
|
||||||
|
#20840#37096)
|
||||||
|
OnChange = cxTabControl1Change
|
||||||
|
ClientRectBottom = 22
|
||||||
|
ClientRectRight = 1206
|
||||||
|
ClientRectTop = 19
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 1128
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 936
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1000
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1040
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 1168
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 1096
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ClientDataSet3: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 1112
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = ClientDataSet2
|
||||||
|
Left = 880
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object DataSource3: TDataSource
|
||||||
|
DataSet = ClientDataSet3
|
||||||
|
Left = 1112
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object ClientDataSet2: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 920
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDBMain
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 352
|
||||||
|
Top = 192
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDBMain: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_PRT
|
||||||
|
Left = 400
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 416
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object CDS_PRT: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 32
|
||||||
|
end
|
||||||
|
object cxStyleRepository1: TcxStyleRepository
|
||||||
|
Left = 305
|
||||||
|
Top = 310
|
||||||
|
PixelsPerInch = 96
|
||||||
|
object cxStyle1: TcxStyle
|
||||||
|
AssignedValues = [svColor]
|
||||||
|
Color = clInactiveCaption
|
||||||
|
end
|
||||||
|
object cxStyle2: TcxStyle
|
||||||
|
AssignedValues = [svColor, svTextColor]
|
||||||
|
Color = 4707838
|
||||||
|
TextColor = clBtnText
|
||||||
|
end
|
||||||
|
object cxStyle_gridRow: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = 16311512
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
end
|
||||||
|
object cxStyle_gridFoot: TcxStyle
|
||||||
|
AssignedValues = [svFont]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_gridHead: TcxStyle
|
||||||
|
AssignedValues = [svFont]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_gridGroupBox: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = clMoneyGreen
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_yellow: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = 8454143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
end
|
||||||
|
object cxStyle_Red: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = clRed
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
end
|
||||||
|
object cxStyle_fontBlack: TcxStyle
|
||||||
|
AssignedValues = [svFont]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_fontclFuchsia: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clFuchsia
|
||||||
|
end
|
||||||
|
object cxStyle_fontclPurple: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clPurple
|
||||||
|
end
|
||||||
|
object cxStyle_fontclGreen: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clGreen
|
||||||
|
end
|
||||||
|
object cxStyle_fontclBlue: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clBlue
|
||||||
|
end
|
||||||
|
object cxStyle_fontclTeal: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clTeal
|
||||||
|
end
|
||||||
|
object cxStyle_fontclOlive: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clOlive
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
962
管理系统/U_ClothContractList_CK_help.pas
Normal file
962
管理系统/U_ClothContractList_CK_help.pas
Normal file
|
@ -0,0 +1,962 @@
|
||||||
|
unit U_ClothContractList_CK_help;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses, cxControls,
|
||||||
|
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||||
|
cxGrid, DBClient, cxCalendar, cxButtonEdit, cxSplitter, RM_Common, RM_Class,
|
||||||
|
RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, cxTextEdit, cxPC, cxCheckBox,
|
||||||
|
cxCurrencyEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
|
||||||
|
dxBarBuiltInMenu, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
|
||||||
|
dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
|
||||||
|
dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
|
||||||
|
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
|
||||||
|
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||||
|
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||||
|
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||||
|
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||||
|
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
|
||||||
|
dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
|
||||||
|
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
|
||||||
|
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
|
||||||
|
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
|
||||||
|
dxSkinscxPCPainter;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmClothContractList_CK_help = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Label3: TLabel;
|
||||||
|
ConNo: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
C_CodeName: TEdit;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
Label4: TLabel;
|
||||||
|
C_Spec: TEdit;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1OrderNo: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1DeliveryDate: TcxGridDBColumn;
|
||||||
|
v1FactoryNo1Name: TcxGridDBColumn;
|
||||||
|
v1PRTSpec: TcxGridDBColumn;
|
||||||
|
v1PRTMF: TcxGridDBColumn;
|
||||||
|
v1PRTKZ: TcxGridDBColumn;
|
||||||
|
v1PRTOrderQty: TcxGridDBColumn;
|
||||||
|
v1OrderUnit: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
ClientDataSet3: TClientDataSet;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
DataSource3: TDataSource;
|
||||||
|
ClientDataSet2: TClientDataSet;
|
||||||
|
v1Qty1: TcxGridDBColumn;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDBMain: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
v1Column7: TcxGridDBColumn;
|
||||||
|
CDS_PRT: TClientDataSet;
|
||||||
|
Label6: TLabel;
|
||||||
|
FactoryNoName: TEdit;
|
||||||
|
v1Column8: TcxGridDBColumn;
|
||||||
|
cxStyleRepository1: TcxStyleRepository;
|
||||||
|
cxStyle1: TcxStyle;
|
||||||
|
cxStyle2: TcxStyle;
|
||||||
|
cxStyle_gridRow: TcxStyle;
|
||||||
|
cxStyle_gridFoot: TcxStyle;
|
||||||
|
cxStyle_gridHead: TcxStyle;
|
||||||
|
cxStyle_gridGroupBox: TcxStyle;
|
||||||
|
cxStyle_yellow: TcxStyle;
|
||||||
|
cxStyle_Red: TcxStyle;
|
||||||
|
cxStyle_fontBlack: TcxStyle;
|
||||||
|
cxStyle_fontclFuchsia: TcxStyle;
|
||||||
|
cxStyle_fontclPurple: TcxStyle;
|
||||||
|
cxStyle_fontclGreen: TcxStyle;
|
||||||
|
cxStyle_fontclBlue: TcxStyle;
|
||||||
|
cxStyle_fontclTeal: TcxStyle;
|
||||||
|
cxStyle_fontclOlive: TcxStyle;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
Tth: TToolButton;
|
||||||
|
cxTabControl1: TcxTabControl;
|
||||||
|
tchk: TToolButton;
|
||||||
|
Tnochk: TToolButton;
|
||||||
|
Label7: TLabel;
|
||||||
|
JHPlace: TEdit;
|
||||||
|
v1Column18: TcxGridDBColumn;
|
||||||
|
v1Column19: TcxGridDBColumn;
|
||||||
|
v1Column20: TcxGridDBColumn;
|
||||||
|
v1Column21: TcxGridDBColumn;
|
||||||
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
Tv1Column2: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBFindClick(Sender: TObject);
|
||||||
|
procedure TBEditClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure ConNoChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure Tv2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure conPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure TthClick(Sender: TObject);
|
||||||
|
procedure tchkClick(Sender: TObject);
|
||||||
|
procedure TnochkClick(Sender: TObject);
|
||||||
|
procedure Tv1CustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
||||||
|
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
procedure cxTabControl1Change(Sender: TObject);
|
||||||
|
private
|
||||||
|
FInt, PFInt: Integer;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData(): Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fDParameters1: string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmClothContractList_CK_help: TfrmClothContractList_CK_help;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_ClothContractOutPut, U_Fun, U_ProductOrderList, U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmClothContractList_CK_help := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action := caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ScrollBox1.Align := alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid(self.Caption, Tv1, '指示单管理');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Get_Contract');
|
||||||
|
sql.Add('@begdate=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + ''' ');
|
||||||
|
sql.Add(',@enddate=''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + ''' ');
|
||||||
|
sql.Add(',@conType=''坯布出库'' ');
|
||||||
|
sql.Add(',@status=''' + inttostr(cxTabControl1.TabIndex) + ''' ');
|
||||||
|
// ShowMessage(SQL.text);
|
||||||
|
{ sql.Add('select *,fromConNo=(select Top 1 conNo from Contract_Main X where X.MainID=A.fromMainID) ');
|
||||||
|
sql.Add('from Contract_Main A');
|
||||||
|
sql.Add('inner join Contract_sub B on B.MainID=A.mainID ');
|
||||||
|
sql.Add('where A.FillTime>= '''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+''' ');
|
||||||
|
sql.Add('and A.FillTime< '''+Trim(FormatDateTime('yyyy-MM-dd',endDate.DateTime+1))+''' ');
|
||||||
|
sql.Add('and A.conType=''坯布到货'' ');
|
||||||
|
IF cxTabControl1.TabIndex<2 then
|
||||||
|
sql.Add('and isnull(B.C_status,''0'')='''+inttostr(cxTabControl1.TabIndex)+''' '); }
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
TBFind.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.InitForm();
|
||||||
|
begin
|
||||||
|
// if fDParameters1 = '查询' then
|
||||||
|
// begin
|
||||||
|
// TBADD.Visible := false;
|
||||||
|
// // TBEdit.Visible:=false;
|
||||||
|
// TBDel.Visible := false;
|
||||||
|
// // Tchk.Visible:=false;
|
||||||
|
// // TNochk.Visible:=false;
|
||||||
|
// Tth.Visible := false;
|
||||||
|
// v1Price.Visible := false;
|
||||||
|
// v1Price.Hidden := true;
|
||||||
|
// v1money.Visible := false;
|
||||||
|
// v1money.Hidden := true;
|
||||||
|
//// v1T_money.Visible := false;
|
||||||
|
//// v1T_money.Hidden := true;
|
||||||
|
// ToolButton1.Visible := false;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// TBEdit.Enabled := false;
|
||||||
|
// TBDel.Enabled := false;
|
||||||
|
// Tchk.Enabled := false;
|
||||||
|
// TNochk.Enabled := false;
|
||||||
|
// Tth.Enabled := false;
|
||||||
|
// if cxTabControl1.TabIndex = 0 then
|
||||||
|
// begin
|
||||||
|
//// TBEdit.Enabled := true;
|
||||||
|
// TBDel.Enabled := true;
|
||||||
|
// Tchk.Enabled := true;
|
||||||
|
// Tth.Enabled := true;
|
||||||
|
// end;
|
||||||
|
// if cxTabControl1.TabIndex = 1 then
|
||||||
|
// begin
|
||||||
|
// TNochk.Enabled := true;
|
||||||
|
// end;
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.TBFindClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active = False then
|
||||||
|
Exit;
|
||||||
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.TBEditClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select YFID from YF_money_CR ');
|
||||||
|
sql.Add('where mainID=''' + trim(Order_Main.FieldByName('mainID').AsString) + ''' ');
|
||||||
|
sql.Add('and status>0 ');
|
||||||
|
open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('财务数据已审核,不能修改!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
// with ADOQueryTemp do
|
||||||
|
// begin
|
||||||
|
// close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('select * from contract_sub ');
|
||||||
|
// sql.Add('where kcsubid=''' + trim(Order_Main.FieldByName('subid').AsString) + ''' ');
|
||||||
|
//// sql.Add(' ');
|
||||||
|
// open;
|
||||||
|
// if not IsEmpty then
|
||||||
|
// begin
|
||||||
|
// application.MessageBox('已出库不能修改!', '提示信息', MB_ICONERROR);
|
||||||
|
// exit;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
try
|
||||||
|
frmClothContractOutPut := TfrmClothContractOutPut.Create(Application);
|
||||||
|
with frmClothContractOutPut do
|
||||||
|
begin
|
||||||
|
if trim(fDParameters1) = '查询' then
|
||||||
|
begin
|
||||||
|
frmClothContractOutPut.Caption := '到货信息查询';
|
||||||
|
// v1Money.Visible := false;
|
||||||
|
// v1Price.Visible := false;
|
||||||
|
// v1Money.Hidden := true;
|
||||||
|
// v1Price.Hidden := true;
|
||||||
|
v1T_money.Visible := false;
|
||||||
|
v1T_money.Hidden := true;
|
||||||
|
v1T_price.Visible := false;
|
||||||
|
v1T_price.Hidden := true;
|
||||||
|
ScrollBox1.Enabled := false;
|
||||||
|
for i := 0 to tv1.ColumnCount - 1 do
|
||||||
|
begin
|
||||||
|
tv1.Columns[i].Options.Editing := false;
|
||||||
|
end;
|
||||||
|
// v1Mrate.Options.Editing := true;
|
||||||
|
ToolBar2.Enabled := false;
|
||||||
|
end;
|
||||||
|
PState := 1;
|
||||||
|
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
// TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractOutPut.Free;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select YFID from YF_money_CR ');
|
||||||
|
sql.Add('where mainID=''' + trim(Order_Main.FieldByName('mainID').AsString) + ''' ');
|
||||||
|
sql.Add('and status>0 ');
|
||||||
|
open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('财务数据已审核,不能删除!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from contract_sub ');
|
||||||
|
sql.Add('where kcsubid=''' + trim(Order_Main.FieldByName('subid').AsString) + ''' ');
|
||||||
|
open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('已出库不能修改!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
if trim(Order_Main.FieldByName('mainID').AsString) = 'CM001' then
|
||||||
|
exit;
|
||||||
|
if DelData() then
|
||||||
|
begin
|
||||||
|
Order_Main.Delete;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmClothContractList_CK_help.DelData(): Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result := false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete YF_Money_CR where MainID=''' + Trim(Order_Main.fieldbyname('MainID').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
// sql.Add(' where CRID='+CRID);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub where SubId=''' + Trim(Order_Main.fieldbyname('SubId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Trim(Order_Main.fieldbyname('SubId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result := True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result := False;
|
||||||
|
Application.MessageBox('数据删除异常!', '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
TcxGridToExcel('坯布合同订单列表', cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile, FConNoM: string;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\坯布到货单.rmf';
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select *,fromConNo=(select Top 1 conNo from Contract_Main X where X.MainID=A.fromMainID) ');
|
||||||
|
sql.Add('from Contract_Main A');
|
||||||
|
sql.Add('inner join Contract_sub B on B.MainID=A.mainID ');
|
||||||
|
sql.Add('where A.FillTime>= ''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + ''' ');
|
||||||
|
sql.Add('and A.FillTime< ''' + Trim(FormatDateTime('yyyy-MM-dd', endDate.DateTime + 1)) + ''' ');
|
||||||
|
sql.Add('and A.mainID=' + quotedstr(trim(Order_Main.fieldbyname('MainID').AsString)));
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp, CDS_PRT);
|
||||||
|
SInitCDSData20(ADOQueryTemp, CDS_PRT);
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['dtxz'] := formatdateTime('yyyy-MM-dd', Now);
|
||||||
|
RMVariables['zdr'] := Trim(dName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找' + ExtractFilePath(Application.ExeName) + 'Report\坯布到货单.rmf'), '提示', 0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.TBAddClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmClothContractOutPut := TfrmClothContractOutPut.Create(Application);
|
||||||
|
with frmClothContractOutPut do
|
||||||
|
begin
|
||||||
|
if trim(fDParameters1) = '查询' then
|
||||||
|
begin
|
||||||
|
// frmClothContractOutPut.Caption := '到货信息查询';
|
||||||
|
// v1Money.Visible := false;
|
||||||
|
// v1Price.Visible := false;
|
||||||
|
// v1Money.Hidden := true;
|
||||||
|
// v1Price.Hidden := true;
|
||||||
|
v1T_money.Visible := false;
|
||||||
|
v1T_money.Hidden := true;
|
||||||
|
ScrollBox1.Enabled := false;
|
||||||
|
for i := 0 to tv1.ColumnCount - 2 do
|
||||||
|
begin
|
||||||
|
tv1.Columns[i].Options.Editing := false;
|
||||||
|
end;
|
||||||
|
// v1Mrate.Options.Editing := true;
|
||||||
|
ToolBar2.Enabled := false;
|
||||||
|
end;
|
||||||
|
PState := 0;
|
||||||
|
FMainId := '';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractOutPut.Free;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.ConNoChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active = False then
|
||||||
|
Exit;
|
||||||
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption, Tv1, '指示单管理');
|
||||||
|
BegDate.DateTime := SGetServerDate10(ADOQueryTemp) - 7;
|
||||||
|
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||||
|
initForm();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.Tv2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt := 2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt := 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno: string;
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if ClientDataSet2.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MXId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('到货数量未确定!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ClientDataSet3.Locate('OrderNo', null, []) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('指定订单编号不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
BegDate.SetFocus;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
//保存去向表
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd, maxno, 'To', 'Contract_Sub_MxTo', 4, 1) = False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取去向流水号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
maxno := Trim(ClientDataSet3.fieldbyname('ToId').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub_MxTo where ToId=''' + Trim(ClientDataSet3.fieldbyname('ToId').AsString) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString) = '' then
|
||||||
|
Append
|
||||||
|
else
|
||||||
|
Edit;
|
||||||
|
FieldByName('MxId').Value := Trim(ClientDataSet2.fieldbyname('MxId').AsString);
|
||||||
|
FieldByName('ToId').Value := Trim(maxno);
|
||||||
|
FieldByName('OrdSubId').Value := Trim(ClientDataSet3.fieldbyname('OrdSubId').AsString);
|
||||||
|
FieldByName('TPDate').Value := ClientDataSet3.fieldbyname('TPDate').Value;
|
||||||
|
FieldByName('TPPerson').Value := ClientDataSet3.fieldbyname('TPPerson').Value;
|
||||||
|
FieldByName('TPNote').Value := ClientDataSet3.fieldbyname('TPNote').Value;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('TPQty').AsString) <> '' then
|
||||||
|
FieldByName('TPQty').Value := ClientDataSet3.fieldbyname('TPQty').Value
|
||||||
|
else
|
||||||
|
FieldByName('TPQty').Value := 0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty1').AsString) <> '' then
|
||||||
|
FieldByName('Qty1').Value := ClientDataSet3.fieldbyname('Qty1').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty1').Value := 0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty2').AsString) <> '' then
|
||||||
|
FieldByName('Qty2').Value := ClientDataSet3.fieldbyname('Qty2').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty2').Value := 0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty3').AsString) <> '' then
|
||||||
|
FieldByName('Qty3').Value := ClientDataSet3.fieldbyname('Qty3').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty3').Value := 0;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ToId').Value := Trim(maxno);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('操作成功!', '提示', 0);
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('操作异常!', '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FInt = 2 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet2.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if ClientDataSet3.IsEmpty = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生坯布领料数据,不能删除到坯记录!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MxId').AsString) <> '' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_Mx where MxId=''' + Trim(ClientDataSet2.fieldbyname('MxId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet2.Delete;
|
||||||
|
end
|
||||||
|
else if FInt = 3 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString) <> '' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_MxTo where ToId=''' + Trim(ClientDataSet3.fieldbyname('ToId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet3.Delete;
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
if ClientDataSet3.IsEmpty = False then
|
||||||
|
// FieldByName('KCSL').Value:=ClientDataSet2.fieldbyname('MxQty').Value-tv3.DataController.Summary.FooterSummaryValues[0]
|
||||||
|
|
||||||
|
else
|
||||||
|
FieldByName('KCSL').Value := ClientDataSet2.fieldbyname('MxQty').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.v2Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'RKPlace';
|
||||||
|
flagname := '入库地点';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('RKPlace').Value := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.conPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
{ if Key=#13 then
|
||||||
|
begin
|
||||||
|
if Length(Trim(ConNoM.Text))<4 then Exit;
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec ClothContract_QryList :MainId,:WSql');
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and OM.conNo like '''+'%'+Trim(ConNoM.Text)+'%'+'''';
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
try
|
||||||
|
frmClothContractOutPut := TfrmClothContractOutPut.Create(Application);
|
||||||
|
with frmClothContractOutPut do
|
||||||
|
begin
|
||||||
|
PState := 3;
|
||||||
|
TBSave.Enabled := false;
|
||||||
|
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractOutPut.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
// ToolButton1.Click;
|
||||||
|
if Order_Main.IsEmpty then exit;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.TthClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
try
|
||||||
|
frmClothContractOutPut := TfrmClothContractOutPut.Create(Application);
|
||||||
|
with frmClothContractOutPut do
|
||||||
|
begin
|
||||||
|
Caption := '坯布退货';
|
||||||
|
PState := 1;
|
||||||
|
v1T_money.Visible := true;
|
||||||
|
v1T_ps.Visible := true;
|
||||||
|
v1T_Qty.Visible := true;
|
||||||
|
v1T_Price.Visible := true;
|
||||||
|
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractOutPut.Free;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.tchkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
{ try
|
||||||
|
frmClothContractInPut := TfrmClothContractInPut.Create(Application);
|
||||||
|
with frmClothContractInPut do
|
||||||
|
begin
|
||||||
|
PState := 1;
|
||||||
|
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
with self.ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''1'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(self.Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(self.Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
self.InitGrid();
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractInPut.Free;
|
||||||
|
// TBRafresh.Click;
|
||||||
|
end; }
|
||||||
|
|
||||||
|
if Order_Main.Locate('ssel', true, []) = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''1'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('操作失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.TnochkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
if Order_Main.Locate('ssel', true, []) = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
{with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''0'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end; }
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''0'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('操作失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.Tv1CustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
||||||
|
var
|
||||||
|
FValue: string;
|
||||||
|
FBounds: TRect;
|
||||||
|
begin
|
||||||
|
// FBounds := AViewInfo.Bounds;
|
||||||
|
// if (AViewInfo is TcxGridIndicatorRowItemViewInfo) then
|
||||||
|
// begin
|
||||||
|
// ACanvas.FillRect(FBounds);
|
||||||
|
// ACanvas.DrawComplexFrame(FBounds, clBtnHighlight, clBtnShadow, [bBottom, bLeft, bRight], 1);
|
||||||
|
// FValue := IntToStr(TcxGridIndicatorRowItemViewInfo(AViewInfo).GridRecord.Index + 1);
|
||||||
|
// InflateRect(FBounds, -1, -1);
|
||||||
|
// ACanvas.Font.Color := clBlack;
|
||||||
|
// ACanvas.Brush.Style := bsClear;
|
||||||
|
// ACanvas.DrawText(FValue, FBounds, cxAlignCenter or cxAlignTop);
|
||||||
|
// ADone := True;
|
||||||
|
// end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
begin
|
||||||
|
// if AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('H_PS').Index] >= AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('Qty1').Index] then
|
||||||
|
// begin
|
||||||
|
// ACanvas.Brush.Color := clSkyBlue;
|
||||||
|
// end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CK_help.cxTabControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
initForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
|
@ -68,6 +68,7 @@ object frmClothContractList_DY: TfrmClothContractList_DY
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #21152#24613
|
Caption = #21152#24613
|
||||||
ImageIndex = 60
|
ImageIndex = 60
|
||||||
|
Visible = False
|
||||||
OnClick = TJjClick
|
OnClick = TJjClick
|
||||||
end
|
end
|
||||||
object TnoJj: TToolButton
|
object TnoJj: TToolButton
|
||||||
|
@ -76,6 +77,7 @@ object frmClothContractList_DY: TfrmClothContractList_DY
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25764#38144#21152#24613
|
Caption = #25764#38144#21152#24613
|
||||||
ImageIndex = 99
|
ImageIndex = 99
|
||||||
|
Visible = False
|
||||||
OnClick = TnoJjClick
|
OnClick = TnoJjClick
|
||||||
end
|
end
|
||||||
object ToolButton2: TToolButton
|
object ToolButton2: TToolButton
|
||||||
|
@ -577,6 +579,12 @@ object frmClothContractList_DY: TfrmClothContractList_DY
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 60
|
Width = 60
|
||||||
end
|
end
|
||||||
|
object Tv1Column4: TcxGridDBColumn
|
||||||
|
Caption = #23436#25104#22825#25968
|
||||||
|
DataBinding.FieldName = 'WCTS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object cxGrid1Level1: TcxGridLevel
|
object cxGrid1Level1: TcxGridLevel
|
||||||
GridView = Tv1
|
GridView = Tv1
|
||||||
|
|
|
@ -117,6 +117,7 @@ type
|
||||||
Tv1Column1: TcxGridDBColumn;
|
Tv1Column1: TcxGridDBColumn;
|
||||||
Tv1Column2: TcxGridDBColumn;
|
Tv1Column2: TcxGridDBColumn;
|
||||||
Tv1Column3: TcxGridDBColumn;
|
Tv1Column3: TcxGridDBColumn;
|
||||||
|
Tv1Column4: TcxGridDBColumn;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
|
|
|
@ -571,6 +571,36 @@ object frmClothContractList_Tp: TfrmClothContractList_Tp
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 60
|
Width = 60
|
||||||
end
|
end
|
||||||
|
object Tv1Column3: TcxGridDBColumn
|
||||||
|
Caption = #21344#29992#26102#38388
|
||||||
|
DataBinding.FieldName = 'ZYtime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column4: TcxGridDBColumn
|
||||||
|
Caption = #21344#29992#20154
|
||||||
|
DataBinding.FieldName = 'ZYer'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column5: TcxGridDBColumn
|
||||||
|
Caption = #21344#29992#32568#25968
|
||||||
|
DataBinding.FieldName = 'ZYgs'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column6: TcxGridDBColumn
|
||||||
|
Caption = #21344#29992#21305#25968
|
||||||
|
DataBinding.FieldName = 'ZYps'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column7: TcxGridDBColumn
|
||||||
|
Caption = #21344#29992#25968#37327
|
||||||
|
DataBinding.FieldName = 'ZYQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object cxGrid1Level1: TcxGridLevel
|
object cxGrid1Level1: TcxGridLevel
|
||||||
GridView = Tv1
|
GridView = Tv1
|
||||||
|
|
|
@ -116,6 +116,11 @@ type
|
||||||
TnoJj: TToolButton;
|
TnoJj: TToolButton;
|
||||||
Tv1Column1: TcxGridDBColumn;
|
Tv1Column1: TcxGridDBColumn;
|
||||||
Tv1Column2: TcxGridDBColumn;
|
Tv1Column2: TcxGridDBColumn;
|
||||||
|
Tv1Column3: TcxGridDBColumn;
|
||||||
|
Tv1Column4: TcxGridDBColumn;
|
||||||
|
Tv1Column5: TcxGridDBColumn;
|
||||||
|
Tv1Column6: TcxGridDBColumn;
|
||||||
|
Tv1Column7: TcxGridDBColumn;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
|
|
863
管理系统/U_ClothContractList_TPXZ.dfm
Normal file
863
管理系统/U_ClothContractList_TPXZ.dfm
Normal file
|
@ -0,0 +1,863 @@
|
||||||
|
object frmClothContractList_TpXZ: TfrmClothContractList_TpXZ
|
||||||
|
Left = 314
|
||||||
|
Top = 348
|
||||||
|
Width = 1222
|
||||||
|
Height = 663
|
||||||
|
Caption = #22383#24067#28857#33394#20449#24687
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1206
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_TradeManage.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36873#25321
|
||||||
|
ImageIndex = 41
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TJj: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21152#24613
|
||||||
|
ImageIndex = 60
|
||||||
|
Visible = False
|
||||||
|
OnClick = TJjClick
|
||||||
|
end
|
||||||
|
object TnoJj: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25764#38144#21152#24613
|
||||||
|
ImageIndex = 99
|
||||||
|
Visible = False
|
||||||
|
OnClick = TnoJjClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 402
|
||||||
|
Top = 0
|
||||||
|
Caption = #22238#20462#26032#22686
|
||||||
|
ImageIndex = 57
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 485
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 548
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object Tchk: TToolButton
|
||||||
|
Left = 611
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #30830#35748#23436#25104
|
||||||
|
ImageIndex = 41
|
||||||
|
Visible = False
|
||||||
|
OnClick = TchkClick
|
||||||
|
end
|
||||||
|
object TNochk: TToolButton
|
||||||
|
Left = 698
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25764#38144#23436#25104
|
||||||
|
ImageIndex = 48
|
||||||
|
Visible = False
|
||||||
|
OnClick = TNochkClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 785
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#30475
|
||||||
|
ImageIndex = 58
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 848
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 911
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 974
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1206
|
||||||
|
Height = 53
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #30331#35760#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 161
|
||||||
|
Top = 22
|
||||||
|
Width = 6
|
||||||
|
Height = 12
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 271
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #25237#22383#21333#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 420
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 572
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 704
|
||||||
|
Top = 22
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #21152#24037#21378
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 18
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 167
|
||||||
|
Top = 18
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object ConNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 329
|
||||||
|
Top = 18
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object C_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 473
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object C_Color: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 600
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object FactoryNoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 748
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 0
|
||||||
|
Top = 107
|
||||||
|
Width = 1206
|
||||||
|
Height = 497
|
||||||
|
Align = alTop
|
||||||
|
BorderStyle = bsNone
|
||||||
|
TabOrder = 2
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1206
|
||||||
|
Height = 497
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnMouseDown = Tv1MouseDown
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
OnCellDblClick = Tv1CellDblClick
|
||||||
|
OnCustomDrawCell = Tv1CustomDrawCell
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1PRTOrderQty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty1
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = Tv1Column3
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = Tv1Column4
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
OptionsView.IndicatorWidth = 20
|
||||||
|
Styles.Inactive = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Selection = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
OnCustomDrawIndicatorCell = Tv1CustomDrawIndicatorCell
|
||||||
|
object v1Ssel: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'Ssel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #25237#22383#21333#21495
|
||||||
|
DataBinding.FieldName = 'ConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object v1DeliveryDate: TcxGridDBColumn
|
||||||
|
Caption = #25237#22383#26085#26399
|
||||||
|
DataBinding.FieldName = 'DeliveryDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.SaveTime = False
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #31614#35746#26085#26399
|
||||||
|
DataBinding.FieldName = 'QDTime'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1FactoryNo1Name: TcxGridDBColumn
|
||||||
|
Caption = #21152#24037#21378
|
||||||
|
DataBinding.FieldName = 'FactoryNoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1PRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'C_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1C_Color: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'C_Color'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1PRTMF: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133'(cm)'
|
||||||
|
DataBinding.FieldName = 'MF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325'(g/'#13217')'
|
||||||
|
DataBinding.FieldName = 'KZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v1Qty2: TcxGridDBColumn
|
||||||
|
Caption = #32568#21495
|
||||||
|
DataBinding.FieldName = 'BCgangno'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = cxStyle_fontclBlue
|
||||||
|
Styles.Footer = cxStyle_fontclBlue
|
||||||
|
Styles.Header = cxStyle_fontclBlue
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Qty1: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = cxStyle_fontclBlue
|
||||||
|
Styles.Footer = cxStyle_fontclBlue
|
||||||
|
Styles.Header = cxStyle_fontclBlue
|
||||||
|
Width = 46
|
||||||
|
end
|
||||||
|
object v1PRTOrderQty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'T_Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = cxStyle_fontclBlue
|
||||||
|
Styles.Footer = cxStyle_fontclBlue
|
||||||
|
Styles.Header = cxStyle_fontclBlue
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1OrderUnit: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'C_Unit'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 47
|
||||||
|
end
|
||||||
|
object Tv1Column3: TcxGridDBColumn
|
||||||
|
Caption = #24050#21344#29992#21305#25968
|
||||||
|
DataBinding.FieldName = 'Yzyps'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = cxStyle_fontclFuchsia
|
||||||
|
Styles.Footer = cxStyle_fontclFuchsia
|
||||||
|
Styles.Header = cxStyle_fontclFuchsia
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object Tv1Column4: TcxGridDBColumn
|
||||||
|
Caption = #24050#21344#26377#25968#37327
|
||||||
|
DataBinding.FieldName = 'Yzysl'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = cxStyle_fontclFuchsia
|
||||||
|
Styles.Footer = cxStyle_fontclFuchsia
|
||||||
|
Styles.Header = cxStyle_fontclFuchsia
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1C_Unit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'C_Unit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'C_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'LXPerson'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#26041#24335
|
||||||
|
DataBinding.FieldName = 'LXTel'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column10: TcxGridDBColumn
|
||||||
|
Caption = #21046#21333#20154
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column11: TcxGridDBColumn
|
||||||
|
Caption = #21046#21333#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column12: TcxGridDBColumn
|
||||||
|
Caption = #20462#25913#20154
|
||||||
|
DataBinding.FieldName = 'editer'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column13: TcxGridDBColumn
|
||||||
|
Caption = #20462#25913#26102#38388
|
||||||
|
DataBinding.FieldName = 'editTime'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
DataBinding.FieldName = 'IsZt'
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = #21152#24613
|
||||||
|
DataBinding.FieldName = 'Jiaji'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Caption = #33394#21495
|
||||||
|
DataBinding.FieldName = 'C_ColorNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxTabControl1: TcxTabControl
|
||||||
|
Left = 0
|
||||||
|
Top = 85
|
||||||
|
Width = 1206
|
||||||
|
Height = 22
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 3
|
||||||
|
Visible = False
|
||||||
|
Properties.CustomButtons.Buttons = <>
|
||||||
|
Properties.Style = 9
|
||||||
|
Properties.TabIndex = 2
|
||||||
|
Properties.Tabs.Strings = (
|
||||||
|
#26410#23436#25104
|
||||||
|
#24050#23436#25104
|
||||||
|
#20840#37096)
|
||||||
|
OnChange = cxTabControl1Change
|
||||||
|
ClientRectBottom = 22
|
||||||
|
ClientRectRight = 1206
|
||||||
|
ClientRectTop = 19
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 1128
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 992
|
||||||
|
Top = 64
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1000
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1040
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 1168
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 624
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object ClientDataSet3: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 944
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = ClientDataSet2
|
||||||
|
Left = 888
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object DataSource3: TDataSource
|
||||||
|
DataSet = ClientDataSet3
|
||||||
|
Left = 1112
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object ClientDataSet2: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 924
|
||||||
|
Top = 212
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDBMain
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 352
|
||||||
|
Top = 192
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDBMain: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_PRT
|
||||||
|
Left = 400
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 416
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object CDS_PRT: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 804
|
||||||
|
Top = 44
|
||||||
|
end
|
||||||
|
object cxStyleRepository1: TcxStyleRepository
|
||||||
|
Left = 69
|
||||||
|
Top = 130
|
||||||
|
PixelsPerInch = 96
|
||||||
|
object cxStyle1: TcxStyle
|
||||||
|
AssignedValues = [svColor]
|
||||||
|
Color = clInactiveCaption
|
||||||
|
end
|
||||||
|
object cxStyle2: TcxStyle
|
||||||
|
AssignedValues = [svColor, svTextColor]
|
||||||
|
Color = 4707838
|
||||||
|
TextColor = clBtnText
|
||||||
|
end
|
||||||
|
object cxStyle_gridRow: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = 16311512
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
end
|
||||||
|
object cxStyle_gridFoot: TcxStyle
|
||||||
|
AssignedValues = [svFont]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_gridHead: TcxStyle
|
||||||
|
AssignedValues = [svFont]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_gridGroupBox: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = clMoneyGreen
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_yellow: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = 8454143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
end
|
||||||
|
object cxStyle_Red: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = clRed
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
end
|
||||||
|
object cxStyle_fontBlack: TcxStyle
|
||||||
|
AssignedValues = [svFont]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_fontclFuchsia: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clFuchsia
|
||||||
|
end
|
||||||
|
object cxStyle_fontclPurple: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clPurple
|
||||||
|
end
|
||||||
|
object cxStyle_fontclGreen: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clGreen
|
||||||
|
end
|
||||||
|
object cxStyle_fontclBlue: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clBlue
|
||||||
|
end
|
||||||
|
object cxStyle_fontclTeal: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clTeal
|
||||||
|
end
|
||||||
|
object cxStyle_fontclOlive: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clOlive
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
919
管理系统/U_ClothContractList_TPXZ.pas
Normal file
919
管理系统/U_ClothContractList_TPXZ.pas
Normal file
|
@ -0,0 +1,919 @@
|
||||||
|
unit U_ClothContractList_TPXZ;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses, cxControls,
|
||||||
|
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||||
|
cxGrid, DBClient, cxCalendar, cxButtonEdit, cxSplitter, RM_Common, RM_Class,
|
||||||
|
RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, cxTextEdit, cxPC, cxCheckBox,
|
||||||
|
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu,
|
||||||
|
dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
|
||||||
|
dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
|
||||||
|
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
|
||||||
|
dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
|
||||||
|
dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
|
||||||
|
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
|
||||||
|
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
|
||||||
|
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||||
|
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven,
|
||||||
|
dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
|
||||||
|
dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
|
||||||
|
dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint,
|
||||||
|
dxSkinXmas2008Blue, dxSkinscxPCPainter;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmClothContractList_TpXZ = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Label3: TLabel;
|
||||||
|
ConNo: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
C_CodeName: TEdit;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
Label4: TLabel;
|
||||||
|
C_Color: TEdit;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1OrderNo: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1DeliveryDate: TcxGridDBColumn;
|
||||||
|
v1FactoryNo1Name: TcxGridDBColumn;
|
||||||
|
v1PRTSpec: TcxGridDBColumn;
|
||||||
|
v1PRTMF: TcxGridDBColumn;
|
||||||
|
v1PRTKZ: TcxGridDBColumn;
|
||||||
|
v1PRTOrderQty: TcxGridDBColumn;
|
||||||
|
v1OrderUnit: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
ClientDataSet3: TClientDataSet;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
DataSource3: TDataSource;
|
||||||
|
ClientDataSet2: TClientDataSet;
|
||||||
|
v1Qty1: TcxGridDBColumn;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDBMain: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
CDS_PRT: TClientDataSet;
|
||||||
|
Label6: TLabel;
|
||||||
|
FactoryNoName: TEdit;
|
||||||
|
cxTabControl1: TcxTabControl;
|
||||||
|
v1C_Unit: TcxGridDBColumn;
|
||||||
|
Tchk: TToolButton;
|
||||||
|
TNochk: TToolButton;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
v1Qty2: TcxGridDBColumn;
|
||||||
|
v1C_Color: TcxGridDBColumn;
|
||||||
|
cxStyleRepository1: TcxStyleRepository;
|
||||||
|
cxStyle1: TcxStyle;
|
||||||
|
cxStyle2: TcxStyle;
|
||||||
|
cxStyle_gridRow: TcxStyle;
|
||||||
|
cxStyle_gridFoot: TcxStyle;
|
||||||
|
cxStyle_gridHead: TcxStyle;
|
||||||
|
cxStyle_gridGroupBox: TcxStyle;
|
||||||
|
cxStyle_yellow: TcxStyle;
|
||||||
|
cxStyle_Red: TcxStyle;
|
||||||
|
cxStyle_fontBlack: TcxStyle;
|
||||||
|
cxStyle_fontclFuchsia: TcxStyle;
|
||||||
|
cxStyle_fontclPurple: TcxStyle;
|
||||||
|
cxStyle_fontclGreen: TcxStyle;
|
||||||
|
cxStyle_fontclBlue: TcxStyle;
|
||||||
|
cxStyle_fontclTeal: TcxStyle;
|
||||||
|
cxStyle_fontclOlive: TcxStyle;
|
||||||
|
v1Ssel: TcxGridDBColumn;
|
||||||
|
v1Column10: TcxGridDBColumn;
|
||||||
|
v1Column11: TcxGridDBColumn;
|
||||||
|
v1Column12: TcxGridDBColumn;
|
||||||
|
v1Column13: TcxGridDBColumn;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
TJj: TToolButton;
|
||||||
|
TnoJj: TToolButton;
|
||||||
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
Tv1Column2: TcxGridDBColumn;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
Tv1Column3: TcxGridDBColumn;
|
||||||
|
Tv1Column4: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBFindClick(Sender: TObject);
|
||||||
|
procedure TBEditClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure ConNoChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure Tv2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure cxTabControl1Change(Sender: TObject);
|
||||||
|
procedure TchkClick(Sender: TObject);
|
||||||
|
procedure TNochkClick(Sender: TObject);
|
||||||
|
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
procedure Tv1CustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure TJjClick(Sender: TObject);
|
||||||
|
procedure TnoJjClick(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
FInt, PFInt: Integer;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData(): Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fDParameters1: string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmClothContractList_TpXZ: TfrmClothContractList_TpXZ;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_ClothContractInPut_TP, U_Fun, U_ProductOrderList, U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmClothContractList_TpXZ := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action := caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ScrollBox1.Align := alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid(self.Caption, Tv1, '指示单管理');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.InitGrid();
|
||||||
|
var
|
||||||
|
strwhere: string;
|
||||||
|
begin
|
||||||
|
strwhere := '';
|
||||||
|
if cxTabControl1.TabIndex < 2 then
|
||||||
|
// strwhere := strwhere + ' and isnull(A.status,''''0'''')=''''' + inttostr(cxTabControl1.TabIndex) + '''''';
|
||||||
|
strwhere := strwhere + ' and isnull(B.C_status,''''0'''')=''''' + inttostr(cxTabControl1.TabIndex) + '''''';
|
||||||
|
if (trim(fDParameters1) = '查询') then
|
||||||
|
strwhere := strwhere + ' and A.Filler=''''' + Trim(DName) + ''''' ';
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' select * ');
|
||||||
|
sql.Add(',Yzyps=(select sum(ZYPS) from contract_sub X where X.fromsubid=B.subid and X.ZYGangNo=B.BCgangno) ');
|
||||||
|
sql.Add(',Yzysl=(select sum(ZYQty) from contract_sub X where X.fromsubid=B.subid and X.ZYGangNo=B.BCgangno) ');
|
||||||
|
sql.Add(' from Contract_Main A');
|
||||||
|
|
||||||
|
sql.Add(' inner join Contract_Sub B on A.mainid=B.mainid');
|
||||||
|
sql.Add(' where conType=''坯布投坯''');
|
||||||
|
// sql.Add(' where conType=''坯布预投坯''');
|
||||||
|
// sql.Add('exec P_Get_Contract_TG');
|
||||||
|
// sql.Add('@begdate=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + ''' ');
|
||||||
|
// sql.Add(',@enddate=''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + ''' ');
|
||||||
|
//// sql.Add(',@conType= '''+TconType+''' ');
|
||||||
|
// sql.Add(',@status=''' + strwhere + ''' ');
|
||||||
|
// ShowMessage(sql.text);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.InitForm();
|
||||||
|
begin
|
||||||
|
// if fDParameters1 = '查询' then
|
||||||
|
// begin
|
||||||
|
// TBADD.Visible := false;
|
||||||
|
// TBEdit.Visible := false;
|
||||||
|
// TBDel.Visible := false;
|
||||||
|
// Tchk.Visible := false;
|
||||||
|
// TNochk.Visible := false;
|
||||||
|
// // Tth.Visible:=false;
|
||||||
|
// //ToolButton1.Visible:=false;
|
||||||
|
// end;
|
||||||
|
|
||||||
|
TBEdit.Enabled := false;
|
||||||
|
TBDel.Enabled := false;
|
||||||
|
Tchk.Enabled := false;
|
||||||
|
TNochk.Enabled := false;
|
||||||
|
if cxTabControl1.TabIndex = 0 then
|
||||||
|
begin
|
||||||
|
TBEdit.Enabled := true;
|
||||||
|
TBDel.Enabled := true;
|
||||||
|
Tchk.Enabled := true;
|
||||||
|
end;
|
||||||
|
if cxTabControl1.TabIndex = 1 then
|
||||||
|
begin
|
||||||
|
TNochk.Enabled := true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.TBFindClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active = False then
|
||||||
|
Exit;
|
||||||
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
try
|
||||||
|
frmClothContractInPut_Tp := TfrmClothContractInPut_Tp.Create(Application);
|
||||||
|
with frmClothContractInPut_Tp do
|
||||||
|
begin
|
||||||
|
PState := 1;
|
||||||
|
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
FConType := Trim(Self.Order_Main.fieldbyname('ConType').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractInPut_Tp.Free;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from JYOrder_Sub_AnPai ');
|
||||||
|
sql.Add('where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if not ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已回仓,不能删除投坯计划!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
if trim(Order_Main.FieldByName('mainID').AsString) = 'CM001' then
|
||||||
|
exit;
|
||||||
|
if DelData() then
|
||||||
|
begin
|
||||||
|
Order_Main.Delete;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmClothContractList_TpXZ.DelData(): Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result := false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete YF_Money_CR where MainID=''' + Trim(Order_Main.fieldbyname('MainID').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
// sql.Add(' where CRID='+CRID);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub where SubId=''' + Trim(Order_Main.fieldbyname('SubId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Trim(Order_Main.fieldbyname('SubId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result := True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result := False;
|
||||||
|
Application.MessageBox('数据删除异常!', '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
TcxGridToExcel('坯布点色计划列表', cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile, FConNoM: string;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\坯布投坯单.rmf';
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select *,fromConNo=(select Top 1 conNo from Contract_Main X where X.MainID=A.fromMainID) ');
|
||||||
|
sql.Add('from Contract_Main A');
|
||||||
|
sql.Add('inner join Contract_sub B on B.MainID=A.mainID ');
|
||||||
|
sql.Add('where A.FillTime>= ''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + ''' ');
|
||||||
|
sql.Add('and A.FillTime< ''' + Trim(FormatDateTime('yyyy-MM-dd', endDate.DateTime + 1)) + ''' ');
|
||||||
|
sql.Add('and A.mainID=' + quotedstr(trim(Order_Main.fieldbyname('MainID').AsString)));
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp, CDS_PRT);
|
||||||
|
SInitCDSData20(ADOQueryTemp, CDS_PRT);
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['dtxz'] := formatdateTime('yyyy-MM-dd', Now);
|
||||||
|
RMVariables['zdr'] := Trim(dName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找' + ExtractFilePath(Application.ExeName) + 'Report\坯布投坯单.rmf'), '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.TBAddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmClothContractInPut_Tp := TfrmClothContractInPut_Tp.Create(Application);
|
||||||
|
with frmClothContractInPut_Tp do
|
||||||
|
begin
|
||||||
|
PState := 0;
|
||||||
|
FMainId := '';
|
||||||
|
FConType := '坯布预投坯';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractInPut_Tp.Free;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.ConNoChange(Sender: TObject);
|
||||||
|
var
|
||||||
|
str1: string;
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active = False then
|
||||||
|
Exit;
|
||||||
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
|
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitForm();
|
||||||
|
ReadCxGrid(self.Caption, Tv1, '指示单管理');
|
||||||
|
BegDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||||
|
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.Tv2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt := 2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt := 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno: string;
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if ClientDataSet2.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MXId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('到货数量未确定!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ClientDataSet3.Locate('OrderNo', null, []) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('指定订单编号不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
BegDate.SetFocus;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
//保存去向表
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd, maxno, 'To', 'Contract_Sub_MxTo', 4, 1) = False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取去向流水号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
maxno := Trim(ClientDataSet3.fieldbyname('ToId').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub_MxTo where ToId=''' + Trim(ClientDataSet3.fieldbyname('ToId').AsString) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString) = '' then
|
||||||
|
Append
|
||||||
|
else
|
||||||
|
Edit;
|
||||||
|
FieldByName('MxId').Value := Trim(ClientDataSet2.fieldbyname('MxId').AsString);
|
||||||
|
FieldByName('ToId').Value := Trim(maxno);
|
||||||
|
FieldByName('OrdSubId').Value := Trim(ClientDataSet3.fieldbyname('OrdSubId').AsString);
|
||||||
|
FieldByName('TPDate').Value := ClientDataSet3.fieldbyname('TPDate').Value;
|
||||||
|
FieldByName('TPPerson').Value := ClientDataSet3.fieldbyname('TPPerson').Value;
|
||||||
|
FieldByName('TPNote').Value := ClientDataSet3.fieldbyname('TPNote').Value;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('TPQty').AsString) <> '' then
|
||||||
|
FieldByName('TPQty').Value := ClientDataSet3.fieldbyname('TPQty').Value
|
||||||
|
else
|
||||||
|
FieldByName('TPQty').Value := 0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty1').AsString) <> '' then
|
||||||
|
FieldByName('Qty1').Value := ClientDataSet3.fieldbyname('Qty1').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty1').Value := 0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty2').AsString) <> '' then
|
||||||
|
FieldByName('Qty2').Value := ClientDataSet3.fieldbyname('Qty2').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty2').Value := 0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty3').AsString) <> '' then
|
||||||
|
FieldByName('Qty3').Value := ClientDataSet3.fieldbyname('Qty3').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty3').Value := 0;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ToId').Value := Trim(maxno);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('操作成功!', '提示', 0);
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('操作异常!', '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FInt = 2 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet2.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if ClientDataSet3.IsEmpty = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生坯布领料数据,不能删除到坯记录!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MxId').AsString) <> '' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_Mx where MxId=''' + Trim(ClientDataSet2.fieldbyname('MxId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet2.Delete;
|
||||||
|
end
|
||||||
|
else if FInt = 3 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString) <> '' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_MxTo where ToId=''' + Trim(ClientDataSet3.fieldbyname('ToId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet3.Delete;
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
if ClientDataSet3.IsEmpty = False then
|
||||||
|
// FieldByName('KCSL').Value:=ClientDataSet2.fieldbyname('MxQty').Value-tv3.DataController.Summary.FooterSummaryValues[0]
|
||||||
|
|
||||||
|
else
|
||||||
|
FieldByName('KCSL').Value := ClientDataSet2.fieldbyname('MxQty').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.v2Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'RKPlace';
|
||||||
|
flagname := '入库地点';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('RKPlace').Value := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.cxTabControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
initForm();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.TchkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
if Order_Main.Locate('ssel', true, []) = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''1'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('操作失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.TNochkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
if Order_Main.Locate('ssel', true, []) = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''0'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('操作失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
ToolButton1.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
try
|
||||||
|
frmClothContractInPut_Tp := TfrmClothContractInPut_Tp.Create(Application);
|
||||||
|
with frmClothContractInPut_Tp do
|
||||||
|
begin
|
||||||
|
PState := 1;
|
||||||
|
tbsave.Enabled := false;
|
||||||
|
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractInPut_Tp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
begin
|
||||||
|
{ IF AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('N_Qty').Index]=0 then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clSkyBlue;
|
||||||
|
end; }
|
||||||
|
if AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('Jiaji').Index] = '加急' then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color := Clred;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.Tv1CustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
||||||
|
var
|
||||||
|
FValue: string;
|
||||||
|
FBounds: TRect;
|
||||||
|
begin
|
||||||
|
FBounds := AViewInfo.Bounds;
|
||||||
|
if (AViewInfo is TcxGridIndicatorRowItemViewInfo) then
|
||||||
|
begin
|
||||||
|
ACanvas.FillRect(FBounds);
|
||||||
|
ACanvas.DrawComplexFrame(FBounds, clBtnHighlight, clBtnShadow, [bBottom, bLeft, bRight], 1);
|
||||||
|
FValue := IntToStr(TcxGridIndicatorRowItemViewInfo(AViewInfo).GridRecord.Index + 1);
|
||||||
|
InflateRect(FBounds, -1, -1);
|
||||||
|
ACanvas.Font.Color := clBlack;
|
||||||
|
ACanvas.Brush.Style := bsClear;
|
||||||
|
ACanvas.DrawText(FValue, FBounds, cxAlignCenter or cxAlignTop);
|
||||||
|
ADone := True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmClothContractInPut_Tp := TfrmClothContractInPut_Tp.Create(Application);
|
||||||
|
with frmClothContractInPut_Tp do
|
||||||
|
begin
|
||||||
|
PState := 0;
|
||||||
|
FMainId := '';
|
||||||
|
FConType := '改色计划';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractInPut_Tp.Free;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.TJjClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
if Order_Main.Locate('ssel', true, []) = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_main SET Jiaji=''加急'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
// sql.Add('and subID =' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('操作失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.TnoJjClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
if Order_Main.Locate('ssel', true, []) = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_main SET Jiaji='''' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
// sql.Add('and subID =' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('操作失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_TpXZ.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
ModalResult := 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
|
@ -176,8 +176,9 @@ begin
|
||||||
end;
|
end;
|
||||||
// sql.Add('@begdate=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + ''' ');
|
// sql.Add('@begdate=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + ''' ');
|
||||||
// sql.Add(',@enddate=''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + ''' ');
|
// sql.Add(',@enddate=''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + ''' ');
|
||||||
sql.Add(',@conType=''坯布到货'' ');
|
sql.Add(',@conType=''Å÷²¼¿â´æ'' ');
|
||||||
sql.Add(',@status=''' + inttostr(0) + ''' ');
|
sql.Add(',@status=''' + inttostr(2) + ''' ');
|
||||||
|
// showmessage(sql.Text);
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
|
696
管理系统/U_ClothTPHWZYInput.dfm
Normal file
696
管理系统/U_ClothTPHWZYInput.dfm
Normal file
|
@ -0,0 +1,696 @@
|
||||||
|
object frmClothTPHWZYInput: TfrmClothTPHWZYInput
|
||||||
|
Left = 404
|
||||||
|
Top = 253
|
||||||
|
Width = 1046
|
||||||
|
Height = 541
|
||||||
|
Caption = #36135#29289#21344#29992#24405#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1030
|
||||||
|
Height = 29
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
EdgeInner = esNone
|
||||||
|
EdgeOuter = esNone
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_TradeManage.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBSave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = TBSaveClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 0
|
||||||
|
Top = 29
|
||||||
|
Width = 1030
|
||||||
|
Height = 52
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvNone
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Ctl3D = False
|
||||||
|
ParentCtl3D = False
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = -20
|
||||||
|
Top = 30
|
||||||
|
Width = 91
|
||||||
|
Height = 12
|
||||||
|
Caption = #28857#33394#35745#21010#21333#21495#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 130
|
||||||
|
Top = 14
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #21344#29992#26085#26399#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 = 290
|
||||||
|
Top = 54
|
||||||
|
Width = 67
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379' '#26041#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 28
|
||||||
|
Top = 166
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #31614#35746#26085#26399#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 20
|
||||||
|
Top = 54
|
||||||
|
Width = 67
|
||||||
|
Height = 12
|
||||||
|
Caption = #38656' '#26041#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 231
|
||||||
|
Top = 270
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #31614#35746#22320#28857#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 380
|
||||||
|
Top = 14
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21344#29992#20154#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 = 290
|
||||||
|
Top = 78
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #21040#36135#22320#28857#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 20
|
||||||
|
Top = 78
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #32852#31995#26041#24335#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 778
|
||||||
|
Top = 14
|
||||||
|
Width = 91
|
||||||
|
Height = 12
|
||||||
|
Caption = #37319#36141#35745#21010#21333#21495#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ConNo: TEdit
|
||||||
|
Left = 70
|
||||||
|
Top = 27
|
||||||
|
Width = 137
|
||||||
|
Height = 18
|
||||||
|
TabOrder = 0
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ZYtime: TDateTimePicker
|
||||||
|
Tag = 22
|
||||||
|
Left = 193
|
||||||
|
Top = 10
|
||||||
|
Width = 134
|
||||||
|
Height = 20
|
||||||
|
BevelInner = bvNone
|
||||||
|
Date = 40916.000000000000000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40916.000000000000000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object FactoryNoName: TcxButtonEdit
|
||||||
|
Left = 353
|
||||||
|
Top = 50
|
||||||
|
Hint = 'FactoryNo'
|
||||||
|
BeepOnEnter = False
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = FactoryNoNamePropertiesButtonClick
|
||||||
|
Properties.OnChange = FactoryNoNamePropertiesChange
|
||||||
|
Style.BorderStyle = ebsSingle
|
||||||
|
TabOrder = 2
|
||||||
|
Visible = False
|
||||||
|
Width = 134
|
||||||
|
end
|
||||||
|
object PanZDY: TPanel
|
||||||
|
Left = 861
|
||||||
|
Top = 128
|
||||||
|
Width = 202
|
||||||
|
Height = 153
|
||||||
|
TabOrder = 3
|
||||||
|
Visible = False
|
||||||
|
object CXGridZDY: TcxGrid
|
||||||
|
Left = 3
|
||||||
|
Top = 4
|
||||||
|
Width = 197
|
||||||
|
Height = 113
|
||||||
|
TabOrder = 0
|
||||||
|
object TVZDY: TcxGridDBTableView
|
||||||
|
OnKeyPress = TVZDYKeyPress
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
OnCellDblClick = TVZDYCellDblClick
|
||||||
|
DataController.DataSource = DataSource2
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
object VHelpZDYName: TcxGridDBColumn
|
||||||
|
DataBinding.FieldName = 'ZDYName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.handBlack
|
||||||
|
Width = 163
|
||||||
|
IsCaptionAssigned = True
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object CXGridZDYLevel1: TcxGridLevel
|
||||||
|
GridView = TVZDY
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Button1: TButton
|
||||||
|
Left = 64
|
||||||
|
Top = 120
|
||||||
|
Width = 65
|
||||||
|
Height = 25
|
||||||
|
Caption = #20851#38381
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = Button1Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object QDTime: TDateTimePicker
|
||||||
|
Left = 90
|
||||||
|
Top = 162
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
BevelInner = bvNone
|
||||||
|
Date = 40916.670856296290000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40916.670856296290000000
|
||||||
|
ShowCheckbox = True
|
||||||
|
TabOrder = 4
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object CompanyName: TcxButtonEdit
|
||||||
|
Left = 85
|
||||||
|
Top = 50
|
||||||
|
BeepOnEnter = False
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = CompanyNamePropertiesButtonClick
|
||||||
|
Style.BorderStyle = ebsSingle
|
||||||
|
TabOrder = 5
|
||||||
|
Visible = False
|
||||||
|
Width = 136
|
||||||
|
end
|
||||||
|
object QDPalce: TEdit
|
||||||
|
Left = 311
|
||||||
|
Top = 271
|
||||||
|
Width = 131
|
||||||
|
Height = 18
|
||||||
|
TabOrder = 6
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ZYer: TEdit
|
||||||
|
Tag = 22
|
||||||
|
Left = 433
|
||||||
|
Top = 11
|
||||||
|
Width = 134
|
||||||
|
Height = 18
|
||||||
|
TabOrder = 7
|
||||||
|
end
|
||||||
|
object LXTel: TEdit
|
||||||
|
Left = 85
|
||||||
|
Top = 75
|
||||||
|
Width = 136
|
||||||
|
Height = 18
|
||||||
|
TabOrder = 8
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object JHPlace: TcxButtonEdit
|
||||||
|
Left = 353
|
||||||
|
Top = 74
|
||||||
|
BeepOnEnter = False
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = JHPlacePropertiesButtonClick
|
||||||
|
Style.BorderStyle = ebsSingle
|
||||||
|
TabOrder = 9
|
||||||
|
Visible = False
|
||||||
|
Width = 392
|
||||||
|
end
|
||||||
|
object fromConNo: TcxButtonEdit
|
||||||
|
Left = 865
|
||||||
|
Top = 10
|
||||||
|
BeepOnEnter = False
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = fromConNoPropertiesButtonClick
|
||||||
|
Style.BorderStyle = ebsSingle
|
||||||
|
TabOrder = 10
|
||||||
|
Visible = False
|
||||||
|
OnKeyPress = fromConNoKeyPress
|
||||||
|
Width = 116
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ToolBar2: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 81
|
||||||
|
Width = 1030
|
||||||
|
Height = 29
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
EdgeInner = esNone
|
||||||
|
EdgeOuter = esNone
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_TradeManage.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 2
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
Width = 467
|
||||||
|
Height = 30
|
||||||
|
BevelOuter = bvNone
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 110
|
||||||
|
Width = 1030
|
||||||
|
Height = 219
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 3
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
OnCellClick = Tv1CellClick
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'C_Code'
|
||||||
|
Column = v1Column1
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsCustomize.ColumnSorting = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1Column1PropertiesButtonClick
|
||||||
|
Properties.OnEditValueChanged = v1Column1PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v1PRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684#22411#21495
|
||||||
|
DataBinding.FieldName = 'C_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Styles.Header = DataLink_TradeManage.handBlack
|
||||||
|
Width = 103
|
||||||
|
end
|
||||||
|
object v1PRTColor: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325'(g/'#13217')'
|
||||||
|
DataBinding.FieldName = 'KZQty'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Styles.Header = DataLink_TradeManage.handBlack
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 78
|
||||||
|
end
|
||||||
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133'(cm)'
|
||||||
|
DataBinding.FieldName = 'MFQty'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Styles.Header = DataLink_TradeManage.handBlack
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object Tv1Column5: TcxGridDBColumn
|
||||||
|
Caption = #33394#21495
|
||||||
|
DataBinding.FieldName = 'C_ColorNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column6: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'C_Color'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #25237#22383#21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = cxStyle2
|
||||||
|
Width = 89
|
||||||
|
end
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Caption = #35745#21010#32568#25968
|
||||||
|
DataBinding.FieldName = 'Qty2'
|
||||||
|
Styles.Header = cxStyle2
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1ClothUnit: TcxGridDBColumn
|
||||||
|
Caption = #35745#21010#25968#37327
|
||||||
|
DataBinding.FieldName = 'C_Qty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1ClothUnitPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = cxStyle2
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'C_Unit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'M'
|
||||||
|
'Kg')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 64
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 46
|
||||||
|
end
|
||||||
|
object v1T_Ps: TcxGridDBColumn
|
||||||
|
Caption = #36864#36135#21305#25968
|
||||||
|
DataBinding.FieldName = 'T_Ps'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1T_Qty: TcxGridDBColumn
|
||||||
|
Caption = #36864#36135#25968#37327
|
||||||
|
DataBinding.FieldName = 'T_Qty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1Column6PropertiesEditValueChanged
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1T_Price: TcxGridDBColumn
|
||||||
|
Caption = #36864#36135#21333#20215
|
||||||
|
DataBinding.FieldName = 'T_Price'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1Column6PropertiesEditValueChanged
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1T_money: TcxGridDBColumn
|
||||||
|
Caption = #36864#36135#37329#39069
|
||||||
|
DataBinding.FieldName = 'T_money'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'C_Note'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 177
|
||||||
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = #21344#29992#25968#37327
|
||||||
|
DataBinding.FieldName = 'ZYQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = cxStyle3
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column3: TcxGridDBColumn
|
||||||
|
Caption = #21344#29992#32568#21495
|
||||||
|
DataBinding.FieldName = 'ZYGangNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = cxStyle3
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column4: TcxGridDBColumn
|
||||||
|
Caption = #21344#29992#21305#25968
|
||||||
|
DataBinding.FieldName = 'ZYPS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = cxStyle3
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column9: TcxGridDBColumn
|
||||||
|
Caption = #25237#22383#21333#21495
|
||||||
|
DataBinding.FieldName = 'ConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOTemp: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 816
|
||||||
|
Top = 85
|
||||||
|
end
|
||||||
|
object ADOCmd: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 800
|
||||||
|
Top = 109
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Sub
|
||||||
|
Left = 356
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object Order_Sub: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 424
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = ADOZDY
|
||||||
|
Left = 240
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ADOZDY: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 280
|
||||||
|
Top = 5
|
||||||
|
end
|
||||||
|
object CDS_ZDY: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 208
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 792
|
||||||
|
Top = 125
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 528
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object cxStyleRepository1: TcxStyleRepository
|
||||||
|
PixelsPerInch = 96
|
||||||
|
object cxStyle1: TcxStyle
|
||||||
|
end
|
||||||
|
object cxStyle2: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clBlue
|
||||||
|
end
|
||||||
|
object cxStyle3: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clFuchsia
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
1066
管理系统/U_ClothTPHWZYInput.pas
Normal file
1066
管理系统/U_ClothTPHWZYInput.pas
Normal file
File diff suppressed because it is too large
Load Diff
822
管理系统/U_ClothTP_HWZY.dfm
Normal file
822
管理系统/U_ClothTP_HWZY.dfm
Normal file
|
@ -0,0 +1,822 @@
|
||||||
|
object frmClothTP_HWZY: TfrmClothTP_HWZY
|
||||||
|
Left = 309
|
||||||
|
Top = 284
|
||||||
|
Width = 1222
|
||||||
|
Height = 738
|
||||||
|
Caption = #36135#29289#21344#29992#20449#24687
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1206
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_TradeManage.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object tchk: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #30830#35748#21462#28040
|
||||||
|
ImageIndex = 41
|
||||||
|
Visible = False
|
||||||
|
OnClick = tchkClick
|
||||||
|
end
|
||||||
|
object Tnochk: TToolButton
|
||||||
|
Left = 402
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25764#38144#21462#28040
|
||||||
|
Enabled = False
|
||||||
|
ImageIndex = 56
|
||||||
|
Visible = False
|
||||||
|
OnClick = TnochkClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 489
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#30475
|
||||||
|
ImageIndex = 58
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 552
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 615
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 678
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1206
|
||||||
|
Height = 53
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #30331#35760#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 161
|
||||||
|
Top = 22
|
||||||
|
Width = 6
|
||||||
|
Height = 12
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 271
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20219#21153#21333#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 420
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 572
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268#26684
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 704
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#26041
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 836
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21040#36135#22320#28857
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 18
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 167
|
||||||
|
Top = 18
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object ConNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 329
|
||||||
|
Top = 18
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ConNoChange
|
||||||
|
OnKeyPress = conPress
|
||||||
|
end
|
||||||
|
object C_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 473
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object C_Spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 600
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object FactoryNoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 732
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object JHPlace: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 892
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 0
|
||||||
|
Top = 107
|
||||||
|
Width = 1206
|
||||||
|
Height = 497
|
||||||
|
Align = alTop
|
||||||
|
BorderStyle = bsNone
|
||||||
|
TabOrder = 2
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1206
|
||||||
|
Height = 497
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnMouseDown = Tv1MouseDown
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
OnCellDblClick = Tv1CellDblClick
|
||||||
|
OnCustomDrawCell = Tv1CustomDrawCell
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1PRTOrderQty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty1
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
OptionsView.IndicatorWidth = 20
|
||||||
|
Styles.Inactive = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Selection = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
OnCustomDrawIndicatorCell = Tv1CustomDrawIndicatorCell
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSel'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #20219#21153#21333#21495
|
||||||
|
DataBinding.FieldName = 'ConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #31614#35746#26085#26399
|
||||||
|
DataBinding.FieldName = 'QDTime'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1PRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'C_Spec'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1PRTMF: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133'(cm)'
|
||||||
|
DataBinding.FieldName = 'MFQty'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325'(g/'#13217')'
|
||||||
|
DataBinding.FieldName = 'KZQty'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v1Qty1: TcxGridDBColumn
|
||||||
|
Caption = #21344#29992#21305#25968
|
||||||
|
DataBinding.FieldName = 'ZYPS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = cxStyle3
|
||||||
|
Styles.Footer = cxStyle_fontclBlue
|
||||||
|
Styles.Header = cxStyle3
|
||||||
|
Width = 85
|
||||||
|
end
|
||||||
|
object v1PRTOrderQty: TcxGridDBColumn
|
||||||
|
Caption = #21344#29992#25968#37327
|
||||||
|
DataBinding.FieldName = 'ZYQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = cxStyle3
|
||||||
|
Styles.Footer = cxStyle_fontclBlue
|
||||||
|
Styles.Header = cxStyle3
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object Tv1Column3: TcxGridDBColumn
|
||||||
|
Caption = #21344#29992#32568#25968
|
||||||
|
DataBinding.FieldName = 'ZYGS'
|
||||||
|
Styles.Content = cxStyle3
|
||||||
|
Styles.Header = cxStyle3
|
||||||
|
end
|
||||||
|
object v1OrderUnit: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'C_Unit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 47
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'C_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column18: TcxGridDBColumn
|
||||||
|
Caption = #21046#21333#20154
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column20: TcxGridDBColumn
|
||||||
|
Caption = #21046#21333#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column19: TcxGridDBColumn
|
||||||
|
Caption = #20462#25913#20154
|
||||||
|
DataBinding.FieldName = 'editer'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column21: TcxGridDBColumn
|
||||||
|
Caption = #20462#25913#26102#38388
|
||||||
|
DataBinding.FieldName = 'editTime'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#21697#21517
|
||||||
|
DataBinding.FieldName = 'CP_CodeName'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object Tv1Column4: TcxGridDBColumn
|
||||||
|
Caption = #25237#22383#25968#37327
|
||||||
|
DataBinding.FieldName = 'T_Qty'
|
||||||
|
Styles.Content = cxStyle_fontclBlue
|
||||||
|
Styles.Header = cxStyle_fontclBlue
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column5: TcxGridDBColumn
|
||||||
|
Caption = #25237#22383#32568#25968
|
||||||
|
DataBinding.FieldName = 'Qty2'
|
||||||
|
Styles.Content = cxStyle_fontclBlue
|
||||||
|
Styles.Header = cxStyle_fontclBlue
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column6: TcxGridDBColumn
|
||||||
|
Caption = #25237#22383#21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
Styles.Content = cxStyle_fontclBlue
|
||||||
|
Styles.Header = cxStyle_fontclBlue
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column7: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'C_color'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column8: TcxGridDBColumn
|
||||||
|
Caption = #33394#21495
|
||||||
|
DataBinding.FieldName = 'C_colorno'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column9: TcxGridDBColumn
|
||||||
|
Caption = #21344#29992#20154
|
||||||
|
DataBinding.FieldName = 'ZYer'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column10: TcxGridDBColumn
|
||||||
|
Caption = #21344#29992#26102#38388
|
||||||
|
DataBinding.FieldName = 'ZYtime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxTabControl1: TcxTabControl
|
||||||
|
Left = 0
|
||||||
|
Top = 85
|
||||||
|
Width = 1206
|
||||||
|
Height = 22
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 3
|
||||||
|
Visible = False
|
||||||
|
Properties.CustomButtons.Buttons = <>
|
||||||
|
Properties.Style = 9
|
||||||
|
Properties.TabIndex = 2
|
||||||
|
Properties.Tabs.Strings = (
|
||||||
|
#24050#21344#29992
|
||||||
|
#21462#28040#21344#29992
|
||||||
|
#20840#37096)
|
||||||
|
OnChange = cxTabControl1Change
|
||||||
|
ClientRectBottom = 22
|
||||||
|
ClientRectRight = 1206
|
||||||
|
ClientRectTop = 19
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 1128
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 936
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1000
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1040
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 1168
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 1096
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ClientDataSet3: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 1112
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = ClientDataSet2
|
||||||
|
Left = 880
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object DataSource3: TDataSource
|
||||||
|
DataSet = ClientDataSet3
|
||||||
|
Left = 1112
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object ClientDataSet2: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 920
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDBMain
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 352
|
||||||
|
Top = 192
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDBMain: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_PRT
|
||||||
|
Left = 400
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 416
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object CDS_PRT: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 32
|
||||||
|
end
|
||||||
|
object cxStyleRepository1: TcxStyleRepository
|
||||||
|
Left = 305
|
||||||
|
Top = 310
|
||||||
|
PixelsPerInch = 96
|
||||||
|
object cxStyle1: TcxStyle
|
||||||
|
AssignedValues = [svColor]
|
||||||
|
Color = clInactiveCaption
|
||||||
|
end
|
||||||
|
object cxStyle2: TcxStyle
|
||||||
|
AssignedValues = [svColor, svTextColor]
|
||||||
|
Color = 4707838
|
||||||
|
TextColor = clBtnText
|
||||||
|
end
|
||||||
|
object cxStyle_gridRow: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = 16311512
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
end
|
||||||
|
object cxStyle_gridFoot: TcxStyle
|
||||||
|
AssignedValues = [svFont]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_gridHead: TcxStyle
|
||||||
|
AssignedValues = [svFont]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_gridGroupBox: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = clMoneyGreen
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_yellow: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = 8454143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
end
|
||||||
|
object cxStyle_Red: TcxStyle
|
||||||
|
AssignedValues = [svColor, svFont]
|
||||||
|
Color = clRed
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
end
|
||||||
|
object cxStyle_fontBlack: TcxStyle
|
||||||
|
AssignedValues = [svFont]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
end
|
||||||
|
object cxStyle_fontclFuchsia: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clFuchsia
|
||||||
|
end
|
||||||
|
object cxStyle_fontclPurple: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clPurple
|
||||||
|
end
|
||||||
|
object cxStyle_fontclGreen: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clGreen
|
||||||
|
end
|
||||||
|
object cxStyle_fontclBlue: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clBlue
|
||||||
|
end
|
||||||
|
object cxStyle_fontclTeal: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clTeal
|
||||||
|
end
|
||||||
|
object cxStyle_fontclOlive: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clOlive
|
||||||
|
end
|
||||||
|
object cxStyle3: TcxStyle
|
||||||
|
AssignedValues = [svFont, svTextColor]
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clFuchsia
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
TextColor = clFuchsia
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
962
管理系统/U_ClothTP_HWZY.pas
Normal file
962
管理系统/U_ClothTP_HWZY.pas
Normal file
|
@ -0,0 +1,962 @@
|
||||||
|
unit U_ClothTP_HWZY;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses, cxControls,
|
||||||
|
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||||
|
cxGrid, DBClient, cxCalendar, cxButtonEdit, cxSplitter, RM_Common, RM_Class,
|
||||||
|
RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, cxTextEdit, cxPC, cxCheckBox,
|
||||||
|
cxCurrencyEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
|
||||||
|
dxBarBuiltInMenu, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
|
||||||
|
dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
|
||||||
|
dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
|
||||||
|
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
|
||||||
|
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||||
|
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||||
|
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||||
|
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||||
|
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
|
||||||
|
dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
|
||||||
|
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
|
||||||
|
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
|
||||||
|
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
|
||||||
|
dxSkinscxPCPainter;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmClothTP_HWZY = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Label3: TLabel;
|
||||||
|
ConNo: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
C_CodeName: TEdit;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
Label4: TLabel;
|
||||||
|
C_Spec: TEdit;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1OrderNo: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1PRTSpec: TcxGridDBColumn;
|
||||||
|
v1PRTMF: TcxGridDBColumn;
|
||||||
|
v1PRTKZ: TcxGridDBColumn;
|
||||||
|
v1PRTOrderQty: TcxGridDBColumn;
|
||||||
|
v1OrderUnit: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
ClientDataSet3: TClientDataSet;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
DataSource3: TDataSource;
|
||||||
|
ClientDataSet2: TClientDataSet;
|
||||||
|
v1Qty1: TcxGridDBColumn;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDBMain: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
CDS_PRT: TClientDataSet;
|
||||||
|
Label6: TLabel;
|
||||||
|
FactoryNoName: TEdit;
|
||||||
|
cxStyleRepository1: TcxStyleRepository;
|
||||||
|
cxStyle1: TcxStyle;
|
||||||
|
cxStyle2: TcxStyle;
|
||||||
|
cxStyle_gridRow: TcxStyle;
|
||||||
|
cxStyle_gridFoot: TcxStyle;
|
||||||
|
cxStyle_gridHead: TcxStyle;
|
||||||
|
cxStyle_gridGroupBox: TcxStyle;
|
||||||
|
cxStyle_yellow: TcxStyle;
|
||||||
|
cxStyle_Red: TcxStyle;
|
||||||
|
cxStyle_fontBlack: TcxStyle;
|
||||||
|
cxStyle_fontclFuchsia: TcxStyle;
|
||||||
|
cxStyle_fontclPurple: TcxStyle;
|
||||||
|
cxStyle_fontclGreen: TcxStyle;
|
||||||
|
cxStyle_fontclBlue: TcxStyle;
|
||||||
|
cxStyle_fontclTeal: TcxStyle;
|
||||||
|
cxStyle_fontclOlive: TcxStyle;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
cxTabControl1: TcxTabControl;
|
||||||
|
tchk: TToolButton;
|
||||||
|
Tnochk: TToolButton;
|
||||||
|
Label7: TLabel;
|
||||||
|
JHPlace: TEdit;
|
||||||
|
v1Column18: TcxGridDBColumn;
|
||||||
|
v1Column19: TcxGridDBColumn;
|
||||||
|
v1Column20: TcxGridDBColumn;
|
||||||
|
v1Column21: TcxGridDBColumn;
|
||||||
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
Tv1Column2: TcxGridDBColumn;
|
||||||
|
Tv1Column3: TcxGridDBColumn;
|
||||||
|
Tv1Column4: TcxGridDBColumn;
|
||||||
|
Tv1Column5: TcxGridDBColumn;
|
||||||
|
Tv1Column6: TcxGridDBColumn;
|
||||||
|
Tv1Column7: TcxGridDBColumn;
|
||||||
|
Tv1Column8: TcxGridDBColumn;
|
||||||
|
cxStyle3: TcxStyle;
|
||||||
|
Tv1Column9: TcxGridDBColumn;
|
||||||
|
Tv1Column10: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBFindClick(Sender: TObject);
|
||||||
|
procedure TBEditClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure ConNoChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure Tv2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure conPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure TthClick(Sender: TObject);
|
||||||
|
procedure tchkClick(Sender: TObject);
|
||||||
|
procedure TnochkClick(Sender: TObject);
|
||||||
|
procedure Tv1CustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
||||||
|
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
procedure cxTabControl1Change(Sender: TObject);
|
||||||
|
private
|
||||||
|
FInt, PFInt: Integer;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData(): Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fDParameters1: string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmClothTP_HWZY: TfrmClothTP_HWZY;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_ClothTPHWZYInput, U_Fun, U_ProductOrderList, U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmClothTP_HWZY := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action := caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ScrollBox1.Align := alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid(self.Caption, Tv1, '指示单管理');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
// sql.Add('exec P_Get_Contract');
|
||||||
|
// sql.Add('@begdate=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + ''' ');
|
||||||
|
// sql.Add(',@enddate=''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + ''' ');
|
||||||
|
// sql.Add(',@conType=''坯布到货'' ');
|
||||||
|
// sql.Add(',@status=''' + inttostr(cxTabControl1.TabIndex) + ''' ');
|
||||||
|
// ShowMessage(SQL.text);
|
||||||
|
sql.Add('select *,fromConNo=(select Top 1 conNo from Contract_Main X where X.MainID=A.fromMainID) ');
|
||||||
|
sql.Add('from Contract_Main A');
|
||||||
|
sql.Add('inner join Contract_sub B on B.MainID=A.mainID ');
|
||||||
|
sql.Add('where A.FillTime>= ''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + ''' ');
|
||||||
|
sql.Add('and A.FillTime< ''' + Trim(FormatDateTime('yyyy-MM-dd', endDate.DateTime + 1)) + ''' ');
|
||||||
|
sql.Add('and A.conType=''货物占用'' '); //and ZYGS>0
|
||||||
|
// ShowMessage(SQL.text);
|
||||||
|
// IF cxTabControl1.TabIndex<2 then
|
||||||
|
// sql.Add('and isnull(B.C_status,''0'')='''+inttostr(cxTabControl1.TabIndex)+''' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
TBFind.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.InitForm();
|
||||||
|
begin
|
||||||
|
// if fDParameters1 = '查询' then
|
||||||
|
// begin
|
||||||
|
// TBADD.Visible := false;
|
||||||
|
// // TBEdit.Visible:=false;
|
||||||
|
// TBDel.Visible := false;
|
||||||
|
// // Tchk.Visible:=false;
|
||||||
|
// // TNochk.Visible:=false;
|
||||||
|
//// v1Price.Visible := false;
|
||||||
|
//// v1Price.Hidden := true;
|
||||||
|
//// v1money.Visible := false;
|
||||||
|
//// v1money.Hidden := true;
|
||||||
|
//// v1T_money.Visible := false;
|
||||||
|
//// v1T_money.Hidden := true;
|
||||||
|
// ToolButton1.Visible := false;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// TBEdit.Enabled := false;
|
||||||
|
// TBDel.Enabled := false;
|
||||||
|
// Tchk.Enabled := false;
|
||||||
|
// TNochk.Enabled := false;
|
||||||
|
//
|
||||||
|
// if cxTabControl1.TabIndex = 0 then
|
||||||
|
// begin
|
||||||
|
//// TBEdit.Enabled := true;
|
||||||
|
// TBDel.Enabled := true;
|
||||||
|
// Tchk.Enabled := true;
|
||||||
|
//
|
||||||
|
// end;
|
||||||
|
// if cxTabControl1.TabIndex = 1 then
|
||||||
|
// begin
|
||||||
|
// TNochk.Enabled := true;
|
||||||
|
// end;
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.TBFindClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active = False then
|
||||||
|
Exit;
|
||||||
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.TBEditClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select YFID from YF_money_CR ');
|
||||||
|
sql.Add('where mainID=''' + trim(Order_Main.FieldByName('mainID').AsString) + ''' ');
|
||||||
|
sql.Add('and status>0 ');
|
||||||
|
open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('财务数据已审核,不能修改!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
// with ADOQueryTemp do
|
||||||
|
// begin
|
||||||
|
// close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('select * from contract_sub ');
|
||||||
|
// sql.Add('where kcsubid=''' + trim(Order_Main.FieldByName('subid').AsString) + ''' ');
|
||||||
|
//// sql.Add(' ');
|
||||||
|
// open;
|
||||||
|
// if not IsEmpty then
|
||||||
|
// begin
|
||||||
|
// application.MessageBox('已出库不能修改!', '提示信息', MB_ICONERROR);
|
||||||
|
// exit;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
try
|
||||||
|
frmClothTPHWZYInput := TfrmClothTPHWZYInput.Create(Application);
|
||||||
|
with frmClothTPHWZYInput do
|
||||||
|
begin
|
||||||
|
if trim(fDParameters1) = '查询' then
|
||||||
|
begin
|
||||||
|
frmClothTPHWZYInput.Caption := '到货信息查询';
|
||||||
|
// v1Money.Visible := false;
|
||||||
|
// v1Price.Visible := false;
|
||||||
|
// v1Money.Hidden := true;
|
||||||
|
// v1Price.Hidden := true;
|
||||||
|
// v1T_money.Visible := false;
|
||||||
|
// v1T_money.Hidden := true;
|
||||||
|
// v1T_price.Visible := false;
|
||||||
|
// v1T_price.Hidden := true;
|
||||||
|
ScrollBox1.Enabled := false;
|
||||||
|
for i := 0 to tv1.ColumnCount - 1 do
|
||||||
|
begin
|
||||||
|
tv1.Columns[i].Options.Editing := false;
|
||||||
|
end;
|
||||||
|
// v1Mrate.Options.Editing := true;
|
||||||
|
ToolBar2.Enabled := false;
|
||||||
|
end;
|
||||||
|
PState := 1;
|
||||||
|
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
// TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothTPHWZYInput.Free;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select YFID from YF_money_CR ');
|
||||||
|
sql.Add('where mainID=''' + trim(Order_Main.FieldByName('mainID').AsString) + ''' ');
|
||||||
|
sql.Add('and status>0 ');
|
||||||
|
open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('财务数据已审核,不能删除!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from contract_sub ');
|
||||||
|
sql.Add('where kcsubid=''' + trim(Order_Main.FieldByName('subid').AsString) + ''' ');
|
||||||
|
open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('已出库不能修改!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
if trim(Order_Main.FieldByName('mainID').AsString) = 'CM001' then
|
||||||
|
exit;
|
||||||
|
if DelData() then
|
||||||
|
begin
|
||||||
|
Order_Main.Delete;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmClothTP_HWZY.DelData(): Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result := false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete YF_Money_CR where MainID=''' + Trim(Order_Main.fieldbyname('MainID').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
// sql.Add(' where CRID='+CRID);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub where SubId=''' + Trim(Order_Main.fieldbyname('SubId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Trim(Order_Main.fieldbyname('SubId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result := True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result := False;
|
||||||
|
Application.MessageBox('数据删除异常!', '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
TcxGridToExcel('坯布合同订单列表', cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile, FConNoM: string;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\坯布到货单.rmf';
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select *,fromConNo=(select Top 1 conNo from Contract_Main X where X.MainID=A.fromMainID) ');
|
||||||
|
sql.Add('from Contract_Main A');
|
||||||
|
sql.Add('inner join Contract_sub B on B.MainID=A.mainID ');
|
||||||
|
sql.Add('where A.FillTime>= ''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + ''' ');
|
||||||
|
sql.Add('and A.FillTime< ''' + Trim(FormatDateTime('yyyy-MM-dd', endDate.DateTime + 1)) + ''' ');
|
||||||
|
sql.Add('and A.mainID=' + quotedstr(trim(Order_Main.fieldbyname('MainID').AsString)));
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp, CDS_PRT);
|
||||||
|
SInitCDSData20(ADOQueryTemp, CDS_PRT);
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['dtxz'] := formatdateTime('yyyy-MM-dd', Now);
|
||||||
|
RMVariables['zdr'] := Trim(dName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找' + ExtractFilePath(Application.ExeName) + 'Report\坯布到货单.rmf'), '提示', 0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.TBAddClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmClothTPHWZYInput := TfrmClothTPHWZYInput.Create(Application);
|
||||||
|
with frmClothTPHWZYInput do
|
||||||
|
begin
|
||||||
|
if trim(fDParameters1) = '查询' then
|
||||||
|
begin
|
||||||
|
frmClothTPHWZYInput.Caption := '到货信息查询';
|
||||||
|
// v1Money.Visible := false;
|
||||||
|
// v1Price.Visible := false;
|
||||||
|
// v1Money.Hidden := true;
|
||||||
|
// v1Price.Hidden := true;
|
||||||
|
// v1T_money.Visible := false;
|
||||||
|
// v1T_money.Hidden := true;
|
||||||
|
ScrollBox1.Enabled := false;
|
||||||
|
for i := 0 to tv1.ColumnCount - 2 do
|
||||||
|
begin
|
||||||
|
tv1.Columns[i].Options.Editing := false;
|
||||||
|
end;
|
||||||
|
// v1Mrate.Options.Editing := true;
|
||||||
|
ToolBar2.Enabled := false;
|
||||||
|
end;
|
||||||
|
PState := 0;
|
||||||
|
FMainId := '';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothTPHWZYInput.Free;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.ConNoChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active = False then
|
||||||
|
Exit;
|
||||||
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption, Tv1, '指示单管理');
|
||||||
|
BegDate.DateTime := SGetServerDate10(ADOQueryTemp) - 7;
|
||||||
|
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||||
|
initForm();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.Tv2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt := 2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt := 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno: string;
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if ClientDataSet2.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MXId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('到货数量未确定!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ClientDataSet3.Locate('OrderNo', null, []) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('指定订单编号不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
BegDate.SetFocus;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
//保存去向表
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString) = '' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd, maxno, 'To', 'Contract_Sub_MxTo', 4, 1) = False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取去向流水号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
maxno := Trim(ClientDataSet3.fieldbyname('ToId').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub_MxTo where ToId=''' + Trim(ClientDataSet3.fieldbyname('ToId').AsString) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString) = '' then
|
||||||
|
Append
|
||||||
|
else
|
||||||
|
Edit;
|
||||||
|
FieldByName('MxId').Value := Trim(ClientDataSet2.fieldbyname('MxId').AsString);
|
||||||
|
FieldByName('ToId').Value := Trim(maxno);
|
||||||
|
FieldByName('OrdSubId').Value := Trim(ClientDataSet3.fieldbyname('OrdSubId').AsString);
|
||||||
|
FieldByName('TPDate').Value := ClientDataSet3.fieldbyname('TPDate').Value;
|
||||||
|
FieldByName('TPPerson').Value := ClientDataSet3.fieldbyname('TPPerson').Value;
|
||||||
|
FieldByName('TPNote').Value := ClientDataSet3.fieldbyname('TPNote').Value;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('TPQty').AsString) <> '' then
|
||||||
|
FieldByName('TPQty').Value := ClientDataSet3.fieldbyname('TPQty').Value
|
||||||
|
else
|
||||||
|
FieldByName('TPQty').Value := 0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty1').AsString) <> '' then
|
||||||
|
FieldByName('Qty1').Value := ClientDataSet3.fieldbyname('Qty1').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty1').Value := 0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty2').AsString) <> '' then
|
||||||
|
FieldByName('Qty2').Value := ClientDataSet3.fieldbyname('Qty2').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty2').Value := 0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty3').AsString) <> '' then
|
||||||
|
FieldByName('Qty3').Value := ClientDataSet3.fieldbyname('Qty3').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty3').Value := 0;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ToId').Value := Trim(maxno);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('操作成功!', '提示', 0);
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('操作异常!', '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FInt = 2 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet2.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if ClientDataSet3.IsEmpty = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生坯布领料数据,不能删除到坯记录!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MxId').AsString) <> '' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_Mx where MxId=''' + Trim(ClientDataSet2.fieldbyname('MxId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet2.Delete;
|
||||||
|
end
|
||||||
|
else if FInt = 3 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString) <> '' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_MxTo where ToId=''' + Trim(ClientDataSet3.fieldbyname('ToId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet3.Delete;
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
if ClientDataSet3.IsEmpty = False then
|
||||||
|
// FieldByName('KCSL').Value:=ClientDataSet2.fieldbyname('MxQty').Value-tv3.DataController.Summary.FooterSummaryValues[0]
|
||||||
|
|
||||||
|
else
|
||||||
|
FieldByName('KCSL').Value := ClientDataSet2.fieldbyname('MxQty').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.v2Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'RKPlace';
|
||||||
|
flagname := '入库地点';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('RKPlace').Value := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.conPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
{ if Key=#13 then
|
||||||
|
begin
|
||||||
|
if Length(Trim(ConNoM.Text))<4 then Exit;
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec ClothContract_QryList :MainId,:WSql');
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and OM.conNo like '''+'%'+Trim(ConNoM.Text)+'%'+'''';
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
try
|
||||||
|
frmClothTPHWZYInput := TfrmClothTPHWZYInput.Create(Application);
|
||||||
|
with frmClothTPHWZYInput do
|
||||||
|
begin
|
||||||
|
PState := 3;
|
||||||
|
TBSave.Enabled := false;
|
||||||
|
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothTPHWZYInput.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
ToolButton1.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.TthClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
try
|
||||||
|
frmClothTPHWZYInput := TfrmClothTPHWZYInput.Create(Application);
|
||||||
|
with frmClothTPHWZYInput do
|
||||||
|
begin
|
||||||
|
Caption := '坯布退货';
|
||||||
|
PState := 1;
|
||||||
|
v1T_money.Visible := true;
|
||||||
|
v1T_ps.Visible := true;
|
||||||
|
v1T_Qty.Visible := true;
|
||||||
|
v1T_Price.Visible := true;
|
||||||
|
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothTPHWZYInput.Free;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.tchkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
{ try
|
||||||
|
frmClothContractInPut := TfrmClothContractInPut.Create(Application);
|
||||||
|
with frmClothContractInPut do
|
||||||
|
begin
|
||||||
|
PState := 1;
|
||||||
|
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
with self.ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''1'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(self.Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(self.Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
self.InitGrid();
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractInPut.Free;
|
||||||
|
// TBRafresh.Click;
|
||||||
|
end; }
|
||||||
|
|
||||||
|
if Order_Main.Locate('ssel', true, []) = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''1'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('操作失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.TnochkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
if Order_Main.Locate('ssel', true, []) = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
{with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''0'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end; }
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('update Contract_sub SET C_status=''0'' ');
|
||||||
|
sql.Add('where mainID =' + quotedstr(trim(Order_Main.fieldbyname('mainID').AsString)));
|
||||||
|
sql.Add('and subID =' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('操作失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.Tv1CustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
||||||
|
var
|
||||||
|
FValue: string;
|
||||||
|
FBounds: TRect;
|
||||||
|
begin
|
||||||
|
// FBounds := AViewInfo.Bounds;
|
||||||
|
// if (AViewInfo is TcxGridIndicatorRowItemViewInfo) then
|
||||||
|
// begin
|
||||||
|
// ACanvas.FillRect(FBounds);
|
||||||
|
// ACanvas.DrawComplexFrame(FBounds, clBtnHighlight, clBtnShadow, [bBottom, bLeft, bRight], 1);
|
||||||
|
// FValue := IntToStr(TcxGridIndicatorRowItemViewInfo(AViewInfo).GridRecord.Index + 1);
|
||||||
|
// InflateRect(FBounds, -1, -1);
|
||||||
|
// ACanvas.Font.Color := clBlack;
|
||||||
|
// ACanvas.Brush.Style := bsClear;
|
||||||
|
// ACanvas.DrawText(FValue, FBounds, cxAlignCenter or cxAlignTop);
|
||||||
|
// ADone := True;
|
||||||
|
// end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
begin
|
||||||
|
// if AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('H_PS').Index] >= AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('Qty1').Index] then
|
||||||
|
// begin
|
||||||
|
// ACanvas.Brush.Color := clSkyBlue;
|
||||||
|
// end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothTP_HWZY.cxTabControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
initForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
|
@ -34,8 +34,8 @@ uses
|
||||||
U_ClothContractList_SJDCK, U_KH_XS_YP_list, U_ProductOrderNewList_BH,
|
U_ClothContractList_SJDCK, U_KH_XS_YP_list, U_ProductOrderNewList_BH,
|
||||||
U_ClothContractList_HZ1, U_ClothContractList_CP, U_ClothContractList_SJD,
|
U_ClothContractList_HZ1, U_ClothContractList_CP, U_ClothContractList_SJD,
|
||||||
U_ClothContractList_XPKF, U_ClothContractList_DY, U_ClothContractList_Dp,
|
U_ClothContractList_XPKF, U_ClothContractList_DY, U_ClothContractList_Dp,
|
||||||
U_ClothContractList_CK,
|
U_ClothContractList_CK, U_ClothContractCPRKList, U_ClothContractCPCKList,
|
||||||
U_ClothContractList_SJDMX, U_ClothContractList_PBKC;
|
U_ClothTP_HWZY, U_ClothContractList_SJDMX, U_ClothContractList_PBKC;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
// 功能说明:取Dll中得窗体 //
|
// 功能说明:取Dll中得窗体 //
|
||||||
|
@ -649,7 +649,7 @@ begin
|
||||||
mnewHandle := frmClothContractList_CK.Handle;
|
mnewHandle := frmClothContractList_CK.Handle;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
15: //坯布采购 到货 投匹
|
15: //坯布入库
|
||||||
begin
|
begin
|
||||||
if frmClothContractList = nil then
|
if frmClothContractList = nil then
|
||||||
begin
|
begin
|
||||||
|
@ -671,7 +671,49 @@ begin
|
||||||
mnewHandle := frmClothContractList.Handle;
|
mnewHandle := frmClothContractList.Handle;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
151: //坯布采购 到货 投匹
|
661: //成品入库
|
||||||
|
begin
|
||||||
|
if frmClothContractCPRKList = nil then
|
||||||
|
begin
|
||||||
|
frmClothContractCPRKList := TfrmClothContractCPRKList.Create(application.MainForm);
|
||||||
|
with frmClothContractCPRKList do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
fDParameters1 := trim(DParameters1);
|
||||||
|
// fDParameters1:=trim('查询');
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmClothContractCPRKList.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmClothContractCPRKList.Handle;
|
||||||
|
end;
|
||||||
|
662: //成品出库
|
||||||
|
begin
|
||||||
|
if frmClothContractCPCKList = nil then
|
||||||
|
begin
|
||||||
|
frmClothContractCPCKList := TfrmClothContractCPCKList.Create(application.MainForm);
|
||||||
|
with frmClothContractCPCKList do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
fDParameters1 := trim(DParameters1);
|
||||||
|
// fDParameters1:=trim('查询');
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmClothContractCPCKList.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmClothContractCPCKList.Handle;
|
||||||
|
end;
|
||||||
|
151: //坯布采购计划
|
||||||
begin
|
begin
|
||||||
if frmClothContractList_CG = nil then
|
if frmClothContractList_CG = nil then
|
||||||
begin
|
begin
|
||||||
|
@ -690,7 +732,26 @@ begin
|
||||||
//句柄
|
//句柄
|
||||||
mnewHandle := frmClothContractList_CG.Handle;
|
mnewHandle := frmClothContractList_CG.Handle;
|
||||||
end;
|
end;
|
||||||
|
552: //货物占用
|
||||||
|
begin
|
||||||
|
if frmClothTP_HWZY = nil then
|
||||||
|
begin
|
||||||
|
frmClothTP_HWZY := TfrmClothTP_HWZY.Create(application.MainForm);
|
||||||
|
with frmClothTP_HWZY do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
fDParameters1 := trim(DParameters1);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmClothTP_HWZY.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmClothTP_HWZY.Handle;
|
||||||
|
end;
|
||||||
152: //坯布采购 回修 坯布点色计划
|
152: //坯布采购 回修 坯布点色计划
|
||||||
begin
|
begin
|
||||||
if frmClothContractList_Tp = nil then
|
if frmClothContractList_Tp = nil then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user