This commit is contained in:
DESKTOP-E401PHE\Administrator 2025-10-31 13:35:42 +08:00
parent caccc40335
commit 1f015d4da6
6 changed files with 255 additions and 50 deletions

View File

@ -9,15 +9,15 @@ MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
DCC = $(ROOT)\bin\dcc32.exe $**
BRCC = $(ROOT)\bin\brcc32.exe $**
#------------------------------------------------------------------------------
PROJECTS = testDll.exe ProductPrice.dll
PROJECTS = TradeManage.dll testDll.exe
#------------------------------------------------------------------------------
default: $(PROJECTS)
#------------------------------------------------------------------------------
TradeManage.dll: TradeManage.dpr
$(DCC)
testDll.exe: testDll.dpr
$(DCC)
ProductPrice.dll: ProductPrice.dpr
$(DCC)

View File

@ -0,0 +1,23 @@
#------------------------------------------------------------------------------
VERSION = BWS.01
#------------------------------------------------------------------------------
!ifndef ROOT
ROOT = $(MAKEDIR)\..
!endif
#------------------------------------------------------------------------------
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
DCC = $(ROOT)\bin\dcc32.exe $**
BRCC = $(ROOT)\bin\brcc32.exe $**
#------------------------------------------------------------------------------
PROJECTS = TradeManage.dll testDll.exe
#------------------------------------------------------------------------------
default: $(PROJECTS)
#------------------------------------------------------------------------------
TradeManage.dll: TradeManage.dpr
$(DCC)
testDll.exe: ..\..\D7DJdazhong\¸´ºÏ¼ìÑé¹ÜÀí\testDll.dpr
$(DCC)

View File

@ -136,6 +136,3 @@ ProductVersion=1.0.0.0
Comments=
[Excluded Packages]
c:\program files\borland\delphi7\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package
[HistoryLists\hlUnitAliases]
Count=1
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;

View File

@ -1,7 +1,7 @@
[ExpressSkins]
Default=1
ShowNotifications=1
Enabled=1
Enabled=0
dxSkinBlack=1
dxSkinBlue=1
dxSkinBlueprint=1

View File

@ -47,7 +47,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Left = 0
Top = 87
Width = 425
Height = 628
Height = 636
Align = alLeft
TabOrder = 0
object Tv3: TcxGridDBTableView
@ -191,8 +191,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
object ScrollBox1: TScrollBox
Left = 1151
Top = 87
Width = 201
Height = 628
Width = 209
Height = 636
Align = alClient
Color = clWhite
ParentColor = False
@ -1043,7 +1043,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Left = 425
Top = 87
Width = 512
Height = 628
Height = 636
Align = alLeft
BevelInner = bvRaised
BevelOuter = bvLowered
@ -1156,7 +1156,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end
object Label13: TLabel
Left = 458
Top = 338
Top = 428
Width = 15
Height = 22
Caption = 'M'
@ -1170,7 +1170,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end
object Label14: TLabel
Left = 283
Top = 338
Top = 428
Width = 60
Height = 23
Caption = #21407#25968#37327
@ -1223,7 +1223,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end
object Label27: TLabel
Left = 219
Top = 461
Top = 551
Width = 40
Height = 23
Caption = #36192#36865
@ -1250,7 +1250,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end
object Label29: TLabel
Left = 284
Top = 294
Top = 384
Width = 58
Height = 23
Caption = #26588' '#21495
@ -1368,7 +1368,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end
object Label40: TLabel
Left = 208
Top = 399
Top = 489
Width = 80
Height = 22
Caption = #26579#21378#32568#21495
@ -1382,7 +1382,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end
object Label45: TLabel
Left = 223
Top = 298
Top = 388
Width = 40
Height = 23
Caption = #21253#21495
@ -1486,6 +1486,46 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Font.Style = [fsBold]
ParentFont = False
end
object Label62: TLabel
Left = 208
Top = 266
Width = 42
Height = 20
Caption = #21152#37325
Font.Charset = ANSI_CHARSET
Font.Color = clBlue
Font.Height = -20
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label63: TLabel
Left = 352
Top = 266
Width = 28
Height = 22
Caption = 'KG'
Font.Charset = ANSI_CHARSET
Font.Color = clBlue
Font.Height = -19
Font.Name = 'Arial'
Font.Style = []
ParentFont = False
end
object Label64: TLabel
Left = 209
Top = 310
Width = 84
Height = 20
AutoSize = False
Caption = #20462#25913#38271#24230
Font.Charset = GB2312_CHARSET
Font.Color = clBlue
Font.Height = -20
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object MJFK: TEdit
Left = 51
Top = 346
@ -1584,7 +1624,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end
object MJQty1: TEdit
Left = 353
Top = 329
Top = 419
Width = 90
Height = 41
Font.Charset = GB2312_CHARSET
@ -1616,7 +1656,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end
object MJQty2: TEdit
Left = 273
Top = 460
Top = 550
Width = 90
Height = 36
Font.Charset = GB2312_CHARSET
@ -1651,7 +1691,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end
object MJstr3: TEdit
Left = 353
Top = 289
Top = 379
Width = 90
Height = 41
Font.Charset = GB2312_CHARSET
@ -1726,7 +1766,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
object MJStr4: TEdit
Left = 57
Top = 39
Width = 90
Width = 136
Height = 36
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
@ -1773,7 +1813,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end
object MJstr5: TEdit
Left = 293
Top = 390
Top = 480
Width = 90
Height = 41
Font.Charset = GB2312_CHARSET
@ -1806,7 +1846,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end
object BaoID: TEdit
Left = 259
Top = 264
Top = 344
Width = 121
Height = 20
TabOrder = 10
@ -2002,6 +2042,39 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
TabOrder = 31
OnClick = Button13Click
end
object MJQty5: TEdit
Left = 257
Top = 259
Width = 90
Height = 36
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -28
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 32
OnChange = MJQty5Change
OnClick = Edit1Click
OnKeyPress = MJstr3KeyPress
end
object MJLen1: TEdit
Left = 304
Top = 303
Width = 137
Height = 41
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -32
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 33
OnChange = MJLen1Change
OnClick = Edit1Click
OnKeyDown = MJQty4KeyDown
OnKeyPress = MJstr3KeyPress
end
end
object MovePanel1: TMovePanel
Left = 1158
@ -2257,7 +2330,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Left = 937
Top = 87
Width = 214
Height = 628
Height = 636
Align = alLeft
BevelInner = bvRaised
BevelOuter = bvLowered
@ -2266,7 +2339,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Left = 2
Top = 2
Width = 210
Height = 303
Height = 311
Align = alClient
TabOrder = 0
object Tv2: TcxGridDBTableView
@ -2374,7 +2447,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end
object Panel8: TPanel
Left = 2
Top = 305
Top = 313
Width = 210
Height = 28
Align = alBottom
@ -2389,7 +2462,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end
object AOrdDefNote1: TRichEdit
Left = 2
Top = 333
Top = 341
Width = 210
Height = 293
Align = alBottom
@ -2405,8 +2478,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end
end
object Panel3: TPanel
Left = 618
Top = 348
Left = 1066
Top = 356
Width = 353
Height = 334
BevelInner = bvRaised
@ -2602,7 +2675,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
object ToolBar1: TToolBar
Left = 0
Top = 0
Width = 1352
Width = 1360
Height = 30
AutoSize = True
ButtonHeight = 30
@ -2775,7 +2848,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
object Panel6: TPanel
Left = 0
Top = 30
Width = 1352
Width = 1360
Height = 57
Align = alTop
BevelInner = bvRaised
@ -2861,7 +2934,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Visible = False
end
object Label44: TLabel
Left = 154
Left = 231
Top = 30
Width = 60
Height = 19
@ -2903,7 +2976,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Visible = False
end
object Label48: TLabel
Left = 283
Left = 320
Top = 30
Width = 100
Height = 19
@ -2943,7 +3016,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
ParentFont = False
end
object Label43: TLabel
Left = 419
Left = 456
Top = 30
Width = 120
Height = 19
@ -2956,7 +3029,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
ParentFont = False
end
object Label61: TLabel
Left = 587
Left = 615
Top = 30
Width = 40
Height = 19
@ -2968,6 +3041,19 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Font.Style = [fsBold]
ParentFont = False
end
object Label66: TLabel
Left = 113
Top = 33
Width = 80
Height = 19
Caption = #30721#34920#25552#20132
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object BTAdd: TButton
Left = 1070
Top = 8
@ -3028,7 +3114,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnClick = Edit7Click
end
object Edit9: TEdit
Left = 122
Left = 199
Top = 27
Width = 28
Height = 27
@ -3062,7 +3148,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnClick = Edit10Click
end
object Edit11: TEdit
Left = 254
Left = 291
Top = 27
Width = 28
Height = 27
@ -3115,7 +3201,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
#25163#36755)
end
object Edit5: TEdit
Left = 389
Left = 426
Top = 26
Width = 28
Height = 27
@ -3131,7 +3217,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnClick = Edit5Click
end
object Edit13: TEdit
Left = 556
Left = 584
Top = 26
Width = 28
Height = 27
@ -3146,6 +3232,22 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
TabOrder = 10
OnClick = Edit13Click
end
object Edit15: TEdit
Left = 84
Top = 27
Width = 28
Height = 27
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
ReadOnly = True
TabOrder = 11
Text = #8730
OnClick = Edit15Click
end
end
object ScrollBox2: TScrollBox
Left = -64

View File

@ -314,6 +314,13 @@ type
SpeedButton96: TSpeedButton;
SpeedButton97: TSpeedButton;
Button8: TButton;
Label62: TLabel;
MJQty5: TEdit;
Label63: TLabel;
Label64: TLabel;
MJLen1: TEdit;
Edit15: TEdit;
Label66: TLabel;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
@ -387,6 +394,9 @@ type
procedure Button12Click(Sender: TObject);
procedure SpeedButton19DblClick(Sender: TObject);
procedure Button13Click(Sender: TObject);
procedure MJQty5Change(Sender: TObject);
procedure MJLen1Change(Sender: TObject);
procedure Edit15Click(Sender: TObject);
private
{ Private declarations }
FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer;
@ -423,6 +433,7 @@ type
var
frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF;
newh, newh1: hwnd;
S1: Boolean;
implementation
@ -519,6 +530,29 @@ begin
end;
//procedure TfrmMJManageNewFDNewSF.On1301(var Message: Tmessage);
//var
// i1, i2: integer;
// unitname: string;
// fdata: double;
//begin
// i1 := Message.WParam;
// i2 := Message.LParam;
// if IsJsMessage then
// begin
// if (trim(Edit7.Text) = '¡Ì') then
// begin
// MJLen.Text := format('%.' + trim(fxsws) + 'f', [i1 / 100000]);
// if i2 = 0 then
// Label9.Caption := 'M'
// else
// Label9.Caption := 'Y';
// edit1.Text := format('%.' + trim(fxsws) + 'f', [i1 / 100000]);
// end;
// end;
//
//end;
procedure TfrmMJManageNewFDNewSF.On1301(var Message: Tmessage);
var
i1, i2: integer;
@ -531,12 +565,26 @@ begin
begin
if (trim(Edit7.Text) = '√') then
begin
MJLen.Text := format('%.' + trim(fxsws) + 'f', [i1 / 100000]);
if i1 > 0 then
begin
MJLen.Text := format('%.' + trim(fxsws) + 'f', [i1 / 100000]);
end
else
begin
MJlen1.text := MJLen.Text;
end;
if i2 = 0 then
Label9.Caption := 'M'
else
Label9.Caption := 'Y';
edit1.Text := format('%.' + trim(fxsws) + 'f', [i1 / 100000]);
if S1 = true then
begin
if i1 = 0 then
begin
BTPrint.Click;
end;
end;
end;
end;
@ -718,6 +766,7 @@ begin
Edit9.Visible := true;
Label44.Visible := true;
end;
S1 := False;
end;
procedure TfrmMJManageNewFDNewSF.InitJP();
@ -1107,6 +1156,7 @@ begin
FieldByName('YS').Value := Trim(YS.Text);
FieldByName('HX').Value := Trim(HX.Text);
FieldByName('SH').Value := Trim(SH.Text);
if Edit12.Text <> '' then
begin
FieldByName('DingMaFlag').Value := '定长';
@ -1129,6 +1179,7 @@ begin
FieldByName('MJQty2').Value := StrToFloatdef(trim(MJQty2.Text), 0);
FieldByName('MJQty3').Value := StrToFloatdef(trim(MJQty3.Text), 0);
FieldByName('MJQty4').Value := StrToFloatdef(trim(MJQty4.Text), 0) + fjZ;
FieldByName('MJQty5').Value := StrToFloatdef(trim(MJQty5.Text), 0);
if Trim(MJFK.Text) <> '' then
begin
FieldByName('MJFK').Value := MJFK.Text;
@ -1652,7 +1703,7 @@ var
mvalue1: integer;
i: Integer;
begin
S1 := False;
if (strtofloatdef(trim(MJLen.Text), 0) = 0) and (strtofloatdef(trim(mjqty4.Text), 0) = 0) then
begin
application.MessageBox('长度或者重量不能都为零!', '提示信息', 0);
@ -1873,21 +1924,18 @@ begin
CDS_MJID.EnableControls;
exit;
end;
try
try
Moudle := LoadLibrary('MakeQRBarcode.dll');
@Makebar := GetProcAddress(Moudle, 'Make');
@Mixtext := GetProcAddress(Moudle, 'MixText');
Txt1 := '&' + Trim(ADOQueryPrint.fieldbyname('PRTcodename').AsString) + '&' + Trim(ADOQueryPrint.fieldbyname('SH').AsString)
+'&' + Trim(ADOQueryPrint.fieldbyname('MJFK').AsString) + '&' + Trim(ADOQueryPrint.fieldbyname('MJSJKZ').AsString)
+ '&' + Trim(ADOQueryPrint.fieldbyname('MJStr4').AsString)
+ '&' + RightStr(('10000' + trim(ADOQueryPrint.fieldbyName('MJXH').AsString)), 4) + '&' + Trim(ADOQueryPrint.fieldbyname('MJMaoZ').AsString);
Txt1 := '&' + Trim(ADOQueryPrint.fieldbyname('PRTcodename').AsString) + '&' + Trim(ADOQueryPrint.fieldbyname('SH').AsString) + '&' + Trim(ADOQueryPrint.fieldbyname('MJFK').AsString) + '&' + Trim(ADOQueryPrint.fieldbyname('MJSJKZ').AsString) + '&' + Trim(ADOQueryPrint.fieldbyname('MJStr4').AsString) + '&' + RightStr(('10000' + trim(ADOQueryPrint.fieldbyName('MJXH').AsString)), 4) + '&' + Trim(ADOQueryPrint.fieldbyname('MJMaoZ').AsString);
fImagePath1 := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image1')) then
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image1'), nil);
if FileExists(fImagePath1) then
DeleteFile(fImagePath1);
Makebar(pchar(Txt1), Length(Txt1), 3, 3, 0, PChar(fImagePath1), 3);
except
except
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
CDS_MJID.EnableControls;
exit;
@ -1908,7 +1956,7 @@ begin
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ADOQueryPrint1.fieldbyname('Slbname').AsString);
ExportFtErpFile(Trim(ADOQueryPrint1.fieldbyname('Slbname').AsString), ADOCmd);
end
else
else
begin
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\通用标签.rmf';
ExportFtErpFile('通用标签.rmf', ADOCmd);
@ -2513,6 +2561,7 @@ begin
YS.Text := Trim(ADOTmp.fieldbyname('PRTColor').AsString);
HX.Text := Trim(ADOTmp.fieldbyname('PRTHX').AsString);
SH.Text := Trim(ADOTmp.fieldbyname('SOrddefstr1').AsString);
MJQty5.Text := FloatToStr(ADOTmp.fieldbyname('jiazhong').AsFloat);
FAPID := Trim(ADOTmp.fieldbyname('SubId').AsString);
FMainId := Trim(ADOTmp.fieldbyname('MainId').AsString);
@ -2563,7 +2612,7 @@ begin
baoid.Text := FBaoID;
Edit3.Text := '√';
Edit4.Text := '';
MJStr4.Text :=Trim(ADOTmp.fieldbyname('GangHao').AsString);
MJStr4.Text := Trim(ADOTmp.fieldbyname('GangHao').AsString);
end
else
begin
@ -3351,5 +3400,39 @@ begin
end;
end;
procedure TfrmMJManageNewFDNewSF.MJQty5Change(Sender: TObject);
var
MaoZValue, Qty4Value, Qty5Value: Double;
begin
MaoZValue := StrToFloatDef(MJMaoZ.Text, 0);
Qty4Value := StrToFloatDef(MJQty4.Text, 0);
Qty5Value := StrToFloatDef(MJQty5.Text, 0);
MJMaoZ.Text := FloatToStr(MaoZValue + Qty5Value);
MJQty4.Text := FloatToStr(Qty4Value + Qty5Value);
end;
procedure TfrmMJManageNewFDNewSF.MJLen1Change(Sender: TObject);
begin
if (StrToFloatdef((MJLen1.text), 0) >= 3) and (Edit15.text = '¡Ì') then
begin
S1 := true;
end;
end;
procedure TfrmMJManageNewFDNewSF.Edit15Click(Sender: TObject);
begin
if Trim(Edit15.Text) = '' then
begin
Edit15.Text := '¡Ì';
end
else
begin
Edit15.Text := '';
S1 := false;
end;
end;
end.