样品新云翔修改

This commit is contained in:
DESKTOP-E401PHE\Administrator 2025-09-25 15:36:55 +08:00
parent 763891523b
commit 452c7e6140
13 changed files with 822 additions and 659 deletions

View File

@ -0,0 +1,5 @@
[生产车间配置]
卷条码机台标志=
机台个数=
端口号=
端口Dll文件=

View File

@ -1,13 +1,13 @@
object frmBPZDY_LRPB: TfrmBPZDY_LRPB
Left = 194
Top = 128
Width = 1386
Left = 367
Top = 326
Width = 1457
Height = 758
Caption = #39033#30446#32500#25252
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = False
@ -17,12 +17,12 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 107
TextHeight = 13
PixelsPerInch = 96
TextHeight = 12
object ToolBar1: TToolBar
Left = 0
Top = 0
Width = 1370
Width = 1449
Height = 31
ButtonHeight = 30
ButtonWidth = 59
@ -41,7 +41,7 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
object Panel1: TPanel
Left = 0
Top = 0
Width = 817
Width = 1009
Height = 30
Align = alTop
BevelInner = bvRaised
@ -93,7 +93,7 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
end
end
object TBClose: TToolButton
Left = 817
Left = 1009
Top = 0
AutoSize = True
Caption = #20851#38381
@ -102,23 +102,23 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
end
end
object Panel2: TPanel
Left = 919
Left = 768
Top = 31
Width = 451
Height = 687
Align = alClient
Width = 681
Height = 696
Align = alRight
BevelInner = bvRaised
BevelOuter = bvLowered
TabOrder = 1
object cxGrid2: TcxGrid
Left = 2
Top = 42
Width = 447
Height = 643
Top = 39
Width = 677
Height = 655
Align = alClient
TabOrder = 0
object TV2: TcxGridDBTableView
NavigatorButtons.ConfirmDelete = False
Navigator.Buttons.CustomButtons = <>
DataController.DataSource = DataSource3
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
@ -236,74 +236,74 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
object Panel3: TPanel
Left = 2
Top = 2
Width = 447
Height = 40
Width = 677
Height = 37
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
TabOrder = 1
object Label3: TLabel
Left = 37
Top = 14
Width = 56
Height = 13
Left = 34
Top = 13
Width = 52
Height = 12
Caption = #25195#25551#20837#21475
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -13
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label4: TLabel
Left = 230
Top = 14
Width = 84
Height = 13
Left = 195
Top = 13
Width = 78
Height = 12
Caption = #20844#21496#20135#21697#21517#31216
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label5: TLabel
Left = 455
Top = 14
Width = 56
Height = 13
Left = 420
Top = 13
Width = 52
Height = 12
Caption = #20135#21697#32534#21495
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object CYID: TEdit
Left = 95
Top = 10
Width = 107
Height = 21
Left = 88
Top = 9
Width = 98
Height = 20
TabOrder = 0
OnKeyPress = CYIDKeyPress
end
object CYName: TEdit
Tag = 2
Left = 315
Top = 10
Width = 117
Height = 21
Left = 274
Top = 9
Width = 108
Height = 20
TabOrder = 1
OnKeyPress = CYNameKeyPress
end
object CYNo: TEdit
Tag = 2
Left = 514
Top = 10
Width = 110
Height = 21
Left = 474
Top = 9
Width = 102
Height = 20
TabOrder = 2
OnKeyPress = CYNoKeyPress
end
@ -312,216 +312,216 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
object Panel4: TPanel
Left = 0
Top = 31
Width = 911
Height = 687
Align = alLeft
Width = 760
Height = 696
Align = alClient
BevelInner = bvRaised
BevelOuter = bvLowered
TabOrder = 2
object Panel5: TPanel
Left = 2
Top = 529
Width = 907
Height = 156
Top = 550
Width = 756
Height = 144
Align = alBottom
BevelInner = bvRaised
BevelOuter = bvLowered
TabOrder = 0
Visible = False
object Label6: TLabel
Left = 262
Top = 20
Width = 52
Height = 13
Left = 242
Top = 18
Width = 47
Height = 12
Caption = #21697' '#21517' '
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label7: TLabel
Left = 161
Top = 20
Width = 28
Height = 13
Left = 149
Top = 18
Width = 26
Height = 12
Caption = #20195#30721
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label8: TLabel
Left = 161
Top = 51
Width = 28
Height = 13
Left = 149
Top = 47
Width = 26
Height = 12
Caption = #20811#37325
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label9: TLabel
Left = 460
Top = 51
Width = 28
Height = 13
Left = 425
Top = 47
Width = 26
Height = 12
Caption = #38376#24133
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label10: TLabel
Left = 578
Top = 20
Width = 56
Height = 13
Left = 589
Top = 18
Width = 52
Height = 12
Caption = #22383#24067#23494#24230
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label11: TLabel
Left = 262
Top = 51
Width = 42
Height = 13
Left = 242
Top = 47
Width = 39
Height = 12
Caption = #32463#32428#32433
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label12: TLabel
Left = 460
Top = 20
Width = 28
Height = 13
Left = 425
Top = 18
Width = 26
Height = 12
Caption = #25104#20221
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label13: TLabel
Left = 578
Top = 51
Width = 56
Height = 13
Left = 589
Top = 47
Width = 52
Height = 12
Caption = #25104#21697#23494#24230
Font.Charset = GB2312_CHARSET
Font.Color = clBlue
Font.Height = -13
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label14: TLabel
Left = 460
Top = 80
Width = 28
Height = 13
Left = 425
Top = 74
Width = 26
Height = 12
Caption = #22791#27880
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label15: TLabel
Left = 161
Top = 80
Width = 28
Height = 13
Left = 149
Top = 74
Width = 26
Height = 12
Caption = #21333#20215
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label16: TLabel
Left = 51
Top = 22
Width = 32
Height = 61
Left = 47
Top = 20
Width = 29
Height = 56
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -61
Font.Height = -56
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label17: TLabel
Left = 262
Top = 80
Width = 44
Height = 13
Left = 242
Top = 74
Width = 40
Height = 12
Caption = #31246' '#20917
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object MXName: TEdit
Tag = 2
Left = 312
Top = 16
Width = 131
Height = 21
Left = 288
Top = 15
Width = 121
Height = 20
CharCase = ecUpperCase
TabOrder = 0
OnKeyPress = MXNameKeyPress
end
object BPMiDu: TEdit
Tag = 2
Left = 639
Top = 16
Width = 131
Height = 21
Left = 645
Top = 15
Width = 121
Height = 20
CharCase = ecUpperCase
TabOrder = 2
OnKeyPress = BPMiDuKeyPress
end
object BPJS: TEdit
Tag = 2
Left = 312
Top = 46
Width = 131
Height = 21
Left = 288
Top = 42
Width = 121
Height = 20
CharCase = ecUpperCase
TabOrder = 1
OnKeyPress = BPJSKeyPress
end
object Button1: TButton
Left = 424
Top = 103
Width = 96
Height = 41
Left = 391
Top = 95
Width = 89
Height = 38
Caption = #20445#23384
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -18
Font.Height = -17
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
@ -531,10 +531,10 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
end
object BPCF: TEdit
Tag = 2
Left = 493
Top = 16
Width = 68
Height = 21
Left = 455
Top = 15
Width = 121
Height = 20
CharCase = ecUpperCase
TabOrder = 4
Text = '100%P'
@ -542,10 +542,10 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
end
object BPMF: TEdit
Tag = 2
Left = 493
Top = 46
Width = 68
Height = 21
Left = 455
Top = 42
Width = 121
Height = 20
CharCase = ecUpperCase
TabOrder = 5
Text = '160'
@ -553,34 +553,34 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
end
object BPKZ: TEdit
Tag = 2
Left = 194
Top = 46
Width = 50
Height = 21
Left = 179
Top = 42
Width = 46
Height = 20
CharCase = ecUpperCase
TabOrder = 6
OnKeyPress = BPKZKeyPress
end
object MXCode: TEdit
Tag = 2
Left = 194
Top = 16
Width = 50
Height = 21
Left = 179
Top = 15
Width = 46
Height = 20
CharCase = ecUpperCase
TabOrder = 7
OnKeyPress = MXCodeKeyPress
end
object CPMiDu: TEdit
Tag = 2
Left = 639
Top = 46
Width = 131
Height = 21
Left = 645
Top = 42
Width = 121
Height = 20
CharCase = ecUpperCase
Font.Charset = GB2312_CHARSET
Font.Color = clBlue
Font.Height = -13
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
@ -589,30 +589,30 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
end
object BPNote: TEdit
Tag = 2
Left = 493
Top = 76
Width = 278
Height = 21
Left = 455
Top = 70
Width = 310
Height = 20
CharCase = ecUpperCase
TabOrder = 9
OnKeyPress = BPNoteKeyPress
end
object BPPrice: TEdit
Tag = 2
Left = 194
Top = 76
Width = 50
Height = 21
Left = 179
Top = 70
Width = 46
Height = 20
CharCase = ecUpperCase
TabOrder = 10
OnKeyPress = BPPriceKeyPress
end
object IFHS: TComboBox
Left = 312
Top = 76
Width = 132
Height = 21
ItemHeight = 13
Left = 288
Top = 70
Width = 122
Height = 20
ItemHeight = 12
TabOrder = 11
Items.Strings = (
#21547#31246
@ -620,10 +620,10 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
end
end
object Panel6: TPanel
Left = 221
Left = 204
Top = 2
Width = 688
Height = 527
Width = 554
Height = 548
Align = alClient
BevelInner = bvRaised
BevelOuter = bvLowered
@ -631,12 +631,12 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
object cxGrid1: TcxGrid
Left = 2
Top = 33
Width = 684
Height = 492
Width = 550
Height = 513
Align = alClient
TabOrder = 0
object TV1: TcxGridDBTableView
NavigatorButtons.ConfirmDelete = False
Navigator.Buttons.CustomButtons = <>
OnCellDblClick = TV1CellDblClick
OnFocusedRecordChanged = TV1FocusedRecordChanged
DataController.DataSource = DataSource1
@ -759,7 +759,7 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
object ToolBar2: TToolBar
Left = 2
Top = 2
Width = 684
Width = 550
Height = 31
ButtonHeight = 30
ButtonWidth = 59
@ -801,13 +801,22 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
Visible = False
OnClick = TBDelClick
end
object TbCopy: TToolButton
Left = 189
Top = 0
AutoSize = True
Caption = #22797#21046
ImageIndex = 92
Visible = False
OnClick = TbCopyClick
end
end
end
object Panel7: TPanel
Left = 2
Top = 2
Width = 219
Height = 527
Width = 202
Height = 548
Align = alLeft
BevelInner = bvRaised
BevelOuter = bvLowered
@ -815,16 +824,16 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
object cxDBTreeList1: TcxDBTreeList
Left = 2
Top = 33
Width = 215
Height = 492
Width = 198
Height = 513
Align = alClient
Bands = <
item
end>
BufferedPaint = False
DataController.DataSource = DataSource4
DataController.ParentField = 'CPParent'
DataController.KeyField = 'CPID'
Navigator.Buttons.CustomButtons = <>
OptionsBehavior.ExpandOnDblClick = False
OptionsSelection.CellSelect = False
OptionsView.CellAutoHeight = True
@ -838,15 +847,17 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
DataBinding.FieldName = 'CP'
Width = 210
Position.ColIndex = 1
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 0
Summary.FooterSummaryItems = <>
Summary.GroupFooterSummaryItems = <>
end
end
object ToolBar3: TToolBar
Left = 2
Top = 2
Width = 215
Width = 198
Height = 31
ButtonHeight = 30
ButtonWidth = 83
@ -874,11 +885,12 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
end
end
object cxSplitter1: TcxSplitter
Left = 911
Left = 760
Top = 31
Width = 8
Height = 687
Height = 696
HotZoneClassName = 'TcxMediaPlayer9Style'
AlignSplitter = salRight
Control = Panel4
end
object ADOQueryMain: TADOQuery
@ -18822,6 +18834,7 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
end
object cxStyleRepository1: TcxStyleRepository
Left = 728
PixelsPerInch = 96
object cxStyle1: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = clSkyBlue
@ -18836,6 +18849,7 @@ object frmBPZDY_LRPB: TfrmBPZDY_LRPB
object cxStyleRepository2: TcxStyleRepository
Left = 624
Top = 8
PixelsPerInch = 96
object cxStyle2: TcxStyle
AssignedValues = [svFont]
Font.Charset = ANSI_CHARSET

View File

@ -4,13 +4,26 @@ interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
cxDataStorage, cxEdit, DB, cxDBData, ToolWin, ComCtrls,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel,
cxClasses, cxControls, cxGridCustomView, cxGrid, DBClient, ADODB, ImgList,
StdCtrls, ExtCtrls, cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu,
cxButtonEdit, BtnEdit, cxTL, cxMaskEdit, cxInplaceContainer, cxDBTL,
cxTLData, cxContainer, cxCurrencyEdit, cxCheckBox, cxSplitter;
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, ToolWin, ComCtrls, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxButtonEdit, BtnEdit,
cxTL, cxMaskEdit, cxInplaceContainer, cxDBTL, cxTLData, cxContainer,
cxCurrencyEdit, cxCheckBox, cxSplitter, 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, cxTLdxBarBuiltInMenu;
type
TfrmBPZDY_LRPB = class(TForm)
@ -116,6 +129,7 @@ type
V1IFHS: TcxGridDBColumn;
Label17: TLabel;
IFHS: TComboBox;
TbCopy: TToolButton;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBAddClick(Sender: TObject);
@ -123,9 +137,7 @@ type
procedure TBDelClick(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TV1CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
procedure TV1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
procedure BPNamehange(Sender: TObject);
procedure V1NotePropertiesEditValueChanged(Sender: TObject);
procedure V1HelpTypePropertiesEditValueChanged(Sender: TObject);
@ -136,9 +148,7 @@ type
procedure ToolButton5Click(Sender: TObject);
procedure ToolButton3Click(Sender: TObject);
procedure BPCodeMChange(Sender: TObject);
procedure Tv3CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
procedure Tv3CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
procedure CYNoChange(Sender: TObject);
procedure CYIDKeyPress(Sender: TObject; var Key: Char);
procedure Button1Click(Sender: TObject);
@ -157,11 +167,10 @@ type
procedure BPCFKeyPress(Sender: TObject; var Key: Char);
procedure CPMiDuKeyPress(Sender: TObject; var Key: Char);
procedure FormDestroy(Sender: TObject);
procedure TV1FocusedRecordChanged(Sender: TcxCustomGridTableView;
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
ANewItemRecordFocusingChanged: Boolean);
procedure TV1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
procedure BPPriceKeyPress(Sender: TObject; var Key: Char);
procedure BPNoteKeyPress(Sender: TObject; var Key: Char);
procedure TbCopyClick(Sender: TObject);
private
FBPID, FCPID, FCPNo, FCPName: string;
procedure InitGrid();
@ -174,10 +183,12 @@ type
PPSTE: integer;
{ Public declarations }
end;
var
frmBPZDY_LRPB: TfrmBPZDY_LRPB;
implementation
uses
U_DataLink, U_Fun10, U_BPZdy_SH, U_BPZdy_HXK, U_CPTypePB;
@ -199,9 +210,11 @@ begin
end;
procedure TfrmBPZDY_LRPB.SaveData();
var maxno:string;
var
maxno: string;
begin
if FGYName<>'' then exit;
if FGYName <> '' then
exit;
try
ADOQueryCmd.Connection.BeginTrans;
ClientDataSet1.DisableControls;
@ -311,7 +324,8 @@ begin
TV1.OptionsData.Editing := false;
TV1.OptionsSelection.CellSelect := false;
ADOQueryCmd.Connection.CommitTrans;
except;
except
;
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('保存失败!', '提示', 0);
end;
@ -328,14 +342,14 @@ begin
//ConnectionString:='';
Connected := true;
end;
except;
except
;
frmBPZDY_LRPB.Free;
end;
canshu1 := Trim(DParameters1);
end;
procedure TfrmBPZDY_LRPB.FormClose(Sender: TObject;
var Action: TCloseAction);
procedure TfrmBPZDY_LRPB.FormClose(Sender: TObject; var Action: TCloseAction);
begin
ToolBar1.SetFocus;
Action := caFree;
@ -373,7 +387,8 @@ begin
Panel5.Visible := False;
Application.MessageBox('没有选择类型,不能新增!', '提示', 0);
Exit;
end else
end
else
begin
Panel5.Visible := True;
SClearData(Panel5, 2);
@ -390,7 +405,8 @@ procedure TfrmBPZDY_LRPB.TBSaveClick(Sender: TObject);
var
maxno: string;
begin
if ClientDataSet1.IsEmpty then Exit;
if ClientDataSet1.IsEmpty then
Exit;
Toolbar1.SetFocus;
if ClientDataSet1.Locate('BPCode', null, []) then
begin
@ -419,7 +435,8 @@ end;
procedure TfrmBPZDY_LRPB.TBDelClick(Sender: TObject);
begin
MXCode.SetFocus;
if ClientDataSet1.IsEmpty then Exit;
if ClientDataSet1.IsEmpty then
Exit;
if Trim(ClientDataSet1.FieldByName('BPID').AsString) <> '' then
begin
with ADOQueryTemp do
@ -434,7 +451,8 @@ begin
Application.MessageBox('已生成面料信息,不能删除数据!', '提示', 0);
Exit;
end;
if application.MessageBox('确定要删除吗?','提示信息',1)=2 then exit;
if application.MessageBox('确定要删除吗?', '提示信息', 1) = 2 then
exit;
with ADOQueryCmd do
begin
Close;
@ -468,6 +486,7 @@ begin
if ViewFlag = True then
begin
TBAdd.Visible := False;
TbCopy.Visible := False;
TBDel.Visible := False;
ToolButton1.Visible := true;
end;
@ -503,19 +522,20 @@ begin
end;
end;
procedure TfrmBPZDY_LRPB.TV1CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
var i:integer;
procedure TfrmBPZDY_LRPB.TV1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
var
i: integer;
begin
if ToolButton1.Visible = true then
begin
Fint := '1';
ModalResult := 1;
end else
end
else
begin
ToolBar1.SetFocus;
if ClientDataSet1.IsEmpty then exit;
if ClientDataSet1.IsEmpty then
exit;
BPMF.Text := Trim(ClientDataSet1.fieldbyname('BPMF').AsString);
BPKZ.Text := Trim(ClientDataSet1.fieldbyname('BPKZ').AsString);
BPCF.Text := Trim(ClientDataSet1.fieldbyname('BPCF').AsString);
@ -534,12 +554,13 @@ begin
Panel5.Visible := True;
Button1.Caption := '修改保存';
TBDel.Visible := True;
TBCopy.Visible := True;
end;
end;
procedure TfrmBPZDY_LRPB.BPNamehange(Sender: TObject);
var
fsj:String;
fsj: string;
begin
if Trim(BPNameM.Text) <> '' then
begin
@ -566,8 +587,7 @@ begin
end;
end;
procedure TfrmBPZDY_LRPB.V1HelpTypePropertiesEditValueChanged(
Sender: TObject);
procedure TfrmBPZDY_LRPB.V1HelpTypePropertiesEditValueChanged(Sender: TObject);
var
mvalue: string;
begin
@ -636,7 +656,8 @@ end;
procedure TfrmBPZDY_LRPB.ToolButton4Click(Sender: TObject);
begin
ToolBar1.SetFocus;
if ClientDataSet1.IsEmpty then exit;
if ClientDataSet1.IsEmpty then
exit;
if ClientDataSet1.FieldByName('BPID').AsString = '' then
begin
application.MessageBox('请保存主信息', '提示');
@ -652,10 +673,12 @@ end;
procedure TfrmBPZDY_LRPB.ToolButton5Click(Sender: TObject);
begin
ToolBar1.SetFocus;
if ML_GYS.IsEmpty then Exit;
if ML_GYS.IsEmpty then
Exit;
if Trim(ML_GYS.FieldByName('BPSubID').AsString) <> '' then
begin
if application.MessageBox('确定要删除吗?','提示信息',1)=2 then exit;
if application.MessageBox('确定要删除吗?', '提示信息', 1) = 2 then
exit;
with ADOQueryCmd do
begin
Close;
@ -668,7 +691,8 @@ begin
end;
procedure TfrmBPZDY_LRPB.ToolButton3Click(Sender: TObject);
var maxno:string;
var
maxno: string;
begin
ToolBar1.SetFocus;
try
@ -725,7 +749,8 @@ begin
end;
ADOQueryCmd.Connection.CommitTrans;
Application.MessageBox('保存成功!', '提示', 0);
except;
except
;
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('保存失败!', '提示', 0);
end;
@ -733,7 +758,7 @@ end;
procedure TfrmBPZDY_LRPB.BPCodeMChange(Sender: TObject);
var
fsj:String;
fsj: string;
begin
if Trim(BPCodeM.Text) <> '' then
begin
@ -747,12 +772,12 @@ begin
end;
end;
procedure TfrmBPZDY_LRPB.Tv3CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
var i:Integer;
procedure TfrmBPZDY_LRPB.Tv3CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
var
i: Integer;
begin
if ML_GX.IsEmpty then exit;
if ML_GX.IsEmpty then
exit;
ML_GX.Delete;
i := 1;
ML_GX.DisableControls;
@ -772,7 +797,7 @@ end;
procedure TfrmBPZDY_LRPB.CYNoChange(Sender: TObject);
var
fsj:String;
fsj: string;
begin
if Trim(CYNo.Text) <> '' then
begin
@ -787,11 +812,13 @@ begin
end;
procedure TfrmBPZDY_LRPB.CYIDKeyPress(Sender: TObject; var Key: Char);
var FMXCYID,FColNo,FCYType,CPID:String;
var
FMXCYID, FColNo, FCYType, CPID: string;
begin
if Key = #13 then
begin
if Trim(CYID.Text)='' then Exit;
if Trim(CYID.Text) = '' then
Exit;
with ADOQuery6 do
begin
close;
@ -862,7 +889,8 @@ var
begin
if Button1.Caption = '修改保存' then
begin
if Application.MessageBox('确定要修改保存吗','提示',1)=2 then exit;
if Application.MessageBox('确定要修改保存吗', '提示', 1) = 2 then
exit;
end;
if Button1.Caption = '新增保存' then
begin
@ -1062,8 +1090,10 @@ begin
Button1.Caption := '新增保存';
Panel5.Visible := false;
TBDel.Visible := False;
TbCopy.Visible := False;
ADOQueryCmd.Connection.CommitTrans;
except;
except
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('保存失败!', '提示', 0);
end;
@ -1087,14 +1117,15 @@ end;
procedure TfrmBPZDY_LRPB.ToolButton1Click(Sender: TObject);
begin
ToolBar1.SetFocus;
Fint:='1';
FInt := '1';
ModalResult := 1;
end;
procedure TfrmBPZDY_LRPB.Button1KeyPress(Sender: TObject; var Key: Char);
var maxno:string;
var
maxno: string;
begin
if key=#13 then
if Key = #13 then
begin
if MXCode.Text = '' then
begin
@ -1216,7 +1247,8 @@ begin
FBPID := '';
MXCode.SetFocus;
ADOQueryCmd.Connection.CommitTrans;
except;
except
;
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('保存失败!', '提示', 0);
end;
@ -1224,28 +1256,25 @@ begin
end;
end;
////////////////////////////////////////////////////////////
/// 目录树选择
procedure TfrmBPZDY_LRPB.cxDBTreeList1Click(Sender: TObject);
begin
InitGrid();
TBDel.Visible := False;
TbCopy.Visible := False;
Panel5.Visible := False;
if Order_Tree.FieldByName('CPLevel').AsInteger < 3 then
begin
// Panel5.Visible:=False;
TBAdd.Visible := False;
end else
end
else
begin
//Panel5.Visible:=True;
//SClearData(Panel5,2);
// BPMF.Text:='160';
//BPCF.Text:='100%P';
// Button1.Caption:='新增保存';
FBPID := '';
FCPID := Trim(Order_Tree.fieldbyname('CPID').AsString);
FCPNo := Trim(Order_Tree.fieldbyname('CPNo').AsString);
FCPName := Trim(Order_Tree.fieldbyname('CPName').AsString);
TBAdd.Visible := True;
//MXCode.SetFocus;
end;
Label16.Caption := Trim(Order_Tree.fieldbyname('CPNo').AsString);
end;
@ -1299,11 +1328,13 @@ begin
end;
procedure TfrmBPZDY_LRPB.CYNameKeyPress(Sender: TObject; var Key: Char);
var CPID:string;
var
CPID: string;
begin
if Key = #13 then
begin
if Trim(CYName.Text)='' then Exit;
if Trim(CYName.Text) = '' then
Exit;
with ADOQuery2 do
begin
Close;
@ -1317,11 +1348,13 @@ begin
end;
procedure TfrmBPZDY_LRPB.CYNoKeyPress(Sender: TObject; var Key: Char);
var CPID:string;
var
CPID: string;
begin
if Key = #13 then
begin
if Trim(CYNo.Text)='' then Exit;
if Trim(CYNo.Text) = '' then
Exit;
with ADOQuery2 do
begin
Close;
@ -1355,13 +1388,11 @@ begin
frmBPZDY_LRPB := nil;
end;
procedure TfrmBPZDY_LRPB.TV1FocusedRecordChanged(
Sender: TcxCustomGridTableView; APrevFocusedRecord,
AFocusedRecord: TcxCustomGridRecord;
ANewItemRecordFocusingChanged: Boolean);
procedure TfrmBPZDY_LRPB.TV1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
begin
Panel5.Visible := False;
TBAdd.Visible := False;
TbCopy.Visible := False;
TBDel.Visible := False;
end;
@ -1382,4 +1413,29 @@ begin
end;
procedure TfrmBPZDY_LRPB.TbCopyClick(Sender: TObject);
begin
Panel5.Visible := True;
BPMF.Text := Trim(ClientDataSet1.fieldbyname('BPMF').AsString);
BPKZ.Text := Trim(ClientDataSet1.fieldbyname('BPKZ').AsString);
BPCF.Text := Trim(ClientDataSet1.fieldbyname('BPCF').AsString);
BPJS.Text := Trim(ClientDataSet1.fieldbyname('BPJS').AsString);
BPMiDu.Text := Trim(ClientDataSet1.fieldbyname('BPMiDu').AsString);
CPMiDu.Text := Trim(ClientDataSet1.fieldbyname('CPMiDu').AsString);
MXCode.Text := Trim(ClientDataSet1.FieldByName('MXCode').AsString);
MXName.Text := Trim(ClientDataSet1.FieldByName('MXName').AsString);
IFHS.Text := Trim(ClientDataSet1.FieldByName('IFHS').AsString);
BPPrice.Text := Trim(ClientDataSet1.FieldByName('BPPrice').AsString);
BPNote.Text := Trim(ClientDataSet1.FieldByName('BPNote').AsString);
FBPID := '';
FCPID := Trim(ClientDataSet1.fieldbyname('CPID').AsString);
FCPNo := Trim(ClientDataSet1.fieldbyname('CPNo').AsString);
FCPName := Trim(ClientDataSet1.fieldbyname('CPName').AsString);
MXCode.SetFocus;
Button1.Caption := '新增保存';
end;
end.

View File

@ -336,6 +336,7 @@ type
function ColJGSaveData(FMXCYID: string): Boolean;
procedure Appenddata();
procedure XJGenXin();
procedure ReadINIFile();
{ Private declarations }
public
FCYID, FCYCode, FCPID, FCPNO, FCPName: string;
@ -2701,6 +2702,17 @@ begin
end;
end;
procedure TfrmCPAdd.ReadINIFile();
var
programIni:Tinifile; //配置文件名
FileName:string;
begin
FileName:=ExtractFilePath(Paramstr(0))+'SYSTEMSET.INI';
programIni:=Tinifile.create(FileName);
server:=programIni.ReadString('SERVER','服务器地址','127.0.0.1');
programIni.Free;
end;
procedure TfrmCPAdd.ToolButton3Click(Sender: TObject);
var
fHandle: THandle;

View File

@ -305,6 +305,7 @@ type
procedure Appenddata();
procedure XJGenXin();
procedure MXGYSSave();
procedure ReadINIFile();
{ Private declarations }
public
FCYID, FCYCode, FCPID, FCPNO, FCPName: string;
@ -2386,6 +2387,17 @@ begin
end;
end;
procedure TfrmCPAdd_ZLR.ReadINIFile();
var
programIni:Tinifile; //配置文件名
FileName:string;
begin
FileName:=ExtractFilePath(Paramstr(0))+'SYSTEMSET.INI';
programIni:=Tinifile.create(FileName);
server:=programIni.ReadString('SERVER','服务器地址','127.0.0.1');
programIni.Free;
end;
procedure TfrmCPAdd_ZLR.ToolButton12Click(Sender: TObject);
var
fHandle: THandle;

View File

@ -20,7 +20,7 @@ uses
U_ZdyAttachGYSX_SJG, U_BPZdy_LRTJ, U_MLMangeTJ, U_BPZdy_LRYH, U_BPZdy_LRPB_M,
U_BPZdy_LRSHK_M, U_BPZdy_Panel_RSCX, U_BPZdy_Panel_TJCX, U_MLMangeYH,
U_BPZdy_LRXH_M, U_MLMangeXH, U_BPZdy_TJHXK_M3, U_HXKYH, U_HXKTJ, U_HXKYHK,
U_GYSelect, U_MLMange_XH, U_MLHZGL;
U_GYSelect, U_MLMange_XH, U_MLHZGL,U_iniParam;
/////////////////////////////////////////////////////////////////
// 功能说明:取Dll中得窗体 //
@ -67,23 +67,32 @@ begin
SetLength(user, 255);
SetLength(pswd, 255);
if Trim(DataBaseStr) = '' then
begin
server := '106.14.113.234,7781';
dtbase := 'yunxiangdata';
user := 'sa';
pswd := 'rightsoft@123';
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
end
else
begin
DConString := DataBaseStr;
end;
// DParameters1 := '高权限';
// DParameters3:='1';
if not ConnData() then
begin
result := 0;
exit;
end;
if IsINIFile() then
ReadINIFile()
else
WriteINIFile;
// 定义窗口类型 、状态
if WinStyle = 0 then
begin

View File

@ -0,0 +1,64 @@
unit U_iniParam;
interface
uses
IniFiles,SysUtils;
var
Filename:string; //文件名
iParam2:integer;
bParam1:Boolean;
bParam2:Boolean;
SCXFlag:String; //生产线 根据此标志获取卷条码前缀 不能包含字母 1,2
SCXCount:String; //机台个数
PortNoStr:string;//端口号
DllName:string;//端口Dll文件
Function IsINIFile():Boolean; //判断InI配置文件是否存在
procedure ReadINIFile();
procedure WriteINIFile();
implementation
///////////////////////////////////////////////////////////////////
//读取ini文件设置参数
//参数:
////////////////////////////////////////////////////////////////////
procedure ReadINIFile();
var
programIni:Tinifile; //配置文件名
begin
FileName:=ExtractFilePath(Paramstr(0))+'File.INI';
programIni:=Tinifile.create(FileName);
SCXFlag:=programIni.ReadString('生产车间配置','卷条码机台标志','1');
SCXCount:=programIni.ReadString('生产车间配置','机台个数','1');
PortNoStr:=programIni.ReadString('生产车间配置','端口号','com1');
DllName:=programIni.ReadString('生产车间配置','端口Dll文件','JZCRS323C.DLL');
programIni.Free;
end;
//////////////////////////////////////////////////////////////////
//写设置信息到INI文件
//参数
//////////////////////////////////////////////////////////////////
procedure WriteINIFile();
var
programIni:Tinifile; //配置文件名
begin
FileName:=ExtractFilePath(Paramstr(0))+'File.INI';
programIni:=Tinifile.create(FileName);
programIni.WriteString('生产车间配置','卷条码机台标志',SCXFlag);
programIni.WriteString('生产车间配置','机台个数',SCXCount);
programIni.WriteString('生产车间配置','端口号',PortNoStr);
programIni.WriteString('生产车间配置','端口Dll文件',DllName);
programIni.Free;
end;
//////////////////////////////////////////////////////////////////
//判断InI文件是否存在
//////////////////////////////////////////////////////////////////
Function IsINIFile():Boolean;
begin
FileName:=ExtractFilePath(Paramstr(0))+'File.INI';
if FileExists(FileName) then
Result:=true
else
Result:=false;
end;
end.

View File

@ -53,15 +53,6 @@ uses
U_RTFun in '..\Z99Dependency\RTFunAndForm\Fun\U_RTFun.pas',
U_MLMangeRSSel in '..\生产计划单(DyeingFinishingPlan.dll)\U_MLMangeRSSel.pas' {frmMLMangeRS};
// U_SelfForm in '..\..\SelfForm\U_SelfForm.pas',
// U_SelExportField in '..\..\SelfForm\U_SelExportField.pas' {frmSelExportField},
// U_SelPrintField in '..\..\SelfForm\U_SelPrintField.pas' {frmSelPrintField},
// U_SelPrintFieldNew in '..\..\SelfForm\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew},
//U_FormPas in '..\CommonPas\formPas\U_FormPas.pas',
//U_CxGridSet in '..\CommonPas\cxgridPas\U_CxGridSet.pas';
//U_RSFormPas in '..\CommonPas\RSCommon\U_RSFormPas.pas';
{$R *.res}
procedure DllEnterPoint(dwReason: DWORD);far;stdcall;