自定义疵点

This commit is contained in:
DESKTOP-E401PHE\Administrator 2025-08-22 15:27:26 +08:00
parent c65f9ea480
commit 04bd9bc697
6 changed files with 758 additions and 67 deletions

View File

@ -101,7 +101,7 @@ DebugSourceDirs=
UsePackages=0 UsePackages=0
[Parameters] [Parameters]
RunParams= RunParams=
HostApplication=D:\徐加艳项目代码\项目代码\光辉\检验管理\testDll.exe HostApplication=D:\Dp7Repo\项目代码\D7DJguanghui\检验管理\testDll.exe
Launcher= Launcher=
UseLauncher=0 UseLauncher=0
DebugCWD= DebugCWD=

View File

@ -22,10 +22,10 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
Left = 0 Left = 0
Top = 0 Top = 0
Width = 1384 Width = 1384
Height = 62 Height = 92
AutoSize = True AutoSize = True
ButtonHeight = 30 ButtonHeight = 30
ButtonWidth = 119 ButtonWidth = 131
Caption = 'ToolBar1' Caption = 'ToolBar1'
Color = clSkyBlue Color = clSkyBlue
Flat = True Flat = True
@ -99,29 +99,39 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
object ToolButton11: TToolButton object ToolButton11: TToolButton
Left = 489 Left = 489
Top = 0 Top = 0
AutoSize = True
Caption = #25209#37327#20462#25913#32568#21495 Caption = #25209#37327#20462#25913#32568#21495
ImageIndex = 54 ImageIndex = 54
Wrap = True
OnClick = ToolButton11Click OnClick = ToolButton11Click
end end
object TBDW: TToolButton object TBDW: TToolButton
Left = 608 Left = 0
Top = 0 Top = 30
AutoSize = True AutoSize = True
Caption = #20462#25913#25968#37327#21333#20301 Caption = #20462#25913#25968#37327#21333#20301
ImageIndex = 54 ImageIndex = 54
OnClick = TBDWClick OnClick = TBDWClick
end end
object ToolButton14: TToolButton
Left = 111
Top = 30
AutoSize = True
Caption = #25209#37327#20462#25913#31995#25968
ImageIndex = 54
OnClick = ToolButton14Click
end
object ToolButton4: TToolButton object ToolButton4: TToolButton
Left = 719 Left = 222
Top = 0 Top = 30
AutoSize = True AutoSize = True
Caption = #25209#37327#35843#25972#31859#25968 Caption = #25209#37327#35843#25972#31859#25968
ImageIndex = 54 ImageIndex = 54
OnClick = ToolButton4Click OnClick = ToolButton4Click
end end
object ToolButton13: TToolButton object ToolButton13: TToolButton
Left = 830 Left = 333
Top = 0 Top = 30
AutoSize = True AutoSize = True
Caption = #25209#37327#20928#37325#36716#38271#24230 Caption = #25209#37327#20928#37325#36716#38271#24230
ImageIndex = 54 ImageIndex = 54
@ -129,34 +139,42 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
OnClick = ToolButton13Click OnClick = ToolButton13Click
end end
object ToolButton8: TToolButton object ToolButton8: TToolButton
Left = 953 Left = 456
Top = 0 Top = 30
AutoSize = True AutoSize = True
Caption = #25209#37327#20462#25913#30382#37325 Caption = #25209#37327#20462#25913#30382#37325
ImageIndex = 54 ImageIndex = 54
OnClick = ToolButton8Click OnClick = ToolButton8Click
end end
object ToolButton15: TToolButton
Left = 567
Top = 30
AutoSize = True
Caption = #25209#37327#35843#25972#20928#37325#27611#37325
ImageIndex = 54
OnClick = ToolButton15Click
end
object ToolButton1: TToolButton object ToolButton1: TToolButton
Left = 1064 Left = 702
Top = 0 Top = 30
AutoSize = True AutoSize = True
Caption = #25171#21360#26631#31614 Caption = #25171#21360#26631#31614
ImageIndex = 96 ImageIndex = 96
Wrap = True
OnClick = ToolButton1Click OnClick = ToolButton1Click
end end
object TCPDB: TToolButton object TCPDB: TToolButton
Left = 0 Left = 789
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #25104#21697#25171#21253 Caption = #25104#21697#25171#21253
ImageIndex = 57 ImageIndex = 57
Wrap = True
Visible = False Visible = False
OnClick = TCPDBClick OnClick = TCPDBClick
end end
object ToolButton3: TToolButton object ToolButton3: TToolButton
Left = 87 Left = 0
Top = 30 Top = 60
AutoSize = True AutoSize = True
Caption = #25171#21360#21253#26631#31614 Caption = #25171#21360#21253#26631#31614
ImageIndex = 12 ImageIndex = 12
@ -164,24 +182,24 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
OnClick = ToolButton3Click OnClick = ToolButton3Click
end end
object ToolButton2: TToolButton object ToolButton2: TToolButton
Left = 186 Left = 99
Top = 30 Top = 60
AutoSize = True AutoSize = True
Caption = #25171#21360#26816#39564#25253#21578 Caption = #25171#21360#26816#39564#25253#21578
ImageIndex = 12 ImageIndex = 12
OnClick = ToolButton2Click OnClick = ToolButton2Click
end end
object ToolButton5: TToolButton object ToolButton5: TToolButton
Left = 297 Left = 210
Top = 30 Top = 60
AutoSize = True AutoSize = True
Caption = #25171#21360 Caption = #25171#21360
ImageIndex = 12 ImageIndex = 12
OnClick = ToolButton5Click OnClick = ToolButton5Click
end end
object Edit3: TEdit object Edit3: TEdit
Left = 360 Left = 273
Top = 30 Top = 60
Width = 68 Width = 68
Height = 30 Height = 30
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -195,8 +213,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
OnKeyPress = Edit3KeyPress OnKeyPress = Edit3KeyPress
end end
object ComboBox1: TComboBox object ComboBox1: TComboBox
Left = 428 Left = 341
Top = 33 Top = 63
Width = 149 Width = 149
Height = 24 Height = 24
Style = csDropDownList Style = csDropDownList
@ -220,8 +238,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
#26816#39564#30721#21333) #26816#39564#30721#21333)
end end
object Edit4: TEdit object Edit4: TEdit
Left = 577 Left = 490
Top = 30 Top = 60
Width = 121 Width = 121
Height = 30 Height = 30
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -234,48 +252,42 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
Visible = False Visible = False
end end
object ToolButton12: TToolButton object ToolButton12: TToolButton
Left = 698 Left = 611
Top = 30 Top = 60
AutoSize = True
Caption = #20462#25913#30721#21333 Caption = #20462#25913#30721#21333
ImageIndex = 54 ImageIndex = 54
Visible = False Visible = False
OnClick = ToolButton12Click OnClick = ToolButton12Click
end end
object ToolButton9: TToolButton object ToolButton9: TToolButton
Left = 817 Left = 698
Top = 30 Top = 60
AutoSize = True AutoSize = True
Caption = #24322#24120#25968#25454 Caption = #24322#24120#25968#25454
ImageIndex = 2 ImageIndex = 2
OnClick = ToolButton9Click OnClick = ToolButton9Click
end end
object TBExport: TToolButton object TBExport: TToolButton
Left = 904 Left = 785
Top = 30 Top = 60
AutoSize = True AutoSize = True
Caption = #23548#20986 Caption = #23548#20986
ImageIndex = 75 ImageIndex = 75
OnClick = TBExportClick OnClick = TBExportClick
end end
object TBClose: TToolButton object TBClose: TToolButton
Left = 967 Left = 848
Top = 30 Top = 60
AutoSize = True AutoSize = True
Caption = #20851#38381 Caption = #20851#38381
ImageIndex = 55 ImageIndex = 55
OnClick = TBCloseClick OnClick = TBCloseClick
end end
object ToolButton14: TToolButton
Left = 1030
Top = 30
Caption = #25209#37327#20462#25913#31995#25968
ImageIndex = 56
OnClick = ToolButton14Click
end
end end
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Top = 62 Top = 92
Width = 1384 Width = 1384
Height = 88 Height = 88
Align = alTop Align = alTop
@ -790,9 +802,9 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
end end
object cxGrid1: TcxGrid object cxGrid1: TcxGrid
Left = 0 Left = 0
Top = 150 Top = 180
Width = 1384 Width = 1384
Height = 552 Height = 522
Align = alClient Align = alClient
PopupMenu = PopupMenu1 PopupMenu = PopupMenu1
TabOrder = 3 TabOrder = 3
@ -1989,6 +2001,90 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
'') '')
end end
end end
object Panel15: TPanel
Left = 996
Top = 464
Width = 261
Height = 137
Color = clSkyBlue
TabOrder = 15
Visible = False
object Label40: TLabel
Left = 39
Top = 50
Width = 48
Height = 12
Caption = #35843#25972#26041#24335
end
object Label41: TLabel
Left = 40
Top = 78
Width = 48
Height = 12
Caption = #35843#25972#25968#37327
end
object Label42: TLabel
Left = 39
Top = 23
Width = 48
Height = 12
Caption = #35843#25972#23383#27573
end
object JZTZ: TComboBox
Left = 92
Top = 46
Width = 101
Height = 20
Style = csDropDownList
ItemHeight = 12
TabOrder = 0
Items.Strings = (
''
#22686#21152
#20943#23569)
end
object Button17: TButton
Left = 32
Top = 102
Width = 60
Height = 25
Caption = #30830#23450
TabOrder = 2
OnClick = Button17Click
end
object Button18: TButton
Left = 172
Top = 102
Width = 60
Height = 25
Caption = #20851#38381
TabOrder = 3
OnClick = Button18Click
end
object JZSL: TEdit
Left = 92
Top = 73
Width = 101
Height = 20
TabOrder = 1
end
object TZZD: TComboBox
Left = 92
Top = 18
Width = 101
Height = 20
Style = csDropDownList
ItemHeight = 12
ItemIndex = 0
TabOrder = 4
Text = #20928#37325
Items.Strings = (
#20928#37325
#27611#37325
#20928#37325#21644#27611#37325
'')
end
end
object cxGridPopupMenu1: TcxGridPopupMenu object cxGridPopupMenu1: TcxGridPopupMenu
Grid = cxGrid1 Grid = cxGrid1
PopupMenus = <> PopupMenus = <>

View File

@ -239,6 +239,16 @@ type
Tv1Column7: TcxGridDBColumn; Tv1Column7: TcxGridDBColumn;
Tv1Column8: TcxGridDBColumn; Tv1Column8: TcxGridDBColumn;
Tv1Column9: TcxGridDBColumn; Tv1Column9: TcxGridDBColumn;
Panel15: TPanel;
Label40: TLabel;
Label41: TLabel;
JZTZ: TComboBox;
Button17: TButton;
Button18: TButton;
JZSL: TEdit;
ToolButton15: TToolButton;
Label42: TLabel;
TZZD: TComboBox;
procedure FormDestroy(Sender: TObject); procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
@ -303,6 +313,9 @@ type
procedure ToolButton14Click(Sender: TObject); procedure ToolButton14Click(Sender: TObject);
procedure Button16Click(Sender: TObject); procedure Button16Click(Sender: TObject);
procedure Button15Click(Sender: TObject); procedure Button15Click(Sender: TObject);
procedure ToolButton15Click(Sender: TObject);
procedure Button17Click(Sender: TObject);
procedure Button18Click(Sender: TObject);
// procedure Edit5Click(Sender: TObject); // procedure Edit5Click(Sender: TObject);
// procedure CheckBox3Click(Sender: TObject); // procedure CheckBox3Click(Sender: TObject);
private private
@ -1320,6 +1333,14 @@ begin
sql.Clear; sql.Clear;
sql.Add('Update WFB_MJJY Set MJLen=''' + SL + ''' '); sql.Add('Update WFB_MJJY Set MJLen=''' + SL + ''' ');
sql.Add('where MJID=''' + Trim(Order_Main.fieldbyname('MJID').AsString) + ''''); sql.Add('where MJID=''' + Trim(Order_Main.fieldbyname('MJID').AsString) + '''');
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
sql.Add(' ' + quotedstr(trim(DName)));
sql.Add(',getdate() ');
sql.Add(',' + quotedstr(trim(self.Caption)));
sql.Add(',' + quotedstr(trim('长度修改')));
sql.Add(',' + quotedstr(trim('卷条码:' + trim(Order_Main.FieldByName('MJID').AsString) + ' 指示单号:' + trim(Order_Main.FieldByName('subID').AsString) + '缸号:' + trim(Order_Main.FieldByName('MJstr4').AsString) + '卷号:' + trim(Order_Main.FieldByName('MJXH').AsString) + '长度:' + trim(Order_Main.FieldByName('MJLen').AsString) + '净重:' + trim(Order_Main.FieldByName('MJQty4').AsString))));
sql.Add(',' + quotedstr(trim('成功')));
sql.Add(')');
ExecSQL; ExecSQL;
end; end;
with ADOQueryCmd do with ADOQueryCmd do
@ -1615,7 +1636,7 @@ begin
Open; Open;
end; end;
end; end;
if (trim(ComboBox1.Text) = '쇱駱쯤데(亶匡)') or (trim(ComboBox1.Text) = '밟뿔쇱駱쯤데') then if (trim(ComboBox1.Text) = '检验码单(英文)') or (trim(ComboBox1.Text) = '光辉检验码单') then
begin begin
with ADOQueryTemp do with ADOQueryTemp do
begin begin
@ -1639,7 +1660,7 @@ begin
Open; Open;
end; end;
end; end;
if (trim(ComboBox1.Text) = '밟뿔쇱駱쯤데2') then if (trim(ComboBox1.Text) = '光辉检验码单2') then
begin begin
with ADOQueryTemp do with ADOQueryTemp do
begin begin
@ -2064,6 +2085,14 @@ begin
sql.Add('where MJID=''' + Trim(Order_Main.fieldbyname('MJID').AsString) + ''''); sql.Add('where MJID=''' + Trim(Order_Main.fieldbyname('MJID').AsString) + '''');
sql.Add('Update WFB_MJJY Set MJMaoZ=MJQty4+MJQty3 '); sql.Add('Update WFB_MJJY Set MJMaoZ=MJQty4+MJQty3 ');
sql.Add('where MJID=''' + Trim(Order_Main.fieldbyname('MJID').AsString) + ''''); sql.Add('where MJID=''' + Trim(Order_Main.fieldbyname('MJID').AsString) + '''');
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
sql.Add(' ' + quotedstr(trim(DName)));
sql.Add(',getdate() ');
sql.Add(',' + quotedstr(trim(self.Caption)));
sql.Add(',' + quotedstr(trim('重量修改')));
sql.Add(',' + quotedstr(trim('卷条码:' + trim(Order_Main.FieldByName('MJID').AsString) + ' 指示单号:' + trim(Order_Main.FieldByName('subID').AsString) + '缸号:' + trim(Order_Main.FieldByName('MJstr4').AsString) + '卷号:' + trim(Order_Main.FieldByName('MJXH').AsString) + '毛重:' + trim(Order_Main.FieldByName('MJMaoZ').AsString) + '净重:' + trim(Order_Main.FieldByName('MJQty4').AsString))));
sql.Add(',' + quotedstr(trim('成功')));
sql.Add(')');
ExecSQL; ExecSQL;
end; end;
end; end;
@ -2576,5 +2605,127 @@ begin
end; end;
end; end;
procedure TfrmJYOrderCDOne.ToolButton15Click(Sender: TObject);
begin
Panel15.Left := (self.Width - Panel15.Width) div 2;
Panel15.Visible := true;
end;
procedure TfrmJYOrderCDOne.Button17Click(Sender: TObject);
var
JSL, MSL: string;
begin
if Order_Main.IsEmpty then
Exit;
if Order_Main.Locate('SSel', True, []) = False then
begin
Application.MessageBox('没有选择数据!', '提示', 0);
Exit;
end;
if trim(TZZD.Text) = '' then
begin
Application.MessageBox('调整字段不能为空!', '提示', 0);
Exit;
end;
if trim(JZTZ.Text) = '' then
begin
Application.MessageBox('调整方式不能为空!', '提示', 0);
Exit;
end;
if trim(JZSL.Text) = '' then
begin
Application.MessageBox('调整数量不能为空!', '提示', 0);
Exit;
end;
try
Order_Main.DisableControls;
ADOQueryCmd.Connection.BeginTrans;
with Order_Main do
begin
First;
while not Eof do
begin
if Order_Main.FieldByName('SSel').AsBoolean = True then
begin
if Trim(TZZD.Text) = '净重' then
begin
if Trim(JZTZ.Text) = '增加' then
begin
JSL := FloatToStr(Order_Main.fieldbyname('MJQty4').AsFloat + strtofloat(JZSL.Text));
MSL := FloatToStr(Order_Main.fieldbyname('MJMaoZ').AsFloat);
end;
if Trim(JZTZ.Text) = '减少' then
begin
JSL := FloatToStr(Order_Main.fieldbyname('MJQty4').AsFloat - strtofloat(JZSL.Text));
MSL := FloatToStr(Order_Main.fieldbyname('MJMaoZ').AsFloat);
end;
end
else if Trim(TZZD.Text) = '毛重' then
begin
if Trim(JZTZ.Text) = '增加' then
begin
JSL := FloatToStr(Order_Main.fieldbyname('MJQty4').AsFloat);
MSL := FloatToStr(Order_Main.fieldbyname('MJMaoZ').AsFloat + strtofloat(JZSL.Text));
end;
if Trim(JZTZ.Text) = '减少' then
begin
JSL := FloatToStr(Order_Main.fieldbyname('MJQty4').AsFloat);
MSL := FloatToStr(Order_Main.fieldbyname('MJMaoZ').AsFloat - strtofloat(JZSL.Text));
end;
end
else
begin
if Trim(JZTZ.Text) = '增加' then
begin
JSL := FloatToStr(Order_Main.fieldbyname('MJQty4').AsFloat + strtofloat(JZSL.Text));
MSL := FloatToStr(Order_Main.fieldbyname('MJMaoZ').AsFloat + strtofloat(JZSL.Text));
end;
if Trim(JZTZ.Text) = '减少' then
begin
JSL := FloatToStr(Order_Main.fieldbyname('MJQty4').AsFloat - strtofloat(JZSL.Text));
MSL := FloatToStr(Order_Main.fieldbyname('MJMaoZ').AsFloat - strtofloat(JZSL.Text));
end;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('Update WFB_MJJY Set MJqty4=''' + JSL + ''',MJMaoZ=''' + MSL + '''');
sql.Add('where MJID=''' + Trim(Order_Main.fieldbyname('MJID').AsString) + '''');
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
sql.Add(' ' + quotedstr(trim(DName)));
sql.Add(',getdate() ');
sql.Add(',' + quotedstr(trim(self.Caption)));
sql.Add(',' + quotedstr(trim('重量修改')));
sql.Add(',' + quotedstr(trim('卷条码:' + trim(Order_Main.FieldByName('MJID').AsString) + ' 指示单号:' + trim(Order_Main.FieldByName('subID').AsString) + '缸号:' + trim(Order_Main.FieldByName('MJstr4').AsString) + '卷号:' + trim(Order_Main.FieldByName('MJXH').AsString) + '毛重:' + trim(Order_Main.FieldByName('MJMaoZ').AsString) + '净重:' + trim(Order_Main.FieldByName('MJQty4').AsString))));
sql.Add(',' + quotedstr(trim('成功')));
sql.Add(')');
ExecSQL;
end;
end;
Next;
end;
end;
ADOQueryCmd.Connection.CommitTrans;
Order_Main.EnableControls;
application.MessageBox('数据保存成功!', '提示信息');
Panel15.Visible := false;
JZTZ.Text := '';
JZSL.Text := '';
TBRafresh.Click;
except
ADOQueryCmd.Connection.RollbackTrans;
Order_Main.EnableControls;
application.MessageBox('数据保存失败!', '提示信息', 0);
end;
end;
procedure TfrmJYOrderCDOne.Button18Click(Sender: TObject);
begin
Panel15.Visible := false;
end;
end. end.

View File

@ -999,6 +999,21 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Visible = False Visible = False
OnClick = SpeedButton13Click OnClick = SpeedButton13Click
end end
object Button8: TButton
Left = 9
Top = 568
Width = 153
Height = 41
Caption = #33258#23450#20041#30133#28857
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
ParentFont = False
TabOrder = 0
OnClick = Button8Click
end
end end
object Panel2: TPanel object Panel2: TPanel
Left = 377 Left = 377
@ -1854,7 +1869,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
ReadOnly = True ReadOnly = True
TabOrder = 25 TabOrder = 25
Text = #8730 Text = #8730
OnChange = Edit16Change OnClick = Edit16Click
OnKeyPress = MJstr3KeyPress OnKeyPress = MJstr3KeyPress
end end
object ComboBox3: TComboBox object ComboBox3: TComboBox
@ -1900,7 +1915,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
end end
object MovePanel1: TMovePanel object MovePanel1: TMovePanel
Left = 642 Left = 645
Top = 91 Top = 91
Width = 339 Width = 339
Height = 236 Height = 236
@ -2302,7 +2317,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
end end
object Panel3: TPanel object Panel3: TPanel
Left = 642 Left = 645
Top = 326 Top = 326
Width = 353 Width = 353
Height = 334 Height = 334
@ -3095,6 +3110,270 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnClick = Edit15Click OnClick = Edit15Click
end end
end end
object MovePanel2: TMovePanel
Left = 1010
Top = 115
Width = 339
Height = 236
BevelInner = bvLowered
Color = clSkyBlue
TabOrder = 8
Visible = False
object Label31: TLabel
Left = 117
Top = 26
Width = 40
Height = 19
Caption = #36215#22987
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label61: TLabel
Left = 231
Top = 24
Width = 20
Height = 19
Caption = #21040
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label62: TLabel
Left = 10
Top = 2
Width = 11
Height = 19
Caption = 'M'
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
Visible = False
end
object Label63: TLabel
Left = 323
Top = 24
Width = 11
Height = 19
Caption = 'M'
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label64: TLabel
Left = 4
Top = 29
Width = 40
Height = 19
Caption = #30133#28857
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label65: TLabel
Left = 157
Top = 61
Width = 11
Height = 19
Caption = 'M'
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label66: TLabel
Left = 7
Top = 61
Width = 73
Height = 19
Caption = #38271' '#24230
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label67: TLabel
Left = 191
Top = 61
Width = 40
Height = 19
Caption = #36317#36793
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label68: TLabel
Left = 301
Top = 61
Width = 22
Height = 19
Caption = 'cm'
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Edit17: TEdit
Left = 158
Top = 20
Width = 73
Height = 32
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -24
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 0
OnChange = Edit18Change
OnClick = Edit1Click
end
object Button9: TButton
Left = 138
Top = 186
Width = 67
Height = 43
Caption = #30830#23450
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 7
OnClick = Button9Click
end
object Button10: TButton
Left = 258
Top = 186
Width = 64
Height = 42
Caption = #20851#38381
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 5
OnClick = Button10Click
end
object Edit18: TEdit
Left = 250
Top = 20
Width = 72
Height = 32
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -24
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
OnChange = Edit18Change
OnClick = Edit1Click
end
object Edit19: TEdit
Left = 78
Top = 57
Width = 73
Height = 32
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -24
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 3
end
object RadioGroup2: TRadioGroup
Left = 10
Top = 83
Width = 308
Height = 95
Columns = 2
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = []
Items.Strings = (
'1'
'2'
'3'
'4')
ParentFont = False
TabOrder = 4
end
object Button11: TButton
Left = 11
Top = 186
Width = 75
Height = 42
Caption = #21462#28040#36873#25321
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 6
OnClick = Button2Click
end
object Edit20: TEdit
Left = 226
Top = 57
Width = 73
Height = 32
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -24
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 2
OnChange = Edit18Change
OnClick = Edit1Click
end
object ZDYCD: TEdit
Left = 42
Top = 21
Width = 75
Height = 32
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -24
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 8
OnClick = Edit1Click
end
end
object cxStyleRepository1: TcxStyleRepository object cxStyleRepository1: TcxStyleRepository
Left = 732 Left = 732
Top = 144 Top = 144

View File

@ -282,6 +282,26 @@ type
ToolButton1: TToolButton; ToolButton1: TToolButton;
Label60: TLabel; Label60: TLabel;
MJFLen: TEdit; MJFLen: TEdit;
Button8: TButton;
MovePanel2: TMovePanel;
Label31: TLabel;
Label61: TLabel;
Label62: TLabel;
Label63: TLabel;
Label64: TLabel;
Label65: TLabel;
Label66: TLabel;
Label67: TLabel;
Label68: TLabel;
Edit17: TEdit;
Button9: TButton;
Button10: TButton;
Edit18: TEdit;
Edit19: TEdit;
RadioGroup2: TRadioGroup;
Button11: TButton;
Edit20: TEdit;
ZDYCD: TEdit;
procedure FormDestroy(Sender: TObject); procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject); procedure TBCloseClick(Sender: TObject);
@ -342,8 +362,12 @@ type
procedure Edit5Click(Sender: TObject); procedure Edit5Click(Sender: TObject);
procedure Edit14Click(Sender: TObject); procedure Edit14Click(Sender: TObject);
procedure Edit15Click(Sender: TObject); procedure Edit15Click(Sender: TObject);
procedure Edit16Change(Sender: TObject);
procedure ToolButton1Click(Sender: TObject); procedure ToolButton1Click(Sender: TObject);
procedure Button8Click(Sender: TObject);
procedure Button9Click(Sender: TObject);
procedure Edit18Change(Sender: TObject);
procedure Button10Click(Sender: TObject);
procedure Edit16Click(Sender: TObject);
private private
{ Private declarations } { Private declarations }
FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer; FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer;
@ -3095,18 +3119,6 @@ begin
end; end;
end; end;
procedure TfrmMJManageNewFDNewSF.Edit16Change(Sender: TObject);
begin
if Trim(Edit16.Text) = '' then
begin
Edit16.Text := '¡Ì';
end
else
begin
Edit16.Text := '';
end;
end;
procedure TfrmMJManageNewFDNewSF.ToolButton1Click(Sender: TObject); procedure TfrmMJManageNewFDNewSF.ToolButton1Click(Sender: TObject);
var var
fPrintFile: string; fPrintFile: string;
@ -3127,5 +3139,158 @@ begin
end; end;
procedure TfrmMJManageNewFDNewSF.Button8Click(Sender: TObject);
var
i: Integer;
begin
if Trim(Label24.Caption) = '' then
Exit;
if Label24.Visible = False then
Exit;
if Trim(CDS_MJCD.fieldbyname('MJID').AsString) <> '' then
begin
if Trim(Label24.Caption) = '' then
Exit;
InitCDGridID();
InitCDGrid();
// BtnStatus(True);
end;
if Trim(FAPID) = '' then
Exit;
// FCDName := Trim(TSpeedButton(Sender).Hint);
MovePanel2.Left := (self.Width - MovePanel2.Width) div 2;
MovePanel2.Visible := True;
// Label21.Caption := Trim(FCDName);
FInt := 11;
ZDYCD.SetFocus;
Panel3.Visible := True;
with Panel3 do
begin
for i := 0 to ControlCount - 1 do
begin
if Controls[i] is TSpeedButton then
begin
TSpeedButton(Controls[i]).Hint := Trim(Edit1.Name);
end;
end;
end;
end;
procedure TfrmMJManageNewFDNewSF.Button9Click(Sender: TObject);
var
mvalue: Double;
begin
if Trim(ZDYCD.Text) = '' then
begin
Application.MessageBox('疵点名称不能为空!', '提示', 0);
exit;
end;
FCDName := Trim(ZDYCD.text);
if Trim(Edit1.Text) <> '' then
begin
if Trim(Edit2.Text) <> '' then
begin
if StrToFloat(Edit2.Text) < StrToFloat(Edit1.Text) then
begin
Application.MessageBox('疵点位置录入错误!', '提示', 0);
Exit;
end;
end;
end;
if Edit19.Text <> '' then
begin
if TryStrToFloat(Edit19.Text, mvalue) = False then
begin
Application.MessageBox('非法数字!', '提示', 0);
Exit;
end;
end;
with CDS_MJCD do
begin
Append;
FieldByName('cdname').Value := Trim(FCDName);
FieldByName('CDbeg').Value := Trim(Edit17.Text);
FieldByName('CDEnd').Value := Trim(Edit18.Text);
FieldByName('KouFenQty').Value := RadioGroup2.ItemIndex + 1;
FieldByName('JBQty').Value := strtofloatdef(trim(Edit20.Text), 0);
if Trim(Edit19.Text) <> '' then
begin
FieldByName('CDQty').Value := StrToFloat(Edit19.Text);
end
else
begin
FieldByName('CDQty').Value := 0;
end;
Post;
end;
Edit17.Text := '';
Edit18.Text := '';
Edit19.Text := '';
Edit20.Text := '';
MovePanel2.Visible := False;
Panel3.Visible := False;
end;
procedure TfrmMJManageNewFDNewSF.Edit18Change(Sender: TObject);
var
mvalue: Double;
begin
if Trim(Edit17.Text) <> '' then
begin
if TryStrToFloat(Edit17.Text, mvalue) = False then
begin
Application.MessageBox('非法数字!', '提示', 0);
Exit;
end;
end
else
begin
Exit;
end;
if Trim(Edit18.Text) <> '' then
begin
if TryStrToFloat(Edit18.Text, mvalue) = False then
begin
Application.MessageBox('非法数字!', '提示', 0);
Exit;
end;
end
else
begin
Exit;
end;
Edit19.Text := FloatToStr(StrToFloat(Edit18.Text) - StrToFloat(Edit17.Text));
end;
procedure TfrmMJManageNewFDNewSF.Button10Click(Sender: TObject);
begin
Edit17.Text := '';
Edit18.Text := '';
Edit19.Text := '';
MovePanel2.Visible := False;
Panel3.Visible := False;
end;
procedure TfrmMJManageNewFDNewSF.Edit16Click(Sender: TObject);
begin
if Trim(Edit16.Text) = '' then
begin
Edit16.Text := '√';
end
else
begin
Edit16.Text := '';
end;
end;
end. end.