成品出库方式调整
This commit is contained in:
parent
82c6347dad
commit
022e48e0b2
|
@ -4,7 +4,7 @@ uses
|
|||
SysUtils,
|
||||
classes,
|
||||
forms,
|
||||
WinTypes,
|
||||
WinTypes,
|
||||
WinProcs,
|
||||
U_DataLink in 'U_DataLink.pas' {BPCK_DataLink: TDataModule},
|
||||
U_GetDllForm in 'U_GetDllForm.pas',
|
||||
|
|
|
@ -10,7 +10,21 @@ uses
|
|||
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxButtonEdit, cxDropDownEdit,
|
||||
DBClient, ADODB, cxGridCustomPopupMenu, cxGridPopupMenu, cxTextEdit, BtnEdit,
|
||||
RM_Common, RM_Class, RM_e_Xls, RM_GridReport, RM_System, RM_Dataset,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator;
|
||||
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
|
||||
TfrmbpRk = class(TForm)
|
||||
|
@ -916,6 +930,7 @@ begin
|
|||
begin
|
||||
Edit;
|
||||
FieldByName('P_Color').value := CDS_HZ.fieldbyname('CodeName').AsString;
|
||||
FieldByName('P_ColorNo').value := CDS_HZ.fieldbyname('Colorno').AsString;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
|
|
@ -21,7 +21,6 @@ object frmBpRklist: TfrmBpRklist
|
|||
Left = 0
|
||||
Top = 0
|
||||
Width = 1144
|
||||
Height = 62
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 95
|
||||
|
@ -93,12 +92,11 @@ object frmBpRklist: TfrmBpRklist
|
|||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 75
|
||||
Wrap = True
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBPrint: TToolButton
|
||||
Left = 0
|
||||
Top = 30
|
||||
Left = 441
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
ImageIndex = 12
|
||||
|
@ -106,8 +104,8 @@ object frmBpRklist: TfrmBpRklist
|
|||
OnClick = TBPrintClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 63
|
||||
Top = 30
|
||||
Left = 504
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360#36864#36135#21333
|
||||
ImageIndex = 12
|
||||
|
@ -115,32 +113,32 @@ object frmBpRklist: TfrmBpRklist
|
|||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 162
|
||||
Top = 30
|
||||
Left = 603
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #32454#30721#24405#20837
|
||||
ImageIndex = 10
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 249
|
||||
Top = 30
|
||||
Left = 690
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360#26631#31614
|
||||
ImageIndex = 12
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 336
|
||||
Top = 30
|
||||
Left = 777
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 55
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 399
|
||||
Top = 30
|
||||
Left = 840
|
||||
Top = 0
|
||||
Caption = #25171#21360#20837#24211#21333
|
||||
ImageIndex = 12
|
||||
OnClick = ToolButton4Click
|
||||
|
@ -148,7 +146,7 @@ object frmBpRklist: TfrmBpRklist
|
|||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 62
|
||||
Top = 32
|
||||
Width = 1144
|
||||
Height = 65
|
||||
Align = alTop
|
||||
|
@ -427,9 +425,9 @@ object frmBpRklist: TfrmBpRklist
|
|||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 147
|
||||
Top = 117
|
||||
Width = 560
|
||||
Height = 314
|
||||
Height = 344
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
|
@ -681,7 +679,7 @@ object frmBpRklist: TfrmBpRklist
|
|||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 127
|
||||
Top = 97
|
||||
Width = 1144
|
||||
Height = 20
|
||||
Align = alTop
|
||||
|
@ -699,9 +697,9 @@ object frmBpRklist: TfrmBpRklist
|
|||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 560
|
||||
Top = 147
|
||||
Top = 117
|
||||
Width = 584
|
||||
Height = 314
|
||||
Height = 344
|
||||
Align = alRight
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 4
|
||||
|
|
|
@ -11,7 +11,20 @@ uses
|
|||
cxGrid, DBClient, ADODB, cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset,
|
||||
RM_Common, RM_Class, RM_e_Xls, RM_System, RM_GridReport, cxPC, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, cxCheckBox, cxTextEdit,
|
||||
Menus;
|
||||
Menus, 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
|
||||
TfrmBpRklist = class(TForm)
|
||||
|
@ -328,7 +341,7 @@ begin
|
|||
begin
|
||||
fkeyNo := '';
|
||||
fType := 0;
|
||||
fckName := self.fckName;
|
||||
fckName := self.fckName;
|
||||
if showmodal = 1 then
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
object frmZdyYS_Sel: TfrmZdyYS_Sel
|
||||
Left = 1087
|
||||
Top = 274
|
||||
Left = 682
|
||||
Top = 278
|
||||
Width = 813
|
||||
Height = 662
|
||||
Caption = #39068#33394
|
||||
|
@ -97,6 +97,12 @@ object frmZdyYS_Sel: TfrmZdyYS_Sel
|
|||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
end
|
||||
object Tv2Column3: TcxGridDBColumn
|
||||
Caption = #33394#21495
|
||||
DataBinding.FieldName = 'Colorno'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
|
|
|
@ -12,7 +12,21 @@ uses
|
|||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator;
|
||||
cxTextEdit, 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
|
||||
TfrmZdyYS_Sel = class(TForm)
|
||||
|
@ -46,6 +60,7 @@ type
|
|||
Code: TEdit;
|
||||
Tv2Column2: TcxGridDBColumn;
|
||||
Edit1: TEdit;
|
||||
Tv2Column3: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
|
|
|
@ -4,8 +4,8 @@ uses
|
|||
SysUtils,
|
||||
classes,
|
||||
forms,
|
||||
WinTypes,
|
||||
WinProcs,
|
||||
WinTypes,
|
||||
WinProcs,
|
||||
U_DataLink in 'U_DataLink.pas' {DataLink_BaseInfo: TDataModule},
|
||||
U_GetDllForm in 'U_GetDllForm.pas',
|
||||
U_Fun in '..\..\..\ThreeFun\Fun\U_Fun.pas',
|
||||
|
|
|
@ -154,12 +154,12 @@ begin
|
|||
// fkhType:='';
|
||||
fkhType := trim(DataBase);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
else
|
||||
frmZdyAttachCP.BringToFront;
|
||||
//¾ä±ú
|
||||
mnewHandle := frmZdyAttachCP.Handle;
|
||||
|
|
|
@ -543,6 +543,12 @@ object frmZdyAttInputCP10: TfrmZdyAttInputCP10
|
|||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object Tv2Column2: TcxGridDBColumn
|
||||
Caption = #33394#21495
|
||||
DataBinding.FieldName = 'CYYSno'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
|
@ -622,6 +628,14 @@ object frmZdyAttInputCP10: TfrmZdyAttInputCP10
|
|||
TabOrder = 23
|
||||
Visible = False
|
||||
end
|
||||
object CYColorno: TEdit
|
||||
Tag = 2
|
||||
Left = 703
|
||||
Top = 317
|
||||
Width = 141
|
||||
Height = 20
|
||||
TabOrder = 24
|
||||
end
|
||||
end
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
|
|
|
@ -106,6 +106,8 @@ type
|
|||
fprice: TEdit;
|
||||
Label26: TLabel;
|
||||
CPtxm: TEdit;
|
||||
Tv2Column2: TcxGridDBColumn;
|
||||
CYColorno: TEdit;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
|
@ -352,7 +354,7 @@ begin
|
|||
end;
|
||||
|
||||
with adoqueryTmp do
|
||||
begin
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_Zdy_Attachment X');
|
||||
|
@ -546,7 +548,7 @@ begin
|
|||
begin
|
||||
|
||||
cycolor.text := CDS_HZ.fieldbyname('CodeName').AsString;
|
||||
|
||||
CYColorno.text := trim(CDS_HZ.fieldbyname('Colorno').AsString);
|
||||
end;
|
||||
free;
|
||||
end;
|
||||
|
|
|
@ -419,6 +419,15 @@ object frmZdyAttInputCP_CB: TfrmZdyAttInputCP_CB
|
|||
TabOrder = 18
|
||||
OnBtnClick = CYColorBtnClick
|
||||
end
|
||||
object CYColorno: TEdit
|
||||
Tag = 2
|
||||
Left = 820
|
||||
Top = 229
|
||||
Width = 141
|
||||
Height = 20
|
||||
TabOrder = 19
|
||||
Visible = False
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
|
|
|
@ -159,6 +159,7 @@ type
|
|||
DS5: TDataSource;
|
||||
TV5Column1: TcxGridDBColumn;
|
||||
TV5Column2: TcxGridDBColumn;
|
||||
CYColorno: TEdit;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
|
@ -272,7 +273,7 @@ begin
|
|||
FieldByName('Edittime').Value := SGetServerDateTime(ADOQueryTmp);
|
||||
end;
|
||||
SSetsaveSqlNew(ADOQueryCmd, 'KH_Zdy_Attachment', GroupBox1, 2);
|
||||
// fieldbyname('fprice').Value := strtofloatdef(trim(DefFlt1.Text), 0);
|
||||
// fieldbyname('fprice').Value := strtofloatdef(trim(DefFlt1.Text), 0);
|
||||
// fieldbyname('Sprice').Value := strtofloatdef(trim(DefFlt2.Text), 0);
|
||||
// fieldbyname('Tprice').Value := strtofloatdef(trim(DefFlt1.Text), 0);
|
||||
// FieldByName('defflt3').Value := strtofloatdef(Trim(defflt3.text), 1);
|
||||
|
@ -299,6 +300,8 @@ begin
|
|||
fieldbyname('Seprice').Value := strtofloatdef(trim(Seprice.Text), 0);
|
||||
fieldbyname('Tprice').Value := strtofloatdef(trim(Tprice.Text), 0);
|
||||
fieldbyname('DZprice').Value := strtofloatdef(trim(DZprice.Text), 0);
|
||||
FieldByName('CYColorno').Value := Trim(CYColorno.text);
|
||||
FieldByName('CYColor').Value := Trim(CYColor.text);
|
||||
post;
|
||||
end;
|
||||
end;
|
||||
|
@ -413,7 +416,7 @@ begin
|
|||
next;
|
||||
end;
|
||||
end;
|
||||
with cds5 do
|
||||
with cds5 do
|
||||
begin
|
||||
First;
|
||||
while not eof do
|
||||
|
@ -1342,6 +1345,7 @@ begin
|
|||
begin
|
||||
|
||||
CYColor.text := trim(CDS_HZ.fieldbyname('CodeName').AsString);
|
||||
CYColorno.text := trim(CDS_HZ.fieldbyname('Colorno').AsString);
|
||||
// Self.Order_Sub.FieldByName('SOrddefstr4').Value := Trim(ClientDataSet1.fieldbyname('Note').AsString);
|
||||
end;
|
||||
// if showmodal = 1 then
|
||||
|
|
|
@ -423,6 +423,12 @@ object frmZdyAttachCP10: TfrmZdyAttachCP10
|
|||
HeaderAlignmentHorz = taCenter
|
||||
Width = 90
|
||||
end
|
||||
object Tv2Column7: TcxGridDBColumn
|
||||
Caption = #39068#33394#32534#21495
|
||||
DataBinding.FieldName = 'CYColorno'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
|
|
|
@ -130,6 +130,7 @@ type
|
|||
TV3Column30: TcxGridDBColumn;
|
||||
TV3Column31: TcxGridDBColumn;
|
||||
TV3Column32: TcxGridDBColumn;
|
||||
Tv2Column7: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
|
|
|
@ -115,6 +115,14 @@ object frmZdyYS_help: TfrmZdyYS_help
|
|||
HeaderAlignmentHorz = taCenter
|
||||
Width = 147
|
||||
end
|
||||
object Tv2Column3: TcxGridDBColumn
|
||||
Caption = #33394#21495
|
||||
DataBinding.FieldName = 'Colorno'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = Tv2Column3PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
|
|
|
@ -13,7 +13,20 @@ uses
|
|||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
|
||||
cxTLdxBarBuiltInMenu;
|
||||
cxTLdxBarBuiltInMenu, 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
|
||||
TfrmZdyYS_help = class(TForm)
|
||||
|
@ -64,6 +77,7 @@ type
|
|||
Tv2Column2: TcxGridDBColumn;
|
||||
Label4: TLabel;
|
||||
CPNameYW: TEdit;
|
||||
Tv2Column3: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
|
@ -83,6 +97,7 @@ type
|
|||
procedure PageControl1Change(Sender: TObject);
|
||||
procedure cxDBTreeList1Change(Sender: TObject);
|
||||
procedure Tv2Column2PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure Tv2Column3PropertiesEditValueChanged(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
PState: Integer;
|
||||
|
@ -444,8 +459,34 @@ begin
|
|||
CPNo.Text := Trim(ADOQueryTree.fieldbyname('Code').AsString);
|
||||
end;
|
||||
|
||||
procedure TfrmZdyYS_help.Tv2Column2PropertiesEditValueChanged(
|
||||
Sender: TObject);
|
||||
procedure TfrmZdyYS_help.Tv2Column2PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
begin
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue) = '' then
|
||||
begin
|
||||
mvalue := '';
|
||||
end;
|
||||
FFieldName := Trim(Tv2.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
with CDS_HZ do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value := Trim(mvalue);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate CP_CMYS ');
|
||||
sql.Add(' Set ' + FFieldName + '=''' + Trim(mvalue) + '''');
|
||||
SQL.Add(' where Mainid=''' + Trim(CDS_HZ.fieldbyname('Mainid').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyYS_help.Tv2Column3PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
begin
|
||||
|
|
|
@ -12,7 +12,20 @@ uses
|
|||
cxDropDownEdit, cxCheckBox, RM_Common, RM_Class, RM_e_Xls, RM_Dataset,
|
||||
RM_System, RM_GridReport, Menus, cxCalendar, cxButtonEdit, cxTextEdit, cxPC,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu,
|
||||
cxContainer, cxImage, cxDBEdit;
|
||||
cxContainer, cxImage, cxDBEdit, 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
|
||||
TfrmSXCKNewList = class(TForm)
|
||||
|
@ -176,7 +189,7 @@ begin
|
|||
// + quotedstr(Trim(CDS_Main.fieldbyname('factoryName').AsString)));
|
||||
sql.Add(' and mainID=''' + Trim(CDS_Main.fieldbyname('crno').AsString) + ''' and yfname not in(''坯布其他费'',''外加工其他费'',''待检布其他费'',''成品费'')');
|
||||
sql.Add(' and P_color=''' + Trim(CDS_Main.fieldbyname('P_color').AsString) + '''');
|
||||
sql.Add(' and P_code=''' + Trim(CDS_Main.fieldbyname('P_code').AsString) + '''');
|
||||
sql.Add(' and P_code=''' + Trim(CDS_Main.fieldbyname('P_code').AsString) + '''');
|
||||
// ShowMessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
|
@ -219,7 +232,7 @@ begin
|
|||
FieldByName('CJQty').Value := CDS_Main.fieldbyname('Qty').AsFloat;
|
||||
// FieldByName('Qty').Value := CDS_Main.fieldbyname('Qty').AsFloat * CDS_Main.fieldbyname('CRQtyFlag').AsFloat;
|
||||
// FieldByName('MDQty').Value := CDS_Main.fieldbyname('Qty').AsFloat * CDS_Main.fieldbyname('CRQtyFlag').AsFloat;
|
||||
// FieldByName('machi').Value := 1;
|
||||
|
||||
FieldByName('PS').Value := CDS_Main.fieldbyname('piqty').AsFloat;
|
||||
// FieldByName('PS').Value := CDS_Main.fieldbyname('rollnum').AsFloat * CDS_Main.fieldbyname('CRQtyFlag').AsFloat;
|
||||
FieldByName('YFType').Value := '自动生成';
|
||||
|
@ -241,7 +254,7 @@ begin
|
|||
FieldByName('YFName').Value := Trim(CDS_Main.fieldbyname('FeeName').AsString);
|
||||
FieldByName('Price').Value := Trim(CDS_Main.fieldbyname('Price').AsString);
|
||||
FieldByName('Money').Value := Trim(CDS_Main.fieldbyname('Money').AsString);
|
||||
// fieldbyname('quality').Value := Trim(CDS_Main.fieldbyname('quality').AsString);
|
||||
|
||||
fieldbyname('P_Code').Value := Trim(CDS_Main.fieldbyname('p_code').AsString);
|
||||
fieldbyname('Note').Value := Trim(CDS_Main.fieldbyname('Note').AsString);
|
||||
FieldByName('MainId').Value := Trim(CDS_Main.fieldbyname('crno').AsString);
|
||||
|
@ -406,7 +419,7 @@ end;
|
|||
|
||||
procedure TfrmSXCKNewList.FactoryNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmSXCKNewList.ToolButton1Click(Sender: TObject);
|
||||
|
|
|
@ -13,11 +13,11 @@ uses
|
|||
U_ZDYHelp in '..\..\..\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp},
|
||||
U_BpSmRk in 'U_BpSmRk.pas' {frmBpSmRk},
|
||||
U_BpJylist in 'U_BpJylist.pas' {frmBpJylist},
|
||||
U_BpRk in 'U_BpRk.pas' {frmbpRk},
|
||||
U_CPRk in 'U_CPRk.pas' {frmCPRk},
|
||||
U_ProductOrderNewList in 'U_ProductOrderNewList.pas' {frmProductOrderNewList},
|
||||
U_BpCk in 'U_BpCk.pas' {frmbpCk},
|
||||
U_CpCk in 'U_CpCk.pas' {frmCpCk},
|
||||
U_BpSmCk in 'U_BpSmCk.pas' {frmBpSmCk},
|
||||
U_BpRklist in 'U_BpRklist.pas' {frmBpRklist},
|
||||
U_CPRklist in 'U_CPRklist.pas' {frmCPRklist},
|
||||
U_ZdyAttachment in 'U_ZdyAttachment.pas' {frmZdyAttachment},
|
||||
U_ZDYHelpSel in '..\..\..\ThreeFun\Form\U_ZDYHelpSel.pas' {frmZDYHelpSel},
|
||||
U_Fun in '..\..\..\ThreeFun\Fun\U_Fun.pas',
|
||||
|
@ -34,7 +34,6 @@ uses
|
|||
U_CPKWListSel in 'U_CPKWListSel.pas' {frmCPKWListSel},
|
||||
U_ZdyYS_Sel in 'U_ZdyYS_Sel.pas' {frmZdyYS_Sel};
|
||||
|
||||
|
||||
// U_SelfForm in '..\..\SelfForm\U_SelfForm.pas',
|
||||
// U_SelExportField in '..\..\SelfForm\U_SelExportField.pas' {frmSelExportField},
|
||||
// U_SelPrintField in '..\..\SelfForm\U_SelPrintField.pas' {frmSelPrintField},
|
||||
|
|
892
成品仓库/U_CPRk.dfm
Normal file
892
成品仓库/U_CPRk.dfm
Normal file
|
@ -0,0 +1,892 @@
|
|||
object frmCPRk: TfrmCPRk
|
||||
Left = 343
|
||||
Top = 489
|
||||
Width = 1381
|
||||
Height = 660
|
||||
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
|
||||
WindowState = wsMaximized
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1365
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
EdgeInner = esNone
|
||||
EdgeOuter = esNone
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = CPCK_DataLink.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
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 Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 1365
|
||||
Height = 56
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 36
|
||||
Top = 20
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20837#24211#26085#26399
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 540
|
||||
Top = 20
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20837#24211#31867#22411
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 384
|
||||
Top = 20
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #20179#24211
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 216
|
||||
Top = 20
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20837#24211#21333#21495
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 724
|
||||
Top = 20
|
||||
Width = 66
|
||||
Height = 12
|
||||
Caption = #21152#24037#21378'/'#23458#25143
|
||||
end
|
||||
object Label17: TLabel
|
||||
Left = 1096
|
||||
Top = 22
|
||||
Width = 60
|
||||
Height = 14
|
||||
Caption = #27599#21305#25968#37327
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label14: TLabel
|
||||
Left = 32
|
||||
Top = 84
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #25171' '#21253' '#36153
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object CRTime: TDateTimePicker
|
||||
Left = 88
|
||||
Top = 16
|
||||
Width = 100
|
||||
Height = 20
|
||||
Date = 41509.970132187500000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 41509.970132187500000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object CRType: TComboBox
|
||||
Left = 592
|
||||
Top = 16
|
||||
Width = 100
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
ItemIndex = 0
|
||||
TabOrder = 1
|
||||
Text = #29983#20135#20837#24211
|
||||
Items.Strings = (
|
||||
#29983#20135#20837#24211)
|
||||
end
|
||||
object ckName: TComboBox
|
||||
Left = 416
|
||||
Top = 16
|
||||
Width = 100
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
ItemIndex = 0
|
||||
TabOrder = 2
|
||||
Text = #26679#21697#20179#24211
|
||||
Items.Strings = (
|
||||
#26679#21697#20179#24211)
|
||||
end
|
||||
object InoutNo: TEdit
|
||||
Left = 264
|
||||
Top = 16
|
||||
Width = 100
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
end
|
||||
object custName: TBtnEditA
|
||||
Left = 796
|
||||
Top = 16
|
||||
Width = 101
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 4
|
||||
OnBtnClick = custNameBtnClick
|
||||
end
|
||||
object QtyMX: TEdit
|
||||
Left = 1156
|
||||
Top = 18
|
||||
Width = 65
|
||||
Height = 22
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
Visible = False
|
||||
OnKeyPress = QtyMXKeyPress
|
||||
end
|
||||
object PackFee: TcxCurrencyEdit
|
||||
Left = 84
|
||||
Top = 80
|
||||
Properties.DisplayFormat = '0.##'
|
||||
TabOrder = 6
|
||||
Width = 100
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
Left = 927
|
||||
Top = 19
|
||||
Width = 61
|
||||
Height = 17
|
||||
Caption = #35009#21098
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 7
|
||||
end
|
||||
object CheckBox2: TCheckBox
|
||||
Left = 1008
|
||||
Top = 17
|
||||
Width = 61
|
||||
Height = 21
|
||||
Caption = #32541#32427
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 8
|
||||
end
|
||||
end
|
||||
object ToolBar2: TToolBar
|
||||
Left = 0
|
||||
Top = 85
|
||||
Width = 1365
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
EdgeInner = esNone
|
||||
EdgeOuter = esNone
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = CPCK_DataLink.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
object ToolButton5: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = #36873#25321#35746#21333
|
||||
ImageIndex = 108
|
||||
OnClick = ToolButton5Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 83
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 103
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 146
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 107
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 114
|
||||
Width = 1365
|
||||
Height = 267
|
||||
Align = alClient
|
||||
Caption = 'Panel2'
|
||||
TabOrder = 3
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 1154
|
||||
Height = 265
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OnCellClick = Tv1CellClick
|
||||
OnFocusedRecordChanged = Tv1FocusedRecordChanged
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = 'C_Code'
|
||||
Column = v1P_CodeName
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Qty
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Money
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
Styles.Header = CPCK_DataLink.Default
|
||||
object v1OrderNo: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.OnButtonClick = v1Column5PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 90
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #21152#24037#21333#21495
|
||||
DataBinding.FieldName = 'fromMainID'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Properties.OnButtonClick = v1Column2PropertiesButtonClick
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
VisibleForCustomization = False
|
||||
Width = 90
|
||||
end
|
||||
object v1MJXH: TcxGridDBColumn
|
||||
Caption = #21367#21495
|
||||
DataBinding.FieldName = 'MJXH'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 50
|
||||
end
|
||||
object v1MJId: TcxGridDBColumn
|
||||
Caption = #21367#26465#30721
|
||||
DataBinding.FieldName = 'MJId'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 80
|
||||
end
|
||||
object v1P_Code: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'P_Code'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.OnButtonClick = v1P_CodePropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 79
|
||||
end
|
||||
object v1P_CodeName: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'P_CodeName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.OnButtonClick = v1P_CodePropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 90
|
||||
end
|
||||
object v1PRTSpec: TcxGridDBColumn
|
||||
Caption = #27454#21495
|
||||
DataBinding.FieldName = 'P_SPEC'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 90
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'P_Color'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #39068#33394#33521#25991
|
||||
DataBinding.FieldName = 'P_Ecolor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #25209#27425
|
||||
DataBinding.FieldName = 'batchNo'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
VisibleForCustomization = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #23610#23544'/'#23610#30721
|
||||
DataBinding.FieldName = 'defstr1'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.OnButtonClick = v1Column3PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 73
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #24037#21345#21495
|
||||
DataBinding.FieldName = 'defstr2'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
VisibleForCustomization = False
|
||||
Width = 60
|
||||
end
|
||||
object v1Qty: TcxGridDBColumn
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'qty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Styles.Content = CPCK_DataLink.FontBlue
|
||||
Styles.Footer = CPCK_DataLink.FontBlue
|
||||
Styles.Header = CPCK_DataLink.FontBlue
|
||||
Width = 86
|
||||
end
|
||||
object v1Price: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'Price'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = v1PricePropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 43
|
||||
end
|
||||
object v1Money: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'Money'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Styles.Content = CPCK_DataLink.cxStyle_fontclFuchsia
|
||||
Styles.Footer = CPCK_DataLink.cxStyle_fontclFuchsia
|
||||
Styles.Header = CPCK_DataLink.cxStyle_fontclFuchsia
|
||||
Width = 52
|
||||
end
|
||||
object v1Note: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 94
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #20179#24211#32534#21495
|
||||
DataBinding.FieldName = 'DRCKNO'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.OnButtonClick = Tv1Column3PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #20179#24211#21517#31216
|
||||
DataBinding.FieldName = 'DRCKName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.OnButtonClick = Tv1Column3PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object v1CPType: TcxGridDBColumn
|
||||
Caption = #31561#32423
|
||||
DataBinding.FieldName = 'CPType'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.DropDownListStyle = lsEditFixedList
|
||||
Properties.Items.Strings = (
|
||||
#27491#21697
|
||||
#27425#21697)
|
||||
Properties.ReadOnly = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 63
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 1155
|
||||
Top = 1
|
||||
Width = 209
|
||||
Height = 265
|
||||
Align = alRight
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OnCellDblClick = Tv2CellDblClick
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = 'C_Code'
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column2
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
Styles.Header = CPCK_DataLink.Default
|
||||
object v2Column2: TcxGridDBColumn
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 102
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
end
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 0
|
||||
Top = 410
|
||||
Width = 1365
|
||||
Height = 211
|
||||
Align = alBottom
|
||||
TabOrder = 4
|
||||
Visible = False
|
||||
object TV3: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = 'C_Code'
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column2
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column10
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column12
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column13
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV3Column1
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnSorting = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
Styles.Header = CPCK_DataLink.Default
|
||||
object TV2Column1: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'P_Color'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.OnButtonClick = TV2Column1PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV3Column4: TcxGridDBColumn
|
||||
Caption = 'CXXXS'
|
||||
DataBinding.FieldName = 'Size15'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object TV2Column2: TcxGridDBColumn
|
||||
Caption = 'CXXS'
|
||||
DataBinding.FieldName = 'Size1'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV2Column2PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column3: TcxGridDBColumn
|
||||
Caption = 'CXS'
|
||||
DataBinding.FieldName = 'Size2'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV2Column2PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column4: TcxGridDBColumn
|
||||
Caption = 'CS'
|
||||
DataBinding.FieldName = 'Size3'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV2Column2PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column5: TcxGridDBColumn
|
||||
Caption = 'CM'
|
||||
DataBinding.FieldName = 'Size4'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV2Column2PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column6: TcxGridDBColumn
|
||||
Caption = 'CL'
|
||||
DataBinding.FieldName = 'Size5'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV2Column2PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column7: TcxGridDBColumn
|
||||
Caption = 'CXL'
|
||||
DataBinding.FieldName = 'Size6'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV2Column2PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV3Column2: TcxGridDBColumn
|
||||
Caption = 'CXXL'
|
||||
DataBinding.FieldName = 'Size13'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV2Column2PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column8: TcxGridDBColumn
|
||||
Caption = 'AXS'
|
||||
DataBinding.FieldName = 'Size7'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV2Column2PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column9: TcxGridDBColumn
|
||||
Caption = 'AS'
|
||||
DataBinding.FieldName = 'Size8'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV2Column2PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column10: TcxGridDBColumn
|
||||
Caption = 'AM'
|
||||
DataBinding.FieldName = 'Size9'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV2Column2PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column11: TcxGridDBColumn
|
||||
Caption = 'AL'
|
||||
DataBinding.FieldName = 'Size10'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV2Column2PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column12: TcxGridDBColumn
|
||||
Caption = 'AXL'
|
||||
DataBinding.FieldName = 'Size11'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV2Column2PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column13: TcxGridDBColumn
|
||||
Caption = 'AXXL'
|
||||
DataBinding.FieldName = 'Size12'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV2Column2PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV3Column3: TcxGridDBColumn
|
||||
Caption = 'AXXXL'
|
||||
DataBinding.FieldName = 'Size14'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = TV2Column2PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object TV3Column1: TcxGridDBColumn
|
||||
Caption = #21512#35745
|
||||
DataBinding.FieldName = 'ZQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 70
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = TV3
|
||||
end
|
||||
end
|
||||
object ToolBar3: TToolBar
|
||||
Left = 0
|
||||
Top = 381
|
||||
Width = 1365
|
||||
Height = 29
|
||||
Align = alBottom
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
EdgeInner = esNone
|
||||
EdgeOuter = esNone
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = CPCK_DataLink.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 5
|
||||
Visible = False
|
||||
object ToolButton3: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 103
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 107
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = CPCK_DataLink.ADOLink
|
||||
Parameters = <>
|
||||
Left = 292
|
||||
end
|
||||
object ADOQueryTmp: TADOQuery
|
||||
Connection = CPCK_DataLink.ADOLink
|
||||
Parameters = <>
|
||||
Left = 344
|
||||
Top = 4
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 400
|
||||
Top = 1
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 464
|
||||
Top = 1
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 532
|
||||
Top = 65
|
||||
end
|
||||
object ADO_Sub: TADOQuery
|
||||
Connection = CPCK_DataLink.ADOLink
|
||||
Parameters = <>
|
||||
Left = 964
|
||||
Top = 5
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = CDS_Sub
|
||||
Left = 872
|
||||
Top = 425
|
||||
end
|
||||
object CDS_Sub: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 832
|
||||
Top = 429
|
||||
end
|
||||
end
|
1628
成品仓库/U_CPRk.pas
Normal file
1628
成品仓库/U_CPRk.pas
Normal file
File diff suppressed because it is too large
Load Diff
873
成品仓库/U_CPRklist.dfm
Normal file
873
成品仓库/U_CPRklist.dfm
Normal file
|
@ -0,0 +1,873 @@
|
|||
object frmCPRklist: TfrmCPRklist
|
||||
Left = 394
|
||||
Top = 212
|
||||
Width = 1265
|
||||
Height = 518
|
||||
Caption = #25104#21697#20837#24211
|
||||
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 = 1249
|
||||
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 = CPCK_DataLink.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#35810
|
||||
ImageIndex = 2
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 59
|
||||
Visible = False
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25104#21697#20837#24211
|
||||
ImageIndex = 3
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object TBAddSM: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25195#25551#20837#24211
|
||||
ImageIndex = 3
|
||||
Visible = False
|
||||
OnClick = TBAddSMClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 300
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 54
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 363
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20316#24223
|
||||
ImageIndex = 17
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object TBCdel: TToolButton
|
||||
Left = 426
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 107
|
||||
OnClick = TBCdelClick
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 489
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 75
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBPrint: TToolButton
|
||||
Left = 552
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
ImageIndex = 12
|
||||
OnClick = TBPrintClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 615
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 55
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1249
|
||||
Height = 61
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 35
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20837#24211#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 = 76
|
||||
Top = 36
|
||||
Width = 13
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 624
|
||||
Top = 16
|
||||
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 Label5: TLabel
|
||||
Left = 264
|
||||
Top = 16
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20837#24211#31867#22411
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 288
|
||||
Top = 100
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #20179#24211
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 264
|
||||
Top = 40
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20837#24211#21333#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 440
|
||||
Top = 16
|
||||
Width = 72
|
||||
Height = 12
|
||||
Caption = #21152#24037#21378'/'#23458#25143
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 440
|
||||
Top = 40
|
||||
Width = 53
|
||||
Height = 12
|
||||
Caption = #35746' '#21333' '#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 620
|
||||
Top = 40
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 88
|
||||
Top = 11
|
||||
Width = 85
|
||||
Height = 20
|
||||
Date = 40675.464742650460000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464742650460000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 88
|
||||
Top = 35
|
||||
Width = 86
|
||||
Height = 20
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object P_CodeName: TEdit
|
||||
Tag = 2
|
||||
Left = 680
|
||||
Top = 12
|
||||
Width = 100
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = P_CodeNameChange
|
||||
end
|
||||
object CRType: TComboBox
|
||||
Tag = 2
|
||||
Left = 320
|
||||
Top = 12
|
||||
Width = 100
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
ItemIndex = 0
|
||||
TabOrder = 3
|
||||
OnChange = P_CodeNameChange
|
||||
Items.Strings = (
|
||||
''
|
||||
#29983#20135#20837#24211)
|
||||
end
|
||||
object ckName: TComboBox
|
||||
Left = 320
|
||||
Top = 96
|
||||
Width = 100
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
ItemIndex = 0
|
||||
TabOrder = 4
|
||||
Text = #26679#21697#20179#24211
|
||||
Items.Strings = (
|
||||
#26679#21697#20179#24211)
|
||||
end
|
||||
object inoutNo: TEdit
|
||||
Tag = 2
|
||||
Left = 320
|
||||
Top = 36
|
||||
Width = 100
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnChange = P_CodeNameChange
|
||||
end
|
||||
object custName: TEdit
|
||||
Tag = 2
|
||||
Left = 516
|
||||
Top = 12
|
||||
Width = 100
|
||||
Height = 20
|
||||
TabOrder = 6
|
||||
OnChange = P_CodeNameChange
|
||||
end
|
||||
object orderNo: TEdit
|
||||
Tag = 2
|
||||
Left = 516
|
||||
Top = 36
|
||||
Width = 100
|
||||
Height = 20
|
||||
TabOrder = 7
|
||||
OnChange = P_CodeNameChange
|
||||
end
|
||||
object P_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 680
|
||||
Top = 36
|
||||
Width = 100
|
||||
Height = 20
|
||||
TabOrder = 8
|
||||
OnChange = P_CodeNameChange
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 113
|
||||
Width = 1249
|
||||
Height = 155
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OnFocusedRecordChanged = Tv1FocusedRecordChanged
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = 'C_Code'
|
||||
Column = v1P_CodeName
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Qty
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1money
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
Styles.Header = CPCK_DataLink.Default
|
||||
object v1CRNO: TcxGridDBColumn
|
||||
Caption = #20837#24211#32534#21495
|
||||
DataBinding.FieldName = 'CRNO'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object v1CRID: TcxGridDBColumn
|
||||
Caption = #24207#27425#21495
|
||||
DataBinding.FieldName = 'CRID'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object v1INoutNo: TcxGridDBColumn
|
||||
Caption = #20837#24211#21333#21495
|
||||
DataBinding.FieldName = 'INoutNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.CellMerging = True
|
||||
Width = 79
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'orderNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 94
|
||||
end
|
||||
object v1custName: TcxGridDBColumn
|
||||
Caption = #21152#24037#21378'/'#23458#25143
|
||||
DataBinding.FieldName = 'custName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 89
|
||||
end
|
||||
object v1CRTime: TcxGridDBColumn
|
||||
Caption = #20837#24211#26085#26399
|
||||
DataBinding.FieldName = 'CRTime'
|
||||
Width = 60
|
||||
end
|
||||
object v1CRType: TcxGridDBColumn
|
||||
Caption = #20837#24211#31867#22411
|
||||
DataBinding.FieldName = 'CRType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
end
|
||||
object v1MJID: TcxGridDBColumn
|
||||
Caption = #21367#26465#30721
|
||||
DataBinding.FieldName = 'MJID'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object v1MJXH: TcxGridDBColumn
|
||||
Caption = #21367#21495
|
||||
DataBinding.FieldName = 'MJXH'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object v1P_Code: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'P_Code'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #25209#27425
|
||||
DataBinding.FieldName = 'batchNo'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object v1P_CodeName: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'P_CodeName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 90
|
||||
end
|
||||
object v1P_SPEC: TcxGridDBColumn
|
||||
Caption = #27454#21495
|
||||
DataBinding.FieldName = 'P_SPEC'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 90
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'P_color'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #39068#33394#33521#25991
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object v1Qty: TcxGridDBColumn
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Content = CPCK_DataLink.FontBlue
|
||||
Styles.Footer = CPCK_DataLink.FontBlue
|
||||
Styles.Header = CPCK_DataLink.FontBlue
|
||||
Width = 50
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #23610#23544'/'#23610#30721
|
||||
DataBinding.FieldName = 'defstr1'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 71
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #20179#24211#32534#21495
|
||||
DataBinding.FieldName = 'DRCKNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #20179#24211#21517#31216
|
||||
DataBinding.FieldName = 'DRCKName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #24037#21345#21495
|
||||
DataBinding.FieldName = 'defstr2'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object v1CPType: TcxGridDBColumn
|
||||
Caption = #31561#32423
|
||||
DataBinding.FieldName = 'CPType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object v1Price: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'Price'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object v1money: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'money'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Content = CPCK_DataLink.cxStyle_fontclFuchsia
|
||||
Styles.Footer = CPCK_DataLink.cxStyle_fontclFuchsia
|
||||
Styles.Header = CPCK_DataLink.cxStyle_fontclFuchsia
|
||||
Width = 60
|
||||
end
|
||||
object v1Note: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 90
|
||||
end
|
||||
object v1Filler: TcxGridDBColumn
|
||||
Caption = #25805#20316#21592
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object v1FillTime: TcxGridDBColumn
|
||||
Caption = #25805#20316#26102#38388
|
||||
DataBinding.FieldName = 'FillTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 75
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 93
|
||||
Width = 1249
|
||||
Height = 20
|
||||
Align = alTop
|
||||
TabOrder = 3
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 9
|
||||
Properties.TabIndex = 0
|
||||
Properties.Tabs.Strings = (
|
||||
#26410#20316#24223
|
||||
#24050#20316#24223
|
||||
#20840#37096)
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectRight = 0
|
||||
ClientRectTop = 0
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 268
|
||||
Width = 1249
|
||||
Height = 211
|
||||
Align = alBottom
|
||||
TabOrder = 4
|
||||
object TV2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = 'C_Code'
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column14
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column2
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column10
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column12
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = TV2Column13
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsCustomize.ColumnSorting = False
|
||||
OptionsData.Editing = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
Styles.Header = CPCK_DataLink.Default
|
||||
object TV2Column1: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'P_Color'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column14: TcxGridDBColumn
|
||||
Caption = #21512#35745
|
||||
DataBinding.FieldName = 'ZQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column17: TcxGridDBColumn
|
||||
Caption = 'CXXXS'
|
||||
DataBinding.FieldName = 'Size15'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object TV2Column2: TcxGridDBColumn
|
||||
Caption = 'CXXS'
|
||||
DataBinding.FieldName = 'Size1'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column3: TcxGridDBColumn
|
||||
Caption = 'CXS'
|
||||
DataBinding.FieldName = 'Size2'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column4: TcxGridDBColumn
|
||||
Caption = 'CS'
|
||||
DataBinding.FieldName = 'Size3'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column5: TcxGridDBColumn
|
||||
Caption = 'CM'
|
||||
DataBinding.FieldName = 'Size4'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column6: TcxGridDBColumn
|
||||
Caption = 'CL'
|
||||
DataBinding.FieldName = 'Size5'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column7: TcxGridDBColumn
|
||||
Caption = 'CXL'
|
||||
DataBinding.FieldName = 'Size6'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column15: TcxGridDBColumn
|
||||
Caption = 'CXXL'
|
||||
DataBinding.FieldName = 'Size13'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column8: TcxGridDBColumn
|
||||
Caption = 'AXS'
|
||||
DataBinding.FieldName = 'Size7'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column9: TcxGridDBColumn
|
||||
Caption = 'AS'
|
||||
DataBinding.FieldName = 'Size8'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column10: TcxGridDBColumn
|
||||
Caption = 'AM'
|
||||
DataBinding.FieldName = 'Size9'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column11: TcxGridDBColumn
|
||||
Caption = 'AL'
|
||||
DataBinding.FieldName = 'Size10'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column12: TcxGridDBColumn
|
||||
Caption = 'AXL'
|
||||
DataBinding.FieldName = 'Size11'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column13: TcxGridDBColumn
|
||||
Caption = 'AXXL'
|
||||
DataBinding.FieldName = 'Size12'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object TV2Column16: TcxGridDBColumn
|
||||
Caption = 'AXXXL'
|
||||
DataBinding.FieldName = 'Size14'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = TV2
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = CPCK_DataLink.ADOLink
|
||||
Parameters = <>
|
||||
Left = 680
|
||||
Top = 8
|
||||
end
|
||||
object ADOQueryTmp: TADOQuery
|
||||
Connection = CPCK_DataLink.ADOLink
|
||||
Parameters = <>
|
||||
Left = 796
|
||||
Top = 12
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 652
|
||||
Top = 1
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 716
|
||||
Top = 1
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 860
|
||||
Top = 65528
|
||||
end
|
||||
object AdoPrint: TADOQuery
|
||||
Connection = CPCK_DataLink.ADOLink
|
||||
Parameters = <>
|
||||
Left = 908
|
||||
Top = 76
|
||||
end
|
||||
object AdoPrint1: TADOQuery
|
||||
Connection = CPCK_DataLink.ADOLink
|
||||
Parameters = <>
|
||||
Left = 1012
|
||||
Top = 48
|
||||
end
|
||||
object RMDB_MD: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = AdoPrint1
|
||||
Left = 876
|
||||
Top = 64
|
||||
end
|
||||
object RMDB_Main: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = AdoPrint
|
||||
Left = 952
|
||||
Top = 56
|
||||
end
|
||||
object RMGridReport1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbSaveToXLS, 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
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 896
|
||||
Top = 8
|
||||
ReportData = {}
|
||||
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 = 956
|
||||
end
|
||||
object CDS_Sub: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 904
|
||||
Top = 353
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = CDS_Sub
|
||||
Left = 840
|
||||
Top = 353
|
||||
end
|
||||
object ADOQuerySub: TADOQuery
|
||||
Connection = CPCK_DataLink.ADOLink
|
||||
Parameters = <>
|
||||
Left = 760
|
||||
Top = 380
|
||||
end
|
||||
end
|
564
成品仓库/U_CPRklist.pas
Normal file
564
成品仓库/U_CPRklist.pas
Normal file
|
@ -0,0 +1,564 @@
|
|||
unit U_CPRklist;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ComCtrls, ToolWin, StdCtrls, ExtCtrls, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData,
|
||||
cxButtonEdit, cxDropDownEdit, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGrid, DBClient, ADODB, cxGridCustomPopupMenu, cxGridPopupMenu, RM_Common,
|
||||
RM_Class, RM_e_Xls, RM_GridReport, RM_System, RM_Dataset, cxPC, 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
|
||||
TfrmCPRklist = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBAdd: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBPrint: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1P_CodeName: TcxGridDBColumn;
|
||||
v1P_SPEC: TcxGridDBColumn;
|
||||
v1Qty: TcxGridDBColumn;
|
||||
v1Note: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1CRType: TcxGridDBColumn;
|
||||
v1CRTime: TcxGridDBColumn;
|
||||
v1CRNO: TcxGridDBColumn;
|
||||
v1CRID: TcxGridDBColumn;
|
||||
v1Filler: TcxGridDBColumn;
|
||||
v1FillTime: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
P_CodeName: TEdit;
|
||||
CRType: TComboBox;
|
||||
Label5: TLabel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryTmp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
CDS_Main: TClientDataSet;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
v1MJID: TcxGridDBColumn;
|
||||
v1MJXH: TcxGridDBColumn;
|
||||
v1CPType: TcxGridDBColumn;
|
||||
ckName: TComboBox;
|
||||
Label6: TLabel;
|
||||
v1P_Code: TcxGridDBColumn;
|
||||
TBAddSM: TToolButton;
|
||||
v1INoutNo: TcxGridDBColumn;
|
||||
Label7: TLabel;
|
||||
inoutNo: TEdit;
|
||||
v1custName: TcxGridDBColumn;
|
||||
v1Price: TcxGridDBColumn;
|
||||
v1money: TcxGridDBColumn;
|
||||
custName: TEdit;
|
||||
Label8: TLabel;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
AdoPrint: TADOQuery;
|
||||
AdoPrint1: TADOQuery;
|
||||
RMDB_MD: TRMDBDataSet;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
RMGridReport1: TRMGridReport;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
cxTabControl1: TcxTabControl;
|
||||
TBCdel: TToolButton;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
orderNo: TEdit;
|
||||
Label9: TLabel;
|
||||
P_Code: TEdit;
|
||||
Label11: TLabel;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
cxGrid2: TcxGrid;
|
||||
TV2: TcxGridDBTableView;
|
||||
TV2Column1: TcxGridDBColumn;
|
||||
TV2Column14: TcxGridDBColumn;
|
||||
TV2Column2: TcxGridDBColumn;
|
||||
TV2Column3: TcxGridDBColumn;
|
||||
TV2Column4: TcxGridDBColumn;
|
||||
TV2Column5: TcxGridDBColumn;
|
||||
TV2Column6: TcxGridDBColumn;
|
||||
TV2Column7: TcxGridDBColumn;
|
||||
TV2Column8: TcxGridDBColumn;
|
||||
TV2Column9: TcxGridDBColumn;
|
||||
TV2Column10: TcxGridDBColumn;
|
||||
TV2Column11: TcxGridDBColumn;
|
||||
TV2Column12: TcxGridDBColumn;
|
||||
TV2Column13: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
CDS_Sub: TClientDataSet;
|
||||
DataSource2: TDataSource;
|
||||
ADOQuerySub: TADOQuery;
|
||||
TV2Column15: TcxGridDBColumn;
|
||||
TV2Column16: TcxGridDBColumn;
|
||||
TV2Column17: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure P_CodeNameChange(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBPrintClick(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBAddSMClick(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure TBCdelClick(Sender: TObject);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure InitSub();
|
||||
procedure SetComboBox();
|
||||
procedure SetStatus();
|
||||
{ Private declarations }
|
||||
public
|
||||
fCKName: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmCPRklist: TfrmCPRklist;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun10, U_ZDYHelp, U_BpRk, U_BpSmRk, U_CPRk;
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmCPRklist.SetStatus();
|
||||
begin
|
||||
TBedit.Visible := false;
|
||||
Tbdel.Visible := false;
|
||||
tbcdel.Visible := false;
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
TBedit.Visible := true;
|
||||
Tbdel.Visible := true;
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
tbcdel.Visible := true;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.SetComboBox();
|
||||
begin
|
||||
ckName.Items.Clear;
|
||||
with adoQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_ZDY where Type=''CPCK'' ');
|
||||
if trim(fCKName) <> '' then
|
||||
sql.Add('and zdyName=' + quotedstr(trim(fCKName)));
|
||||
open;
|
||||
while not eof do
|
||||
begin
|
||||
ckName.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||
next;
|
||||
end;
|
||||
end;
|
||||
if ckName.Items.Count > 0 then
|
||||
ckName.ItemIndex := 0;
|
||||
|
||||
CRType.Items.Clear;
|
||||
CRType.Items.Add('');
|
||||
with adoQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_ZDY where Type=''CPRKTYPE''');
|
||||
if trim(fCKName) <> '' then
|
||||
sql.Add('and note=' + quotedstr(trim(fCKName)));
|
||||
open;
|
||||
while not eof do
|
||||
begin
|
||||
CRType.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||
next;
|
||||
end;
|
||||
end;
|
||||
if CRType.Items.Count > 0 then
|
||||
CRType.ItemIndex := 0;
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.InitGrid();
|
||||
begin
|
||||
try
|
||||
with adoqueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' exec P_Get_CP_RK ''' + formatdateTime('yyyy-MM-dd', begdate.Date) + ''',''' + formatdateTime('yyyy-MM-dd', enddate.Date + 1) + ''',''' + inttostr(cxTabControl1.TabIndex) + ''' ');
|
||||
|
||||
// sql.Add('select A.*,');
|
||||
// sql.Add('orderNo=(select Top 1 orderNo from JYOrder_Main X where X.MainID=A.MainID )');
|
||||
//
|
||||
// sql.Add('from CP_InOut A');
|
||||
// sql.Add('where CRTime>=''' + formatdateTime('yyyy-MM-dd', begdate.Date) + ''' ');
|
||||
// sql.Add('and CRTime<''' + formatdateTime('yyyy-MM-dd', enddate.Date + 1) + ''' ');
|
||||
// sql.Add('and CRFlag=''入库'' ');
|
||||
// if trim(FckName) <> '' then
|
||||
// sql.Add('and ckName=' + quotedstr(trim(fckName)));
|
||||
// if cxTabControl1.TabIndex = 0 then
|
||||
// sql.Add('and valid=''Y'' ');
|
||||
// if cxTabControl1.TabIndex = 1 then
|
||||
// sql.Add('and valid=''N'' ');
|
||||
// ShowMessage(sql.Text);
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(adoqueryTmp, CDS_Main);
|
||||
SInitCDSData20(adoqueryTmp, CDS_Main);
|
||||
finally
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.InitSub();
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
with ADOQuerySub do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Get_CP_RK_MX ''' + Cds_main.fieldbyname('P_CodeName').AsString + ''' ,''' + Cds_main.fieldbyname('P_Code').AsString + ''',''' + Cds_main.fieldbyname('CRNO').AsString + ''' ');
|
||||
sql.Add(' ,''' + cds_main.fieldbyname('DRCKNO').AsString + ''' ,''' + cds_main.fieldbyname('DRCKName').AsString + ''' ');
|
||||
// ShowMessage(sql.text);
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(ADOQuerySub, CDS_Sub);
|
||||
SInitCDSData20(ADOQuerySub, CDS_Sub);
|
||||
finally
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
writeCxGrid(self.Caption + '1', Tv1, '成品仓库');
|
||||
Action := cafree;
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmCpRklist := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.TBAddClick(Sender: TObject);
|
||||
begin
|
||||
frmCpRk := TfrmCpRk.create(self);
|
||||
with frmCpRk do
|
||||
begin
|
||||
fkeyNo := '';
|
||||
fType := 0;
|
||||
fckName := self.fckName;
|
||||
if showmodal = 1 then
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
self.CDS_Main.Locate('crNo', trim(fkeyNo), []);
|
||||
end;
|
||||
free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.P_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryTmp.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryTmp, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryTmp, CDS_Main);
|
||||
SInitCDSData20(ADOQueryTmp, CDS_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.FormShow(Sender: TObject);
|
||||
begin
|
||||
readCxGrid(self.Caption + '1', Tv1, '成品仓库');
|
||||
SetComboBox();
|
||||
SetStatus();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.FormCreate(Sender: TObject);
|
||||
begin
|
||||
BegDate.Date := DServerDate - 7;
|
||||
EndDate.Date := DServerDate;
|
||||
cxGrid1.Align := alclient;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
if cds_main.IsEmpty then
|
||||
exit;
|
||||
if Trim(CDS_Main.fieldbyname('CRType').AsString) = Trim('加工入库') then
|
||||
begin
|
||||
Application.MessageBox('此单是加工入库,请在坯布出库里面修改!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select * from YF_Money_CR A');
|
||||
SQL.Add(' where A.mainid=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||
sql.Add(' and status>=''1'' ');
|
||||
Open;
|
||||
end;
|
||||
if not ADOQueryCmd.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('应付款没有撤销审核,不能修改!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
{
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from CP_InOut A');
|
||||
SQL.Add('where A.kcid='''+Trim(CDS_Main.fieldbyname('kcid').AsString)+''' ');
|
||||
sQL.Add('and A.CRFlag=''出库''');
|
||||
Open;
|
||||
end;
|
||||
if not ADOQueryCmd.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('已产生出库数据,不能修改!','提示',0);
|
||||
Exit;
|
||||
end; }
|
||||
|
||||
frmCPRk := TfrmCPRk.create(self);
|
||||
with frmCPRk do
|
||||
begin
|
||||
fkeyNo := self.cds_main.fieldbyname('CRNO').AsString;
|
||||
FCode := self.cds_main.fieldbyname('P_Code').AsString;
|
||||
FCodeName := self.cds_main.fieldbyname('P_Codename').AsString;
|
||||
FDRCKNO := self.cds_main.fieldbyname('DRCKNO').AsString;
|
||||
FDRCKName := self.cds_main.fieldbyname('DRCKName').AsString;
|
||||
fType := 1;
|
||||
fckName := self.fckName;
|
||||
if showmodal = 1 then
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
self.CDS_Main.Locate('crNo', trim(fkeyNo), []);
|
||||
end;
|
||||
free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
{ if Trim(CDS_Main.fieldbyname('Filler').AsString)<>Trim(DName) then
|
||||
begin
|
||||
Application.MessageBox('不能操作他人的数据!','提示',0);
|
||||
Exit;
|
||||
end; }
|
||||
if Trim(CDS_Main.fieldbyname('CRType').AsString) = Trim('加工入库') then
|
||||
begin
|
||||
Application.MessageBox('此单是加工入库,请在坯布出库里面作废!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select * from YF_Money_CR A');
|
||||
SQL.Add(' where A.mainid=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||
sql.Add(' and status>=''1'' ');
|
||||
Open;
|
||||
end;
|
||||
if not ADOQueryCmd.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('应付款没有撤销审核,不能作废!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if Application.MessageBox('确定要作废数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
|
||||
try
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from YF_Money_CR ');
|
||||
SQL.Add('where mainID=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||
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('delete from CP_kc ');
|
||||
SQL.Add('where CRNO=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||
SQL.Add('and ISNULL(P_Code,'''')=''' + trim(CDS_Main.fieldbyname('P_Code').AsString) + ''' ');
|
||||
SQL.Add('and ISNULL(P_CodeName,'''')=''' + trim(CDS_Main.fieldbyname('P_CodeName').AsString) + ''' ');
|
||||
SQL.Add('and ISNULL(DRCKNO,'''')=''' + trim(CDS_Main.fieldbyname('DRCKNO').AsString) + ''' ');
|
||||
SQL.Add('and ISNULL(DRCKName,'''')=''' + trim(CDS_Main.fieldbyname('DRCKName').AsString) + ''' ');
|
||||
|
||||
sql.Add('update CP_InOut SET valid=''N'' ');
|
||||
SQL.Add('where CRNO=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||
SQL.Add('and ISNULL(P_Code,'''')=''' + trim(CDS_Main.fieldbyname('P_Code').AsString) + ''' ');
|
||||
SQL.Add('and ISNULL(P_CodeName,'''')=''' + trim(CDS_Main.fieldbyname('P_CodeName').AsString) + ''' ');
|
||||
SQL.Add('and ISNULL(DRCKNO,'''')=''' + trim(CDS_Main.fieldbyname('DRCKNO').AsString) + ''' ');
|
||||
SQL.Add('and ISNULL(DRCKName,'''')=''' + trim(CDS_Main.fieldbyname('DRCKName').AsString) + ''' ');
|
||||
execsql;
|
||||
end;
|
||||
TBRafresh.Click;
|
||||
except
|
||||
Application.MessageBox('数据删除失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
initGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.TBPrintClick(Sender: TObject);
|
||||
var
|
||||
filepath: string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
exit;
|
||||
if CDS_Main.FieldByName('CRType').AsString <> '退货入库' then
|
||||
begin
|
||||
application.MessageBox('不是退货入库,不能打印码单!', '提示信息', 0);
|
||||
exit;
|
||||
end;
|
||||
|
||||
with AdoPrint do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* from CP_InOut A');
|
||||
sql.Add('where inoutNO=' + quotedstr(trim(CDS_Main.fieldbyname('inoutNO').AsString)));
|
||||
open;
|
||||
end;
|
||||
|
||||
with AdoPrint1 do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Print_cpCkMd ');
|
||||
sql.Add('@inoutNo=' + quotedstr(trim(CDS_Main.fieldbyname('inoutNO').AsString)));
|
||||
sql.Add(',@flag=' + quotedstr(trim('')));
|
||||
open;
|
||||
end;
|
||||
|
||||
try
|
||||
filepath := ExtractFilePath(Application.ExeName) + 'report\退货码单.rmf';
|
||||
if not FileExists(Pchar(filepath)) then
|
||||
begin
|
||||
application.MessageBox(pchar('文件[' + filepath + ']不存在!'), '提示信息', MB_IConError);
|
||||
exit;
|
||||
end;
|
||||
RMVariables['dtxz'] := FormatDateTime('yyyy-mm-dd', date());
|
||||
RMVariables['zdr'] := trim(DName);
|
||||
RMVariables['Filler'] := trim(CDS_Main.fieldbyname('Filler').AsString);
|
||||
RMGridReport1.LoadFromFile(filepath);
|
||||
RMGridReport1.ShowReport;
|
||||
finally
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
TcxGridToExcel(self.Caption, cxgrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.TBAddSMClick(Sender: TObject);
|
||||
begin
|
||||
frmBpSmRk := TfrmBpSmRk.create(self);
|
||||
with frmBpSmRk do
|
||||
begin
|
||||
fkeyNo := '';
|
||||
fType := 0;
|
||||
fckName := self.fckName;
|
||||
if showmodal = 1 then
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
// self.CDS_Main.Locate('crNo',trim(fkeyNo),[]) ;
|
||||
end;
|
||||
free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
SetStatus();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.TBCdelClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
exit;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from CP_InOut where CRNO=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||
SQL.Add('and ISNULL(P_Code,'''')=''' + trim(CDS_Main.fieldbyname('P_Code').AsString) + ''' ');
|
||||
SQL.Add('and ISNULL(P_CodeName,'''')=''' + trim(CDS_Main.fieldbyname('P_CodeName').AsString) + ''' ');
|
||||
SQL.Add('and ISNULL(DRCKNO,'''')=''' + trim(CDS_Main.fieldbyname('DRCKNO').AsString) + ''' ');
|
||||
SQL.Add('and ISNULL(DRCKName,'''')=''' + trim(CDS_Main.fieldbyname('DRCKName').AsString) + ''' ');
|
||||
execsql;
|
||||
end;
|
||||
TBRafresh.Click;
|
||||
except
|
||||
Application.MessageBox('数据删除失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPRklist.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
begin
|
||||
initsub();
|
||||
end;
|
||||
|
||||
end.
|
||||
|
443
成品仓库/U_ContractSelList.dfm
Normal file
443
成品仓库/U_ContractSelList.dfm
Normal file
|
@ -0,0 +1,443 @@
|
|||
object frmContractSelList: TfrmContractSelList
|
||||
Left = 319
|
||||
Top = 121
|
||||
Width = 1348
|
||||
Height = 600
|
||||
Align = alClient
|
||||
Caption = #35746#21333#21512#21516#36873#25321
|
||||
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
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1332
|
||||
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 = CPCK_DataLink.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 9
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 59
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 185
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 55
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 74
|
||||
Width = 1332
|
||||
Height = 487
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1PRTOrderQty
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = CPCK_DataLink.SHuangSe
|
||||
Styles.IncSearch = CPCK_DataLink.SHuangSe
|
||||
Styles.Selection = CPCK_DataLink.SHuangSe
|
||||
Styles.Header = CPCK_DataLink.Default
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.NullStyle = nssUnchecked
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
object v1ConNo: TcxGridDBColumn
|
||||
Caption = #21512#21516#21495
|
||||
DataBinding.FieldName = 'ConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = CPCK_DataLink.Default
|
||||
Width = 77
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #20844#21496#25260#22836
|
||||
DataBinding.FieldName = 'SYRName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 97
|
||||
end
|
||||
object v1OrdDate: TcxGridDBColumn
|
||||
Caption = #21046#21333#26085#26399
|
||||
DataBinding.FieldName = 'OrdDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = CPCK_DataLink.Default
|
||||
Width = 76
|
||||
end
|
||||
object v1CustomerNoName: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'CustomerNoName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = CPCK_DataLink.Default
|
||||
Width = 73
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = 'PO#'
|
||||
DataBinding.FieldName = 'KHConNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 71
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #27454#21495
|
||||
DataBinding.FieldName = 'styleNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 92
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'PRTColor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 71
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #39068#33394#33521#25991
|
||||
DataBinding.FieldName = 'SOrdDefStr4'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 64
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #33394#21495
|
||||
DataBinding.FieldName = 'PRTColor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #23610#23544'/'#23610#30721
|
||||
DataBinding.FieldName = 'SOrdDefStr5'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 74
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'PRTPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 85
|
||||
end
|
||||
object v1MPRTCodeName: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'PrtCodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = CPCK_DataLink.Default
|
||||
Width = 83
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #35268#26684#25104#20998
|
||||
DataBinding.FieldName = 'PRTSpec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'PRTMF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 75
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'PRTKZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 84
|
||||
end
|
||||
object v1PRTOrderQty: TcxGridDBColumn
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'PRTOrderQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = CPCK_DataLink.Default
|
||||
Width = 67
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #25968#37327#21333#20301
|
||||
DataBinding.FieldName = 'OrderUnit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 60
|
||||
end
|
||||
object v1PRTPrice: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'PRTPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = CPCK_DataLink.Default
|
||||
Width = 71
|
||||
end
|
||||
object v1PRTColor: TcxGridDBColumn
|
||||
Caption = #24065#31181
|
||||
DataBinding.FieldName = 'PriceUnit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = CPCK_DataLink.Default
|
||||
Width = 63
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #23457#26680#20154
|
||||
DataBinding.FieldName = 'Chker'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
VisibleForCustomization = False
|
||||
Width = 58
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #23457#26680#26102#38388
|
||||
DataBinding.FieldName = 'ChkTime'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
VisibleForCustomization = False
|
||||
Width = 60
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #23457#26680#29366#24577
|
||||
DataBinding.FieldName = 'ChkStatus'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
VisibleForCustomization = False
|
||||
Width = 56
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1332
|
||||
Height = 42
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 2
|
||||
object Label1: TLabel
|
||||
Left = 23
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #21046#21333#26085#26399
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 407
|
||||
Top = 15
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #23458#25143
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 265
|
||||
Top = 15
|
||||
Width = 39
|
||||
Height = 12
|
||||
Caption = #21512#21516#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 543
|
||||
Top = 15
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #31867#22411
|
||||
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 = 11
|
||||
Width = 85
|
||||
Height = 20
|
||||
Date = 40675.464742650460000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464742650460000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 163
|
||||
Top = 10
|
||||
Width = 86
|
||||
Height = 20
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object CustomerNoName: TEdit
|
||||
Tag = 2
|
||||
Left = 436
|
||||
Top = 11
|
||||
Width = 77
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object MPRTType: TComboBox
|
||||
Tag = 1
|
||||
Left = 572
|
||||
Top = 11
|
||||
Width = 88
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
TabOrder = 3
|
||||
OnChange = CustomerNoNameChange
|
||||
Items.Strings = (
|
||||
#22806#38144
|
||||
#20869#38144
|
||||
'')
|
||||
end
|
||||
object FConNo: TEdit
|
||||
Tag = 2
|
||||
Left = 308
|
||||
Top = 11
|
||||
Width = 77
|
||||
Height = 20
|
||||
TabOrder = 4
|
||||
OnChange = CustomerNoNameChange
|
||||
OnKeyPress = FConNoKeyPress
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 504
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = CPCK_DataLink.ADOLink
|
||||
Parameters = <>
|
||||
Left = 320
|
||||
Top = 176
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = CPCK_DataLink.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 344
|
||||
Top = 176
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = CPCK_DataLink.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 288
|
||||
Top = 176
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 440
|
||||
Top = 184
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 472
|
||||
Top = 184
|
||||
end
|
||||
end
|
242
成品仓库/U_ContractSelList.pas
Normal file
242
成品仓库/U_ContractSelList.pas
Normal file
|
@ -0,0 +1,242 @@
|
|||
unit U_ContractSelList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter,
|
||||
RM_Dataset, RM_System, RM_Common, RM_Class, RM_GridReport, RM_e_Xls,
|
||||
Menus, cxPC, 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
|
||||
TfrmContractSelList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
v1OrdDate: TcxGridDBColumn;
|
||||
v1ConNo: TcxGridDBColumn;
|
||||
v1PRTColor: TcxGridDBColumn;
|
||||
Order_Main: TClientDataSet;
|
||||
v1CustomerNoName: TcxGridDBColumn;
|
||||
v1MPRTCodeName: TcxGridDBColumn;
|
||||
v1PRTOrderQty: TcxGridDBColumn;
|
||||
v1PRTPrice: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label4: TLabel;
|
||||
Label9: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CustomerNoName: TEdit;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
ToolButton2: TToolButton;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
MPRTType: TComboBox;
|
||||
Label2: TLabel;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
FConNo: TEdit;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CustomerNoNameChange(Sender: TObject);
|
||||
procedure FConNoKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
private
|
||||
DQdate:TDateTime;
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
{ Private declarations }
|
||||
public
|
||||
FFInt,FCloth:Integer;
|
||||
FLXStr,KHCode:string;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmContractSelList: TfrmContractSelList;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun10; //U_ConInPut,
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmContractSelList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmContractSelList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmContractSelList.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmContractSelList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cxgrid1.Align:=alClient;
|
||||
DQdate:=SGetServerDate(ADOQueryTemp);
|
||||
end;
|
||||
|
||||
procedure TfrmContractSelList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('订单合同列表选择X',Tv1,'生产指示单管理');
|
||||
end;
|
||||
|
||||
procedure TfrmContractSelList.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.conno as FConNo,A.*,B.* ');
|
||||
sql.Add(' from JYOrderCon_Main A ');
|
||||
sql.Add(' inner join JYOrderCon_Sub B on A.MainId=B.MainId');
|
||||
SQL.Add(' where A.OrdDate>='''+FormatDateTime('yyyy-MM-dd',BegDate.DateTime)+'''');
|
||||
SQL.Add(' and A.OrdDate<'''+FormatDateTime('yyyy-MM-dd',enddate.DateTime+1)+'''');
|
||||
if Trim(KHCode)<>'' then
|
||||
begin
|
||||
sql.Add(' and isnull(A.CustomerNoName,'''')='''+Trim(KHCode)+'''');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
finally;
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmContractSelList.InitForm();
|
||||
begin
|
||||
ReadCxGrid('订单合同列表选择X',Tv1,'生产指示单管理');
|
||||
BegDate.DateTime:=SGetServerDate10(ADOQueryTemp)-30;
|
||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmContractSelList.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 TfrmContractSelList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmContractSelList.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
end;
|
||||
|
||||
procedure TfrmContractSelList.CustomerNoNameChange(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 TfrmContractSelList.FConNoKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Length(FConNo.Text)<3 then Exit;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.Add(' from JYOrderCon_Main A ');
|
||||
sql.Add(' inner join JYOrderCon_Sub B on A.MainId=B.MainId');
|
||||
SQL.Add('where 1=1');
|
||||
sql.Add(' and A.ConNo like '''+'%'+Trim(FConNo.Text)+'%'+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmContractSelList.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmContractSelList.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
if Order_Main.Locate('SSel',True,[])=False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
end.
|
1185
成品仓库/U_CpCk.dfm
Normal file
1185
成品仓库/U_CpCk.dfm
Normal file
File diff suppressed because it is too large
Load Diff
2071
成品仓库/U_CpCk.pas
Normal file
2071
成品仓库/U_CpCk.pas
Normal file
File diff suppressed because it is too large
Load Diff
1172
成品仓库/U_CpCklist.dfm
Normal file
1172
成品仓库/U_CpCklist.dfm
Normal file
File diff suppressed because it is too large
Load Diff
676
成品仓库/U_CpCklist.pas
Normal file
676
成品仓库/U_CpCklist.pas
Normal file
|
@ -0,0 +1,676 @@
|
|||
unit U_CpCklist;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ComCtrls, ToolWin, StdCtrls, ExtCtrls, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData,
|
||||
cxButtonEdit, cxDropDownEdit, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGrid, DBClient, ADODB, cxGridCustomPopupMenu, cxGridPopupMenu, RM_Common,
|
||||
RM_Class, RM_e_Xls, RM_GridReport, RM_System, RM_Dataset, cxTextEdit,
|
||||
cxCheckBox, cxPC, 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
|
||||
TfrmCpCklist = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBAdd: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBPrint: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1P_CodeName: TcxGridDBColumn;
|
||||
v1P_SPEC: TcxGridDBColumn;
|
||||
v1P_MF: TcxGridDBColumn;
|
||||
v1P_KZ: TcxGridDBColumn;
|
||||
v1RollNum: TcxGridDBColumn;
|
||||
v1Qty: TcxGridDBColumn;
|
||||
v1Note: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1CRType: TcxGridDBColumn;
|
||||
v1CRTime: TcxGridDBColumn;
|
||||
v1CRNO: TcxGridDBColumn;
|
||||
v1CRID: TcxGridDBColumn;
|
||||
v1Filler: TcxGridDBColumn;
|
||||
v1FillTime: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
P_CodeName: TEdit;
|
||||
P_Color: TEdit;
|
||||
CRType: TComboBox;
|
||||
Label5: TLabel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryTmp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
CDS_Main: TClientDataSet;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
v1MJID: TcxGridDBColumn;
|
||||
v1MJXH: TcxGridDBColumn;
|
||||
v1CPTYPE: TcxGridDBColumn;
|
||||
ckName: TComboBox;
|
||||
Label6: TLabel;
|
||||
v1P_Color: TcxGridDBColumn;
|
||||
ADOPrint: TADOQuery;
|
||||
RMDB_MD: TRMDBDataSet;
|
||||
RMGridReport1: TRMGridReport;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
v1P_Code1: TcxGridDBColumn;
|
||||
v1inoutNO: TcxGridDBColumn;
|
||||
TBsmADD: TToolButton;
|
||||
inoutNo: TEdit;
|
||||
Label7: TLabel;
|
||||
v1custName: TcxGridDBColumn;
|
||||
v1TocustName: TcxGridDBColumn;
|
||||
TbPrint1: TToolButton;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
ADOPrint1: TADOQuery;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
v1Column11: 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;
|
||||
Label8: TLabel;
|
||||
custName: TEdit;
|
||||
v1validName: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
cxTabControl1: TcxTabControl;
|
||||
TBcdel: TToolButton;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
orderNo: TEdit;
|
||||
Label9: TLabel;
|
||||
P_Code: TEdit;
|
||||
defstr1: TEdit;
|
||||
Label10: TLabel;
|
||||
Label11: TLabel;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
DataSource2: TDataSource;
|
||||
CDS_Sub: TClientDataSet;
|
||||
cxGrid2: TcxGrid;
|
||||
TV2: TcxGridDBTableView;
|
||||
TV2Column1: TcxGridDBColumn;
|
||||
TV2Column14: TcxGridDBColumn;
|
||||
TV2Column2: TcxGridDBColumn;
|
||||
TV2Column3: TcxGridDBColumn;
|
||||
TV2Column4: TcxGridDBColumn;
|
||||
TV2Column5: TcxGridDBColumn;
|
||||
TV2Column6: TcxGridDBColumn;
|
||||
TV2Column7: TcxGridDBColumn;
|
||||
TV2Column8: TcxGridDBColumn;
|
||||
TV2Column9: TcxGridDBColumn;
|
||||
TV2Column10: TcxGridDBColumn;
|
||||
TV2Column11: TcxGridDBColumn;
|
||||
TV2Column12: TcxGridDBColumn;
|
||||
TV2Column13: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
ADOQuerySub: TADOQuery;
|
||||
TV2Column15: TcxGridDBColumn;
|
||||
TV2Column16: TcxGridDBColumn;
|
||||
TV2Column17: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure P_CodeNameChange(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBPrintClick(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBsmADDClick(Sender: TObject);
|
||||
procedure TbPrint1Click(Sender: TObject);
|
||||
procedure v1Column6CompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure TBcdelClick(Sender: TObject);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure InitSub();
|
||||
procedure SetComboBox();
|
||||
procedure SetStatus();
|
||||
{ Private declarations }
|
||||
public
|
||||
fCKName: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmCpCklist: TfrmCpCklist;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun10, U_ZDYHelp, U_CpCk, U_BpSmCk;
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmCpCklist.SetStatus();
|
||||
begin
|
||||
TBedit.Visible := false;
|
||||
Tbdel.Visible := false;
|
||||
tbcdel.Visible := false;
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
TBedit.Visible := true;
|
||||
Tbdel.Visible := true;
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
tbcdel.Visible := true;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.SetComboBox();
|
||||
begin
|
||||
ckName.Items.Clear;
|
||||
with adoQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_ZDY where Type=''CPCK'' ');
|
||||
if trim(fCKName) <> '' then
|
||||
sql.Add('and zdyName=' + quotedstr(trim(fCKName)));
|
||||
open;
|
||||
while not eof do
|
||||
begin
|
||||
ckName.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||
next;
|
||||
end;
|
||||
end;
|
||||
if ckName.Items.Count > 0 then
|
||||
ckName.ItemIndex := 0;
|
||||
|
||||
CRType.Items.Clear;
|
||||
CRType.Items.Add('');
|
||||
with adoQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_ZDY where Type=''CPCKTYPE''');
|
||||
if trim(fCKName) <> '' then
|
||||
sql.Add('and note=' + quotedstr(trim(fCKName)));
|
||||
open;
|
||||
while not eof do
|
||||
begin
|
||||
CRType.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||
next;
|
||||
end;
|
||||
end;
|
||||
if CRType.Items.Count > 0 then
|
||||
CRType.ItemIndex := 0;
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.InitGrid();
|
||||
begin
|
||||
try
|
||||
with adoqueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' exec P_Get_CP_CK ''' + formatdateTime('yyyy-MM-dd', begdate.Date) + ''',''' + formatdateTime('yyyy-MM-dd', enddate.Date + 1) + ''',''' + inttostr(cxTabControl1.TabIndex) + ''' ');
|
||||
// sql.Add('select A.*, ');
|
||||
// sql.Add('SMoney=PackFee+YbFee+OtherFee+(select SUM(money) from CP_InOut X where X.CRNO=A.CRNO), ');
|
||||
// sql.Add('orderNo=(select Top 1 orderNo from JYOrder_Main X where X.MainID=A.MainID ),');
|
||||
// sql.Add('validName=case when valid=''N'' then ''已作废'' else ''未作废'' end ');
|
||||
// sql.Add('from CP_InOut A');
|
||||
// sql.Add('where CRTime>=''' + formatdateTime('yyyy-MM-dd', begdate.Date) + ''' ');
|
||||
// sql.Add('and CRTime<''' + formatdateTime('yyyy-MM-dd', enddate.Date + 1) + ''' ');
|
||||
// sql.Add('and CRFlag=''出库'' ');
|
||||
// if trim(FckName) <> '' then
|
||||
// sql.Add('and ckName=' + quotedstr(trim(FckName)));
|
||||
// if cxTabControl1.TabIndex = 0 then
|
||||
// sql.Add('and valid=''Y'' ');
|
||||
// if cxTabControl1.TabIndex = 1 then
|
||||
// sql.Add('and valid=''N'' ');
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(adoqueryTmp, CDS_Main);
|
||||
SInitCDSData20(adoqueryTmp, CDS_Main);
|
||||
finally
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
writeCxGrid(self.Caption + '1', Tv1, '成品仓库');
|
||||
Action := cafree;
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmCpCklist := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.TBAddClick(Sender: TObject);
|
||||
begin
|
||||
frmCpck := TfrmCpck.create(self);
|
||||
with frmCpck do
|
||||
begin
|
||||
fkeyNo := '';
|
||||
fType := 0;
|
||||
fckName := self.fckName;
|
||||
if showmodal = 1 then
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
self.CDS_Main.Locate('crNo', trim(fkeyNo), []);
|
||||
end;
|
||||
free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.P_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryTmp.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryTmp, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryTmp, CDS_Main);
|
||||
SInitCDSData20(ADOQueryTmp, CDS_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.FormShow(Sender: TObject);
|
||||
begin
|
||||
readCxGrid(self.Caption + '1', Tv1, '成品仓库');
|
||||
SetComboBox();
|
||||
SetStatus();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.FormCreate(Sender: TObject);
|
||||
begin
|
||||
BegDate.Date := DServerDate - 7;
|
||||
EndDate.Date := DServerDate;
|
||||
cxGrid1.Align := alclient;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
if cds_main.IsEmpty then
|
||||
exit;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from YF_Money_CR A');
|
||||
SQL.Add('where A.mainid=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||
sQL.Add('and A.hxNum<>0 ');
|
||||
Open;
|
||||
end;
|
||||
if not ADOQueryCmd.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('此单已经产生核销数据,不能修改!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
|
||||
{ with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BP_InOut A');
|
||||
SQL.Add('where A.kcid='''+Trim(CDS_Main.fieldbyname('kcid').AsString)+''' ');
|
||||
sQL.Add('and A.CRFlag=''出库''');
|
||||
Open;
|
||||
end;
|
||||
if not ADOQueryCmd.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('已产生出库数据,不能修改!','提示',0);
|
||||
Exit;
|
||||
end; }
|
||||
|
||||
frmCpck := TfrmCpck.create(self);
|
||||
with frmCpck do
|
||||
begin
|
||||
fkeyNo := self.cds_main.fieldbyname('CRNO').AsString;
|
||||
FCode := self.cds_main.fieldbyname('P_Code').AsString;
|
||||
FCodeName := self.cds_main.fieldbyname('P_Codename').AsString;
|
||||
FDRCKNO := self.cds_main.fieldbyname('DRCKNO').AsString;
|
||||
FDRCKName := self.cds_main.fieldbyname('DRCKName').AsString;
|
||||
fType := 1;
|
||||
fckName := self.fckName;
|
||||
if showmodal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
free;
|
||||
end;
|
||||
TBRafresh.Click;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.TBDelClick(Sender: TObject);
|
||||
var
|
||||
YFID, CRID: string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
{ if Trim(CDS_Main.fieldbyname('Filler').AsString)<>Trim(DName) then
|
||||
begin
|
||||
Application.MessageBox('不能操作他人的数据!','提示',0);
|
||||
Exit;
|
||||
end; }
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from YF_Money_CR A');
|
||||
SQL.Add('where A.mainid=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||
sQL.Add('and A.hxNum<>0 ');
|
||||
Open;
|
||||
end;
|
||||
if not ADOQueryCmd.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('此单已经产生核销数据,不能删除!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if Application.MessageBox('确定要作废数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
|
||||
try
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('update CP_InOut SET valid=''N'' ');
|
||||
SQL.Add('where CRNO=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||
sql.Add('delete from YF_Money_CR ');
|
||||
SQL.Add('where mainID=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||
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)');
|
||||
execsql;
|
||||
end;
|
||||
TBRafresh.Click;
|
||||
except
|
||||
Application.MessageBox('数据删除失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
initGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.TBPrintClick(Sender: TObject);
|
||||
var
|
||||
filepath: string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
exit;
|
||||
|
||||
with AdoPrint do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* from CP_InOut A');
|
||||
sql.Add('where inoutNO=' + quotedstr(trim(CDS_Main.fieldbyname('inoutNO').AsString)));
|
||||
open;
|
||||
end;
|
||||
|
||||
with AdoPrint1 do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Print_cpCkMd ');
|
||||
sql.Add('@inoutNo=' + quotedstr(trim(CDS_Main.fieldbyname('inoutNO').AsString)));
|
||||
sql.Add(',@flag=' + quotedstr(trim('')));
|
||||
open;
|
||||
end;
|
||||
|
||||
try
|
||||
filepath := ExtractFilePath(Application.ExeName) + 'report\出库码单.rmf';
|
||||
if not FileExists(Pchar(filepath)) then
|
||||
begin
|
||||
application.MessageBox(pchar('文件[' + filepath + ']不存在!'), '提示信息', MB_IConError);
|
||||
exit;
|
||||
end;
|
||||
RMVariables['dtxz'] := FormatDateTime('yyyy-mm-dd', date());
|
||||
RMVariables['zdr'] := trim(DName);
|
||||
RMVariables['Filler'] := trim(CDS_Main.fieldbyname('Filler').AsString);
|
||||
RMGridReport1.LoadFromFile(filepath);
|
||||
RMGridReport1.ShowReport;
|
||||
finally
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
TcxGridToExcel(self.Caption, cxgrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.TBsmADDClick(Sender: TObject);
|
||||
begin
|
||||
frmbpsmck := Tfrmbpsmck.create(self);
|
||||
with frmbpsmck do
|
||||
begin
|
||||
fkeyNo := '';
|
||||
fType := 0;
|
||||
fckName := self.fckName;
|
||||
if showmodal = 1 then
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
// self.CDS_Main.Locate('crNo',trim(fkeyNo),[]) ;
|
||||
end;
|
||||
TBRafresh.Click;
|
||||
free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.TbPrint1Click(Sender: TObject);
|
||||
var
|
||||
filepath: string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
exit;
|
||||
|
||||
with AdoPrint do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from CP_INout A ');
|
||||
sql.Add('where A.inoutNo=' + quotedstr(trim(CDS_Main.fieldbyname('inoutNO').AsString)));
|
||||
open;
|
||||
end;
|
||||
|
||||
try
|
||||
filepath := ExtractFilePath(Application.ExeName) + 'report\发货单.rmf';
|
||||
if not FileExists(Pchar(filepath)) then
|
||||
begin
|
||||
application.MessageBox(pchar('文件[' + filepath + ']不存在!'), '提示信息', MB_IConError);
|
||||
exit;
|
||||
end;
|
||||
RMVariables['dtxz'] := FormatDateTime('yyyy-mm-dd', date());
|
||||
RMVariables['zdr'] := trim(DName);
|
||||
RMVariables['Filler'] := trim(CDS_Main.fieldbyname('Filler').AsString);
|
||||
RMGridReport1.LoadFromFile(filepath);
|
||||
RMGridReport1.ShowReport;
|
||||
finally
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.v1Column6CompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean);
|
||||
var
|
||||
colIdx0, colIdx1: integer;
|
||||
begin
|
||||
colIdx0 := tv1.GetColumnByFieldName('CRNO').Index;
|
||||
// colIdx1:= tv1.GetColumnByFieldName('colorname').Index;
|
||||
if (ARow1.Values[colIdx0] = ARow2.Values[colIdx0]) then
|
||||
AAreEqual := True
|
||||
else
|
||||
AAreEqual := False;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
YFID, CRID: string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
{ if Trim(CDS_Main.fieldbyname('Filler').AsString)<>Trim(DName) then
|
||||
begin
|
||||
Application.MessageBox('不能操作他人的数据!','提示',0);
|
||||
Exit;
|
||||
end; }
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from YF_Money_CR A');
|
||||
SQL.Add('where A.mainid=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||
sQL.Add('and A.hxNum<>0 ');
|
||||
Open;
|
||||
end;
|
||||
if not ADOQueryCmd.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('此单已经产生核销数据,不能删除!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if Application.MessageBox('确定要作废数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('update CP_InOut SET valid=''N'' ');
|
||||
SQL.Add('where CRNO=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||
sql.Add('delete from YF_Money_CR ');
|
||||
SQL.Add('where mainID=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||
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)');
|
||||
execsql;
|
||||
end;
|
||||
TBRafresh.Click;
|
||||
except
|
||||
Application.MessageBox('数据作废失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
begin
|
||||
// IF AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('validName').Index]='已作废' then
|
||||
// ACanvas.Font.Color:=clred;
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
SetStatus();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.TBcdelClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
exit;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from CP_InOut where CRNO=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||
execsql;
|
||||
end;
|
||||
TBRafresh.Click;
|
||||
except
|
||||
Application.MessageBox('数据删除失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
begin
|
||||
initsub();
|
||||
end;
|
||||
|
||||
procedure TfrmCpCklist.InitSub();
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
with ADOQuerySub do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Get_CP_CK_MX ''' + Cds_main.fieldbyname('P_CodeName').AsString + ''' ,''' + Cds_main.fieldbyname('P_Code').AsString + ''',''' + Cds_main.fieldbyname('CRNO').AsString + ''' ');
|
||||
sql.Add(' ,''' + cds_main.fieldbyname('DRCKNO').AsString + ''' ,''' + cds_main.fieldbyname('DRCKName').AsString + ''' ');
|
||||
// ShowMessage(SQL.text);
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(ADOQuerySub, CDS_Sub);
|
||||
SInitCDSData20(ADOQuerySub, CDS_Sub);
|
||||
finally
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
1383
成品仓库/U_CpkcSel.dfm
Normal file
1383
成品仓库/U_CpkcSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
669
成品仓库/U_CpkcSel.pas
Normal file
669
成品仓库/U_CpkcSel.pas
Normal file
|
@ -0,0 +1,669 @@
|
|||
unit U_CpkcSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ComCtrls, ToolWin, StdCtrls, ExtCtrls, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData,
|
||||
cxButtonEdit, cxDropDownEdit, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGrid, DBClient, ADODB, cxGridCustomPopupMenu, cxGridPopupMenu, cxCheckBox,
|
||||
IdFTP, ShellAPI, strutils, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
|
||||
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, RM_System, RM_Dataset, Menus,
|
||||
MovePanel, cxContainer, cxTextEdit, cxCurrencyEdit, 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
|
||||
TfrmCpkcSel = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBPrint: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1P_CodeName: TcxGridDBColumn;
|
||||
v1P_SPEC: TcxGridDBColumn;
|
||||
v1Qty: TcxGridDBColumn;
|
||||
v1Note: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1CRType: TcxGridDBColumn;
|
||||
v1CRTime: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
custName: TEdit;
|
||||
CRType: TComboBox;
|
||||
Label5: TLabel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryTmp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
CDS_Main: TClientDataSet;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
TOk: TToolButton;
|
||||
v1Ssel: TcxGridDBColumn;
|
||||
CheckBox1: TCheckBox;
|
||||
v1MJID: TcxGridDBColumn;
|
||||
v1MJXH: TcxGridDBColumn;
|
||||
v1CPType: TcxGridDBColumn;
|
||||
ckName: TComboBox;
|
||||
Label6: TLabel;
|
||||
v1P_Code: TcxGridDBColumn;
|
||||
Label7: TLabel;
|
||||
batchNo: TEdit;
|
||||
Label8: TLabel;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
P_CodeName: TEdit;
|
||||
Label9: TLabel;
|
||||
P_Spec: TEdit;
|
||||
Label10: TLabel;
|
||||
Label11: TLabel;
|
||||
P_Color: TEdit;
|
||||
Label12: TLabel;
|
||||
P_KZ_S: TEdit;
|
||||
orderNo: TEdit;
|
||||
Label4: TLabel;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
defstr1: TEdit;
|
||||
Label13: TLabel;
|
||||
P_Code: TEdit;
|
||||
Label14: TLabel;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
CDS_Sub: TClientDataSet;
|
||||
DataSource2: TDataSource;
|
||||
ADOQuerySub: TADOQuery;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
AdoPrint: TADOQuery;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
RMGridReport1: TRMGridReport;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
MovePanel2: TMovePanel;
|
||||
Label15: TLabel;
|
||||
DRCKName: TEdit;
|
||||
GroupBox2: TGroupBox;
|
||||
cxGrid2: TcxGrid;
|
||||
TV2: TcxGridDBTableView;
|
||||
TV2Column1: TcxGridDBColumn;
|
||||
TV2Column14: TcxGridDBColumn;
|
||||
TV2Column2: TcxGridDBColumn;
|
||||
TV2Column3: TcxGridDBColumn;
|
||||
TV2Column4: TcxGridDBColumn;
|
||||
TV2Column5: TcxGridDBColumn;
|
||||
TV2Column6: TcxGridDBColumn;
|
||||
TV2Column7: TcxGridDBColumn;
|
||||
TV2Column15: TcxGridDBColumn;
|
||||
TV2Column8: TcxGridDBColumn;
|
||||
TV2Column9: TcxGridDBColumn;
|
||||
TV2Column10: TcxGridDBColumn;
|
||||
TV2Column11: TcxGridDBColumn;
|
||||
TV2Column12: TcxGridDBColumn;
|
||||
TV2Column13: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
GroupBox1: TGroupBox;
|
||||
cxGrid3: TcxGrid;
|
||||
TV3: TcxGridDBTableView;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
ADOQueryYck: TADOQuery;
|
||||
DataSource3: TDataSource;
|
||||
CDS_Yck: TClientDataSet;
|
||||
TV3Column1: TcxGridDBColumn;
|
||||
TV3Column2: TcxGridDBColumn;
|
||||
TV3Column3: TcxGridDBColumn;
|
||||
TV3Column4: TcxGridDBColumn;
|
||||
TV3Column5: TcxGridDBColumn;
|
||||
TV3Column6: TcxGridDBColumn;
|
||||
TV3Column7: TcxGridDBColumn;
|
||||
TV3Column8: TcxGridDBColumn;
|
||||
TV3Column9: TcxGridDBColumn;
|
||||
TV3Column10: TcxGridDBColumn;
|
||||
TV3Column11: TcxGridDBColumn;
|
||||
TV3Column12: TcxGridDBColumn;
|
||||
TV3Column13: TcxGridDBColumn;
|
||||
TV3Column14: TcxGridDBColumn;
|
||||
TV3Column15: TcxGridDBColumn;
|
||||
ToolButton2: TToolButton;
|
||||
Panel9: TPanel;
|
||||
Label32: TLabel;
|
||||
Button11: TButton;
|
||||
Button12: TButton;
|
||||
Edit1: TEdit;
|
||||
ToolButton3: TToolButton;
|
||||
Panel2: TPanel;
|
||||
Label16: TLabel;
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
Edit2: TEdit;
|
||||
TV2Column16: TcxGridDBColumn;
|
||||
TV3Column16: TcxGridDBColumn;
|
||||
TV2Column17: TcxGridDBColumn;
|
||||
TV3Column17: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure custNameChange(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBPrintClick(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TOkClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure Button11Click(Sender: TObject);
|
||||
procedure Button12Click(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
|
||||
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure InitSub();
|
||||
procedure SetComboBox();
|
||||
{ Private declarations }
|
||||
public
|
||||
fType: integer;
|
||||
fCKName: string;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmCpkcSel: TfrmCpkcSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun10, U_ZDYHelp, U_BpRk;
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmCpkcSel.SetComboBox();
|
||||
begin
|
||||
ckName.Items.Clear;
|
||||
with adoQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_ZDY where Type=''CPCK'' ');
|
||||
if trim(fCKName) <> '' then
|
||||
sql.Add('and zdyName=' + quotedstr(trim(fCKName)));
|
||||
open;
|
||||
while not eof do
|
||||
begin
|
||||
ckName.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||
next;
|
||||
end;
|
||||
end;
|
||||
if ckName.Items.Count > 0 then
|
||||
ckName.ItemIndex := 0;
|
||||
|
||||
CRType.Items.Clear;
|
||||
CRType.Items.Add('');
|
||||
with adoQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_ZDY where Type=''CPRKTYPE''');
|
||||
if trim(fCKName) <> '' then
|
||||
sql.Add('and note=' + quotedstr(trim(fCKName)));
|
||||
open;
|
||||
while not eof do
|
||||
begin
|
||||
CRType.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||
next;
|
||||
end;
|
||||
end;
|
||||
if CRType.Items.Count > 0 then
|
||||
CRType.ItemIndex := 0;
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.InitGrid();
|
||||
begin
|
||||
MovePanel2.Visible := True;
|
||||
try
|
||||
with adoqueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Get_CP_KCsel');
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(adoqueryTmp, CDS_Main);
|
||||
SInitCDSData20(adoqueryTmp, CDS_Main);
|
||||
finally
|
||||
end;
|
||||
MovePanel2.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.InitSub();
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
with adoquerysub do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Get_CP_KC_MX ''' + Cds_main.fieldbyname('P_CodeName').AsString + ''' ,''' + Cds_main.fieldbyname('P_Code').AsString + ''' ');
|
||||
sql.Add(',''' + Cds_main.fieldbyname('DRCKNO').AsString + ''' ,''' + Cds_main.fieldbyname('DRCKName').AsString + '''');
|
||||
// ShowMessage(SQL.text);
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(adoquerysub, CDS_Sub);
|
||||
SInitCDSData20(adoquerysub, CDS_Sub);
|
||||
|
||||
with ADOQueryYck do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Get_CP_KC_MX_Yck ''' + Cds_main.fieldbyname('P_CodeName').AsString + ''' ,''' + Cds_main.fieldbyname('P_Code').AsString + ''' ');
|
||||
sql.Add(',''' + Cds_main.fieldbyname('DRCKNO').AsString + ''' ,''' + Cds_main.fieldbyname('DRCKName').AsString + '''');
|
||||
// ShowMessage(SQL.text);
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryYck, CDS_Yck);
|
||||
SInitCDSData20(ADOQueryYck, CDS_Yck);
|
||||
finally
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
writeCxGrid(self.Caption + tv1.Name + '3', Tv1, '成品仓库');
|
||||
if fType = 10 then
|
||||
Action := cahide
|
||||
else
|
||||
Action := cafree;
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmCpkcSel := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.custNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryTmp.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryTmp, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryTmp, CDS_Main);
|
||||
SInitCDSData20(ADOQueryTmp, CDS_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
if fType = 10 then
|
||||
begin
|
||||
TOk.Visible := true;
|
||||
end;
|
||||
v1Ssel.Visible := true;
|
||||
readCxGrid(self.Caption + tv1.Name + 'KC', Tv1, '成品仓库');
|
||||
SetComboBox();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
BegDate.Date := DServerDate - 7;
|
||||
EndDate.Date := DServerDate;
|
||||
cxGrid1.Align := alclient;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
initGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.TBPrintClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
TcxGridToExcel(self.Caption, cxgrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.TBExportClick(Sender: TObject);
|
||||
var
|
||||
filepath: string;
|
||||
sqlstr: string;
|
||||
i: Integer;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
exit;
|
||||
|
||||
if CDS_Main.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
close;
|
||||
SQL.Clear;
|
||||
sql.Add('delete CPKC_Print ');
|
||||
ExecSQL;
|
||||
end;
|
||||
Tv1.OnFocusedRecordChanged := nil;
|
||||
sqlstr := '';
|
||||
i := 0;
|
||||
MovePanel2.Visible := True;
|
||||
with CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while CDS_Main.Locate('SSel', true, []) do
|
||||
begin
|
||||
sqlstr := sqlstr + Cds_main.fieldbyname('P_CodeName').AsString + Cds_main.fieldbyname('P_Code').AsString + Cds_main.fieldbyname('DRCKNO').AsString + Cds_main.fieldbyname('DRCKName').AsString + ',';
|
||||
|
||||
// sqlstr := sqlstr + 'exec P_Get_CP_KC_copy1 ''' + Cds_main.fieldbyname('P_CodeName').AsString + ''' ,''' + Cds_main.fieldbyname('P_Code').AsString + '''';
|
||||
// sqlstr := sqlstr + ',''' + Cds_main.fieldbyname('DRCKNO').AsString + ''' ,''' + Cds_main.fieldbyname('DRCKName').AsString + ''' ';
|
||||
// i := i + 1;
|
||||
// with ADOQueryTmp do
|
||||
// begin
|
||||
// close;
|
||||
// sql.Clear;
|
||||
// sql.Add('exec P_Get_CP_KC_copy1 ''' + Cds_main.fieldbyname('P_CodeName').AsString + ''' ,''' + Cds_main.fieldbyname('P_Code').AsString + ''' ');
|
||||
// sql.Add(',''' + Cds_main.fieldbyname('DRCKNO').AsString + ''' ,''' + Cds_main.fieldbyname('DRCKName').AsString + '''');
|
||||
//// ShowMessage(SQL.text);
|
||||
// ExecSQL;
|
||||
// end;
|
||||
Delete;
|
||||
// if i = 50 then
|
||||
// begin
|
||||
// i := 0;
|
||||
// sqlstr := '';
|
||||
// end;
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
sqlstr := Copy(sqlstr, 1, Length(sqlstr) - 1);
|
||||
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_Get_CP_KC_copy3 ' + QuotedStr(sqlstr));
|
||||
// ShowMessage(SQL.Text);
|
||||
ExecSQL;
|
||||
end;
|
||||
// ShowMessage(sqlstr);
|
||||
// with ADOQueryTmp do
|
||||
// begin
|
||||
// close;
|
||||
// SQL.Clear;
|
||||
// sql.Add(sqlstr);
|
||||
//// ShowMessage(SQL.text);
|
||||
// ExecSQL;
|
||||
// end;
|
||||
|
||||
with AdoPrint do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* from CPKC_Print A');
|
||||
sql.Add('order by P_Code,P_Color,');
|
||||
sql.Add('case when defstr1=''CXXS'' then 1 when defstr1=''CXS'' then 2 when defstr1=''CS'' then 3 ');
|
||||
sql.Add(' when defstr1=''CM'' then 4 when defstr1=''CL'' then 5 when defstr1=''CXL'' then 6');
|
||||
sql.Add(' when defstr1=''AXS'' then 7 when defstr1=''AS'' then 8 when defstr1=''AM'' then 9');
|
||||
sql.Add(' when defstr1=''AL'' then 10 when defstr1=''AXL'' then 11 when defstr1=''AXXL'' then 12');
|
||||
sql.Add('else 99 end ');
|
||||
// ShowMessage(sql.Text);
|
||||
open;
|
||||
end;
|
||||
|
||||
try
|
||||
filepath := ExtractFilePath(Application.ExeName) + 'report\库存明细.rmf';
|
||||
if not FileExists(Pchar(filepath)) then
|
||||
begin
|
||||
application.MessageBox(pchar('文件[' + filepath + ']不存在!'), '提示信息', MB_IConError);
|
||||
exit;
|
||||
end;
|
||||
RMGridReport1.LoadFromFile(filepath);
|
||||
RMGridReport1.ShowReport;
|
||||
finally
|
||||
Tv1.OnFocusedRecordChanged := Tv1FocusedRecordChanged;
|
||||
InitGrid();
|
||||
end;
|
||||
MovePanel2.Visible := False;
|
||||
|
||||
end;
|
||||
//begin
|
||||
// if CDS_Main.IsEmpty then
|
||||
// Exit;
|
||||
// TcxGridToExcel(self.Caption, cxgrid1);
|
||||
|
||||
//end;
|
||||
|
||||
procedure TfrmCpkcSel.TOkClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
IdFTP1: TIdFTP;
|
||||
FileName, FPath, FFName: string;
|
||||
FInt: integer;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
with adoqueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File ');
|
||||
sql.Add('where WBID=' + quotedstr(trim(CDS_Main.fieldbyname('orderNo').AsString)));
|
||||
//sql.Add('and TFType=''产品''');
|
||||
open;
|
||||
end;
|
||||
if adoqueryCmd.IsEmpty then
|
||||
begin
|
||||
application.MessageBox('此指示单没有图样信息!', '提示信息', MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
FileName := adoqueryCmd.fieldbyname('FileName').AsString;
|
||||
|
||||
try
|
||||
IdFTP1 := TIdFTP.Create(self);
|
||||
IdFTP1.Host := server;
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
IdFTP1.Quit;
|
||||
IdFTP1.Free;
|
||||
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
|
||||
Exit;
|
||||
end;
|
||||
FPath := Leftstr(ExtractFilePath(Application.ExeName), 1) + ':\图片查看\';
|
||||
if not DirectoryExists(ExtractFileDir(FPath)) then
|
||||
CreateDir(ExtractFileDir(FPath));
|
||||
FFName := Trim(FileName);
|
||||
FFName := FPath + FFName;
|
||||
deleteFile(FFName);
|
||||
IdFTP1.Get('TP\' + FileName, FFName);
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
IdFTP1.Quit;
|
||||
IdFTP1.Free;
|
||||
end;
|
||||
try
|
||||
ShellExecute(Handle, 'open', PChar(FFName), '', '', SW_SHOWNORMAL);
|
||||
except
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
begin
|
||||
initsub();
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main, True);
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main, False);
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
Panel9.Left := (self.Width - Panel9.Width) div 2;
|
||||
Panel9.Visible := true;
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.Button11Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
if CDS_Main.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
CDS_Main.DisableControls;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if CDS_Main.FieldByName('SSel').AsBoolean = True then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update CP_inout Set DRCKNO=''' + trim(Edit1.Text) + ''' ');
|
||||
sql.Add('where P_CodeName=''' + Trim(CDS_Main.fieldbyname('P_CodeName').AsString) + '''');
|
||||
sql.Add('and P_Code=''' + Trim(CDS_Main.fieldbyname('P_Code').AsString) + '''');
|
||||
sql.Add('and DRCKNO=''' + Trim(CDS_Main.fieldbyname('DRCKNO').AsString) + '''');
|
||||
sql.Add('and DRCKName=''' + Trim(CDS_Main.fieldbyname('DRCKName').AsString) + '''');
|
||||
// sql.add('where AA.P_CodeName='FAIRY' and AA.P_Code='1505-C' and isnull(DRCKNO,'')='101' and isnull(DRCKName,'')='工厂成衣仓'');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
CDS_Main.EnableControls;
|
||||
application.MessageBox('数据保存成功!', '提示信息');
|
||||
Panel9.Visible := false;
|
||||
TBRafresh.Click;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
CDS_Main.EnableControls;
|
||||
application.MessageBox('数据保存失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.Button12Click(Sender: TObject);
|
||||
begin
|
||||
Panel9.Visible := false;
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.Button1Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
if CDS_Main.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
CDS_Main.DisableControls;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if CDS_Main.FieldByName('SSel').AsBoolean = True then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update CP_inout Set DRCKName=''' + trim(Edit2.Text) + ''' ');
|
||||
sql.Add('where P_CodeName=''' + Trim(CDS_Main.fieldbyname('P_CodeName').AsString) + '''');
|
||||
sql.Add('and P_Code=''' + Trim(CDS_Main.fieldbyname('P_Code').AsString) + '''');
|
||||
sql.Add('and DRCKNO=''' + Trim(CDS_Main.fieldbyname('DRCKNO').AsString) + '''');
|
||||
sql.Add('and DRCKName=''' + Trim(CDS_Main.fieldbyname('DRCKName').AsString) + '''');
|
||||
// sql.add('where AA.P_CodeName='FAIRY' and AA.P_Code='1505-C' and isnull(DRCKNO,'')='101' and isnull(DRCKName,'')='工厂成衣仓'');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
CDS_Main.EnableControls;
|
||||
application.MessageBox('数据保存成功!', '提示信息');
|
||||
Panel2.Visible := false;
|
||||
TBRafresh.Click;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
CDS_Main.EnableControls;
|
||||
application.MessageBox('数据保存失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.Button2Click(Sender: TObject);
|
||||
begin
|
||||
Panel2.Visible := false;
|
||||
end;
|
||||
|
||||
procedure TfrmCpkcSel.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
Panel2.Left := (self.Width - Panel2.Width) div 2;
|
||||
Panel2.Visible := true;
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
unit U_GetDllForm;
|
||||
|
||||
interface
|
||||
|
||||
|
||||
uses
|
||||
Windows, Messages, forms, OleCtnrs, DateUtils, SysUtils, ADODB, IniFiles,
|
||||
dxCore, ActiveX;
|
||||
|
@ -15,8 +15,8 @@ function GetsysParam(muserId: pchar; fparam1: pchar): Boolean;
|
|||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_getDogServer, U_BpRklist, U_Bpcklist, U_Bpkclist, U_ZDYHelp,U_CPKWListSel,
|
||||
U_BpckXjList, U_Bpkclist_HZ;
|
||||
U_DataLink, U_getDogServer, U_BpRklist, U_CPRklist, U_Bpcklist, U_Bpkclist,
|
||||
U_ZDYHelp, U_CPKWListSel, U_BpckXjList, U_Bpkclist_HZ, U_CpCklist;
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// 功能说明:取Dll中得窗体 //
|
||||
|
@ -142,7 +142,7 @@ begin
|
|||
free;
|
||||
end;
|
||||
end;
|
||||
10: //成品入库
|
||||
102: //成品入库(原本)
|
||||
begin
|
||||
if frmBpRklist = nil then
|
||||
begin
|
||||
|
@ -162,7 +162,47 @@ begin
|
|||
//句柄
|
||||
mnewHandle := frmBpRklist.Handle;
|
||||
end;
|
||||
10: //成品入库
|
||||
begin
|
||||
if frmCPRklist = nil then
|
||||
begin
|
||||
frmCPRklist := TfrmCPRklist.Create(application.MainForm);
|
||||
with frmCPRklist do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
fCkName := trim(Parameters1);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmCPRklist.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmCPRklist.Handle;
|
||||
end;
|
||||
20: //成品出库
|
||||
begin
|
||||
if frmCpCklist = nil then
|
||||
begin
|
||||
frmCpCklist := TfrmCpCklist.Create(application.MainForm);
|
||||
with frmCpCklist do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
fCkName := trim(Parameters1);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmCpCklist.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmCpCklist.Handle;
|
||||
end;
|
||||
201: //成品出库(原本)
|
||||
begin
|
||||
if frmBpCklist = nil then
|
||||
begin
|
||||
|
|
|
@ -249,6 +249,19 @@ object frmProductOrderNewListSEl: TfrmProductOrderNewListSEl
|
|||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label14: TLabel
|
||||
Left = 669
|
||||
Top = 39
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495
|
||||
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 = 11
|
||||
|
@ -378,6 +391,15 @@ object frmProductOrderNewListSEl: TfrmProductOrderNewListSEl
|
|||
TabOrder = 13
|
||||
OnChange = OrderNoChange
|
||||
end
|
||||
object prtcode: TEdit
|
||||
Tag = 2
|
||||
Left = 723
|
||||
Top = 35
|
||||
Width = 100
|
||||
Height = 20
|
||||
TabOrder = 14
|
||||
OnChange = OrderNoChange
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
|
@ -387,6 +409,7 @@ object frmProductOrderNewListSEl: TfrmProductOrderNewListSEl
|
|||
Align = alTop
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
PopupMenu = PopupMenu1
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OnCellDblClick = Tv1CellDblClick
|
||||
DataController.DataSource = DataSource1
|
||||
|
@ -612,9 +635,13 @@ object frmProductOrderNewListSEl: TfrmProductOrderNewListSEl
|
|||
object PopupMenu1: TPopupMenu
|
||||
Left = 256
|
||||
Top = 176
|
||||
object N2: TMenuItem
|
||||
Caption = #26377#20379#24212#21830
|
||||
OnClick = N2Click
|
||||
object N3: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N3Click
|
||||
end
|
||||
object N4: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N4Click
|
||||
end
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
|
|
|
@ -49,7 +49,6 @@ type
|
|||
Label4: TLabel;
|
||||
CustomerNoName: TEdit;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N2: TMenuItem;
|
||||
Label2: TLabel;
|
||||
JGFactoryName: TEdit;
|
||||
Label5: TLabel;
|
||||
|
@ -91,6 +90,10 @@ type
|
|||
v1Column6: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
N3: TMenuItem;
|
||||
N4: TMenuItem;
|
||||
Label14: TLabel;
|
||||
prtcode: TEdit;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
|
@ -115,6 +118,8 @@ type
|
|||
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure N3Click(Sender: TObject);
|
||||
procedure N4Click(Sender: TObject);
|
||||
private
|
||||
DQdate:TDateTime;
|
||||
procedure InitGrid();
|
||||
|
@ -133,8 +138,8 @@ var
|
|||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun10;
|
||||
|
||||
U_DataLink,U_Fun10,U_Fun;
|
||||
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
@ -463,4 +468,14 @@ begin
|
|||
ToolButton3.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderNewListSEl.N3Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNoFiler(Tv1, True);
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderNewListSEl.N4Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNoFiler(Tv1, False);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
|
|
@ -54,10 +54,10 @@ object frmZdyCMZ_Sel: TfrmZdyCMZ_Sel
|
|||
OptionsCustomize.ColumnSorting = False
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||
Styles.Header = DataLink_BaseInfo.handBlack
|
||||
Styles.Inactive = CPCK_DataLink.SHuangSe
|
||||
Styles.IncSearch = CPCK_DataLink.SHuangSe
|
||||
Styles.Selection = CPCK_DataLink.SHuangSe
|
||||
Styles.Header = CPCK_DataLink.handBlack
|
||||
object TV1Column1: TcxGridDBColumn
|
||||
OnGetDisplayText = TV1Column1GetDisplayText
|
||||
HeaderAlignmentHorz = taCenter
|
||||
|
@ -144,10 +144,10 @@ object frmZdyCMZ_Sel: TfrmZdyCMZ_Sel
|
|||
OptionsCustomize.ColumnSorting = False
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||
Styles.Header = DataLink_BaseInfo.handBlack
|
||||
Styles.Inactive = CPCK_DataLink.SHuangSe
|
||||
Styles.IncSearch = CPCK_DataLink.SHuangSe
|
||||
Styles.Selection = CPCK_DataLink.SHuangSe
|
||||
Styles.Header = CPCK_DataLink.handBlack
|
||||
object v2Column2: TcxGridDBColumn
|
||||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'Code'
|
||||
|
@ -188,9 +188,9 @@ object frmZdyCMZ_Sel: TfrmZdyCMZ_Sel
|
|||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||
DisabledImages = CPCK_DataLink.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BaseInfo.ThreeImgList
|
||||
Images = CPCK_DataLink.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
|
@ -222,20 +222,20 @@ object frmZdyCMZ_Sel: TfrmZdyCMZ_Sel
|
|||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BaseInfo.ADOLink
|
||||
Connection = CPCK_DataLink.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 357
|
||||
Top = 73
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BaseInfo.ADOLink
|
||||
Connection = CPCK_DataLink.ADOLink
|
||||
Parameters = <>
|
||||
Left = 401
|
||||
Top = 145
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BaseInfo.ADOLink
|
||||
Connection = CPCK_DataLink.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 125
|
||||
|
@ -294,7 +294,7 @@ object frmZdyCMZ_Sel: TfrmZdyCMZ_Sel
|
|||
Top = 268
|
||||
end
|
||||
object ADOQuerysub: TADOQuery
|
||||
Connection = DataLink_BaseInfo.ADOLink
|
||||
Connection = CPCK_DataLink.ADOLink
|
||||
Parameters = <>
|
||||
Left = 484
|
||||
Top = 276
|
||||
|
|
|
@ -12,7 +12,21 @@ uses
|
|||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator;
|
||||
cxTextEdit, 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
|
||||
TfrmZdyCMZ_Sel = class(TForm)
|
||||
|
|
|
@ -103,6 +103,12 @@ object frmZdyYS_Sel: TfrmZdyYS_Sel
|
|||
HeaderAlignmentHorz = taCenter
|
||||
Width = 147
|
||||
end
|
||||
object Tv2Column4: TcxGridDBColumn
|
||||
Caption = #33394#21495
|
||||
DataBinding.FieldName = 'Colorno'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
|
|
|
@ -63,6 +63,7 @@ type
|
|||
Tv2Column3: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
CodeNameYW: TEdit;
|
||||
Tv2Column4: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
|
|
Loading…
Reference in New Issue
Block a user