自定义疵点
This commit is contained in:
parent
c65f9ea480
commit
04bd9bc697
|
|
@ -101,7 +101,7 @@ DebugSourceDirs=
|
|||
UsePackages=0
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=D:\徐加艳项目代码\项目代码\光辉\检验管理\testDll.exe
|
||||
HostApplication=D:\Dp7Repo\项目代码\D7DJguanghui\检验管理\testDll.exe
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ function ConnData(): Boolean;
|
|||
function GetsysParam(muserId: pchar; fparam1: pchar): Boolean;
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, U_iniParam, U_MJManageNewFDNew, U_ProductOrderList,
|
||||
U_ProductOrderAnPai, U_MJEdit, U_JYOrderCDOne, U_JYOrderCDMore,
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
|||
Left = 0
|
||||
Top = 0
|
||||
Width = 1384
|
||||
Height = 62
|
||||
Height = 92
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 119
|
||||
ButtonWidth = 131
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
|
|
@ -99,29 +99,39 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
|||
object ToolButton11: TToolButton
|
||||
Left = 489
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25209#37327#20462#25913#32568#21495
|
||||
ImageIndex = 54
|
||||
Wrap = True
|
||||
OnClick = ToolButton11Click
|
||||
end
|
||||
object TBDW: TToolButton
|
||||
Left = 608
|
||||
Top = 0
|
||||
Left = 0
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #20462#25913#25968#37327#21333#20301
|
||||
ImageIndex = 54
|
||||
OnClick = TBDWClick
|
||||
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
|
||||
Left = 719
|
||||
Top = 0
|
||||
Left = 222
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #25209#37327#35843#25972#31859#25968
|
||||
ImageIndex = 54
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object ToolButton13: TToolButton
|
||||
Left = 830
|
||||
Top = 0
|
||||
Left = 333
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #25209#37327#20928#37325#36716#38271#24230
|
||||
ImageIndex = 54
|
||||
|
|
@ -129,34 +139,42 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
|||
OnClick = ToolButton13Click
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 953
|
||||
Top = 0
|
||||
Left = 456
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #25209#37327#20462#25913#30382#37325
|
||||
ImageIndex = 54
|
||||
OnClick = ToolButton8Click
|
||||
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
|
||||
Left = 1064
|
||||
Top = 0
|
||||
Left = 702
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #25171#21360#26631#31614
|
||||
ImageIndex = 96
|
||||
Wrap = True
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TCPDB: TToolButton
|
||||
Left = 0
|
||||
Left = 789
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #25104#21697#25171#21253
|
||||
ImageIndex = 57
|
||||
Wrap = True
|
||||
Visible = False
|
||||
OnClick = TCPDBClick
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 87
|
||||
Top = 30
|
||||
Left = 0
|
||||
Top = 60
|
||||
AutoSize = True
|
||||
Caption = #25171#21360#21253#26631#31614
|
||||
ImageIndex = 12
|
||||
|
|
@ -164,24 +182,24 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
|||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 186
|
||||
Top = 30
|
||||
Left = 99
|
||||
Top = 60
|
||||
AutoSize = True
|
||||
Caption = #25171#21360#26816#39564#25253#21578
|
||||
ImageIndex = 12
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton5: TToolButton
|
||||
Left = 297
|
||||
Top = 30
|
||||
Left = 210
|
||||
Top = 60
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
ImageIndex = 12
|
||||
OnClick = ToolButton5Click
|
||||
end
|
||||
object Edit3: TEdit
|
||||
Left = 360
|
||||
Top = 30
|
||||
Left = 273
|
||||
Top = 60
|
||||
Width = 68
|
||||
Height = 30
|
||||
Font.Charset = GB2312_CHARSET
|
||||
|
|
@ -195,8 +213,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
|||
OnKeyPress = Edit3KeyPress
|
||||
end
|
||||
object ComboBox1: TComboBox
|
||||
Left = 428
|
||||
Top = 33
|
||||
Left = 341
|
||||
Top = 63
|
||||
Width = 149
|
||||
Height = 24
|
||||
Style = csDropDownList
|
||||
|
|
@ -220,8 +238,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
|||
#26816#39564#30721#21333)
|
||||
end
|
||||
object Edit4: TEdit
|
||||
Left = 577
|
||||
Top = 30
|
||||
Left = 490
|
||||
Top = 60
|
||||
Width = 121
|
||||
Height = 30
|
||||
Font.Charset = GB2312_CHARSET
|
||||
|
|
@ -234,48 +252,42 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
|||
Visible = False
|
||||
end
|
||||
object ToolButton12: TToolButton
|
||||
Left = 698
|
||||
Top = 30
|
||||
Left = 611
|
||||
Top = 60
|
||||
AutoSize = True
|
||||
Caption = #20462#25913#30721#21333
|
||||
ImageIndex = 54
|
||||
Visible = False
|
||||
OnClick = ToolButton12Click
|
||||
end
|
||||
object ToolButton9: TToolButton
|
||||
Left = 817
|
||||
Top = 30
|
||||
Left = 698
|
||||
Top = 60
|
||||
AutoSize = True
|
||||
Caption = #24322#24120#25968#25454
|
||||
ImageIndex = 2
|
||||
OnClick = ToolButton9Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 904
|
||||
Top = 30
|
||||
Left = 785
|
||||
Top = 60
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 75
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 967
|
||||
Top = 30
|
||||
Left = 848
|
||||
Top = 60
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 55
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
object ToolButton14: TToolButton
|
||||
Left = 1030
|
||||
Top = 30
|
||||
Caption = #25209#37327#20462#25913#31995#25968
|
||||
ImageIndex = 56
|
||||
OnClick = ToolButton14Click
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 62
|
||||
Top = 92
|
||||
Width = 1384
|
||||
Height = 88
|
||||
Align = alTop
|
||||
|
|
@ -790,9 +802,9 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
|||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 150
|
||||
Top = 180
|
||||
Width = 1384
|
||||
Height = 552
|
||||
Height = 522
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 3
|
||||
|
|
@ -1989,6 +2001,90 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
|||
'')
|
||||
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
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
|
|
|
|||
|
|
@ -239,6 +239,16 @@ type
|
|||
Tv1Column7: TcxGridDBColumn;
|
||||
Tv1Column8: 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 FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
|
|
@ -303,6 +313,9 @@ type
|
|||
procedure ToolButton14Click(Sender: TObject);
|
||||
procedure Button16Click(Sender: TObject);
|
||||
procedure Button15Click(Sender: TObject);
|
||||
procedure ToolButton15Click(Sender: TObject);
|
||||
procedure Button17Click(Sender: TObject);
|
||||
procedure Button18Click(Sender: TObject);
|
||||
// procedure Edit5Click(Sender: TObject);
|
||||
// procedure CheckBox3Click(Sender: TObject);
|
||||
private
|
||||
|
|
@ -476,7 +489,7 @@ end;
|
|||
|
||||
procedure TfrmJYOrderCDOne.InitForm();
|
||||
var
|
||||
fsj, Strmd: string;
|
||||
fsj, Strmd: string;
|
||||
begin
|
||||
ReadCxGrid('¼ìÑ鱨¸æJF', Tv1, '¼ìÑé¹ÜÀí');
|
||||
fsj := 'select distinct(Filler) name from WFB_MJJY ';
|
||||
|
|
@ -1320,6 +1333,14 @@ begin
|
|||
sql.Clear;
|
||||
sql.Add('Update WFB_MJJY Set MJLen=''' + SL + ''' ');
|
||||
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;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
|
|
@ -1610,12 +1631,12 @@ begin
|
|||
sql.Clear;
|
||||
sql.add('exec P_Do_PrintMd_HZ ');
|
||||
sql.add('@mainID=' + quotedstr(Trim('')));
|
||||
sql.add(',@DName=' + quotedstr(Trim(DCode)));
|
||||
sql.add(',@DName=' + quotedstr(Trim(DCode)));
|
||||
sql.add(',@flag=''44'' ');
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
if (trim(ComboBox1.Text) = '쇱駱쯤데(亶匡)') or (trim(ComboBox1.Text) = '밟뿔쇱駱쯤데') then
|
||||
if (trim(ComboBox1.Text) = '检验码单(英文)') or (trim(ComboBox1.Text) = '光辉检验码单') then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
|
|
@ -1639,11 +1660,11 @@ begin
|
|||
Open;
|
||||
end;
|
||||
end;
|
||||
if (trim(ComboBox1.Text) = '밟뿔쇱駱쯤데2') then
|
||||
if (trim(ComboBox1.Text) = '光辉检验码单2') then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_CKMDHAEIL ');
|
||||
sql.add('@DName=' + quotedstr(Trim(DCode)));
|
||||
|
|
@ -2064,6 +2085,14 @@ begin
|
|||
sql.Add('where MJID=''' + Trim(Order_Main.fieldbyname('MJID').AsString) + '''');
|
||||
sql.Add('Update WFB_MJJY Set MJMaoZ=MJQty4+MJQty3 ');
|
||||
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;
|
||||
|
|
@ -2576,5 +2605,127 @@ begin
|
|||
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.
|
||||
|
||||
|
|
|
|||
|
|
@ -999,6 +999,21 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
Visible = False
|
||||
OnClick = SpeedButton13Click
|
||||
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
|
||||
object Panel2: TPanel
|
||||
Left = 377
|
||||
|
|
@ -1854,7 +1869,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
ReadOnly = True
|
||||
TabOrder = 25
|
||||
Text = #8730
|
||||
OnChange = Edit16Change
|
||||
OnClick = Edit16Click
|
||||
OnKeyPress = MJstr3KeyPress
|
||||
end
|
||||
object ComboBox3: TComboBox
|
||||
|
|
@ -1900,7 +1915,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
end
|
||||
end
|
||||
object MovePanel1: TMovePanel
|
||||
Left = 642
|
||||
Left = 645
|
||||
Top = 91
|
||||
Width = 339
|
||||
Height = 236
|
||||
|
|
@ -2302,7 +2317,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
end
|
||||
end
|
||||
object Panel3: TPanel
|
||||
Left = 642
|
||||
Left = 645
|
||||
Top = 326
|
||||
Width = 353
|
||||
Height = 334
|
||||
|
|
@ -3095,6 +3110,270 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
OnClick = Edit15Click
|
||||
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
|
||||
Left = 732
|
||||
Top = 144
|
||||
|
|
|
|||
|
|
@ -282,6 +282,26 @@ type
|
|||
ToolButton1: TToolButton;
|
||||
Label60: TLabel;
|
||||
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 FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
|
|
@ -342,8 +362,12 @@ type
|
|||
procedure Edit5Click(Sender: TObject);
|
||||
procedure Edit14Click(Sender: TObject);
|
||||
procedure Edit15Click(Sender: TObject);
|
||||
procedure Edit16Change(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 declarations }
|
||||
FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer;
|
||||
|
|
@ -3095,18 +3119,6 @@ begin
|
|||
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);
|
||||
var
|
||||
fPrintFile: string;
|
||||
|
|
@ -3127,5 +3139,158 @@ begin
|
|||
|
||||
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.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user