This commit is contained in:
DESKTOP-E401PHE\Administrator 2026-06-26 16:12:57 +08:00
parent 05592aa5a8
commit 065fe95d46
7 changed files with 450 additions and 75 deletions

View File

@ -101,7 +101,7 @@ DebugSourceDirs=
UsePackages=0 UsePackages=0
[Parameters] [Parameters]
RunParams= RunParams=
HostApplication=D:\郑丰平开发代码\项目代码\新东方\检验管理\testDll.exe HostApplication=D:\Dp7Repo\项目代码\D7djXinDongfang\检验管理\testDll.exe
Launcher= Launcher=
UseLauncher=0 UseLauncher=0
DebugCWD= DebugCWD=

View File

@ -0,0 +1,50 @@
[ExpressSkins]
Default=1
ShowNotifications=1
Enabled=1
dxSkinBlack=1
dxSkinBlue=1
dxSkinBlueprint=1
dxSkinCaramel=1
dxSkinCoffee=1
dxSkinDarkRoom=1
dxSkinDarkSide=1
dxSkinDevExpressDarkStyle=1
dxSkinDevExpressStyle=1
dxSkinFoggy=1
dxSkinGlassOceans=1
dxSkinHighContrast=1
dxSkiniMaginary=1
dxSkinLilian=1
dxSkinLiquidSky=1
dxSkinLondonLiquidSky=1
dxSkinMcSkin=1
dxSkinMetropolis=1
dxSkinMetropolisDark=1
dxSkinMoneyTwins=1
dxSkinOffice2007Black=1
dxSkinOffice2007Blue=1
dxSkinOffice2007Green=1
dxSkinOffice2007Pink=1
dxSkinOffice2007Silver=1
dxSkinOffice2010Black=1
dxSkinOffice2010Blue=1
dxSkinOffice2010Silver=1
dxSkinOffice2013DarkGray=1
dxSkinOffice2013LightGray=1
dxSkinOffice2013White=1
dxSkinPumpkin=1
dxSkinSeven=1
dxSkinSevenClassic=1
dxSkinSharp=1
dxSkinSharpPlus=1
dxSkinSilver=1
dxSkinSpringTime=1
dxSkinStardust=1
dxSkinSummer2008=1
dxSkinTheAsphaltWorld=1
dxSkinsDefaultPainters=1
dxSkinValentine=1
dxSkinVS2010=1
dxSkinWhiteprint=1
dxSkinXmas2008Blue=1

View File

@ -77,7 +77,9 @@ begin
pswd := 'rightsoft@123'; pswd := 'rightsoft@123';
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server; DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
DConString := DataBaseStr;
if trim(DataBaseStr) <> '' then
DConString := DataBaseStr;
// DParameters1:='¸ßȨÏÞ'; // DParameters1:='¸ßȨÏÞ';
// DCode:='002'; // DCode:='002';
// DName:='ADMIN'; // DName:='ADMIN';

View File

@ -1,6 +1,6 @@
object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Left = 236 Left = 248
Top = 65 Top = 263
Width = 1265 Width = 1265
Height = 738 Height = 738
Caption = #25104#21697#26816#39564 Caption = #25104#21697#26816#39564
@ -1113,7 +1113,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
TabOrder = 3 TabOrder = 3
object Label9: TLabel object Label9: TLabel
Left = 156 Left = 156
Top = 92 Top = 89
Width = 15 Width = 15
Height = 22 Height = 22
Caption = 'M' Caption = 'M'
@ -1127,7 +1127,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label3: TLabel object Label3: TLabel
Left = 148 Left = 148
Top = 450 Top = 441
Width = 26 Width = 26
Height = 22 Height = 22
Caption = 'cm' Caption = 'cm'
@ -1140,7 +1140,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label4: TLabel object Label4: TLabel
Left = 156 Left = 156
Top = 205 Top = 202
Width = 28 Width = 28
Height = 22 Height = 22
Caption = 'KG' Caption = 'KG'
@ -1153,7 +1153,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label5: TLabel object Label5: TLabel
Left = 15 Left = 15
Top = 92 Top = 89
Width = 40 Width = 40
Height = 23 Height = 23
Caption = #38271#24230 Caption = #38271#24230
@ -1166,7 +1166,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label6: TLabel object Label6: TLabel
Left = 10 Left = 10
Top = 454 Top = 442
Width = 40 Width = 40
Height = 23 Height = 23
Caption = #24133#23485 Caption = #24133#23485
@ -1179,7 +1179,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label11: TLabel object Label11: TLabel
Left = 15 Left = 15
Top = 205 Top = 202
Width = 40 Width = 40
Height = 23 Height = 23
Caption = #27611#37325 Caption = #27611#37325
@ -1192,7 +1192,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label10: TLabel object Label10: TLabel
Left = 11 Left = 11
Top = 319 Top = 316
Width = 40 Width = 40
Height = 23 Height = 23
Caption = #27491#21697 Caption = #27491#21697
@ -1205,7 +1205,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label12: TLabel object Label12: TLabel
Left = 96 Left = 96
Top = 319 Top = 316
Width = 40 Width = 40
Height = 22 Height = 22
Caption = #27425#21697 Caption = #27425#21697
@ -1245,7 +1245,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label15: TLabel object Label15: TLabel
Left = 60 Left = 60
Top = 211 Top = 208
Width = 5 Width = 5
Height = 22 Height = 22
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
@ -1258,7 +1258,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label22: TLabel object Label22: TLabel
Left = 144 Left = 144
Top = 497 Top = 475
Width = 36 Width = 36
Height = 22 Height = 22
Caption = 'g/'#13217 Caption = 'g/'#13217
@ -1270,8 +1270,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
ParentFont = False ParentFont = False
end end
object Label23: TLabel object Label23: TLabel
Left = 15 Left = 11
Top = 496 Top = 475
Width = 40 Width = 40
Height = 23 Height = 23
Caption = #20811#37325 Caption = #20811#37325
@ -1284,7 +1284,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label27: TLabel object Label27: TLabel
Left = 15 Left = 15
Top = 243 Top = 240
Width = 40 Width = 40
Height = 23 Height = 23
Caption = #36192#36865 Caption = #36192#36865
@ -1310,7 +1310,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label26: TLabel object Label26: TLabel
Left = 11 Left = 11
Top = 361 Top = 358
Width = 40 Width = 40
Height = 22 Height = 22
Caption = #20986#32440 Caption = #20986#32440
@ -1337,7 +1337,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label30: TLabel object Label30: TLabel
Left = 15 Left = 15
Top = 130 Top = 127
Width = 40 Width = 40
Height = 23 Height = 23
Caption = #30382#37325 Caption = #30382#37325
@ -1350,7 +1350,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label31: TLabel object Label31: TLabel
Left = 156 Left = 156
Top = 167 Top = 164
Width = 28 Width = 28
Height = 22 Height = 22
Caption = 'KG' Caption = 'KG'
@ -1363,7 +1363,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label32: TLabel object Label32: TLabel
Left = 15 Left = 15
Top = 167 Top = 164
Width = 40 Width = 40
Height = 23 Height = 23
Caption = #20928#37325 Caption = #20928#37325
@ -1376,7 +1376,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label33: TLabel object Label33: TLabel
Left = 156 Left = 156
Top = 130 Top = 127
Width = 28 Width = 28
Height = 22 Height = 22
Caption = 'KG' Caption = 'KG'
@ -1389,7 +1389,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label34: TLabel object Label34: TLabel
Left = 94 Left = 94
Top = 364 Top = 361
Width = 40 Width = 40
Height = 22 Height = 22
Caption = #20221#25968 Caption = #20221#25968
@ -1402,7 +1402,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label36: TLabel object Label36: TLabel
Left = 15 Left = 15
Top = 16 Top = 14
Width = 40 Width = 40
Height = 23 Height = 23
Caption = #21367#21495 Caption = #21367#21495
@ -1415,7 +1415,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label37: TLabel object Label37: TLabel
Left = 16 Left = 16
Top = 54 Top = 52
Width = 40 Width = 40
Height = 23 Height = 23
Caption = #32568#21495 Caption = #32568#21495
@ -1428,7 +1428,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label39: TLabel object Label39: TLabel
Left = 15 Left = 15
Top = 285 Top = 282
Width = 40 Width = 40
Height = 23 Height = 23
Caption = #31995#25968 Caption = #31995#25968
@ -1493,7 +1493,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label47: TLabel object Label47: TLabel
Left = 94 Left = 94
Top = 406 Top = 403
Width = 40 Width = 40
Height = 22 Height = 22
Caption = #21367#25968 Caption = #21367#25968
@ -1506,7 +1506,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label48: TLabel object Label48: TLabel
Left = 11 Left = 11
Top = 405 Top = 402
Width = 40 Width = 40
Height = 22 Height = 22
Caption = #22810#21367 Caption = #22810#21367
@ -1519,9 +1519,10 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object MJFK: TEdit object MJFK: TEdit
Left = 55 Left = 55
Top = 440 Top = 437
Width = 90 Width = 90
Height = 41 Height = 33
AutoSize = False
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -32 Font.Height = -32
@ -1534,7 +1535,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object MJLen: TEdit object MJLen: TEdit
Left = 61 Left = 61
Top = 83 Top = 80
Width = 90 Width = 90
Height = 37 Height = 37
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1552,7 +1553,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object MJMaoZ: TEdit object MJMaoZ: TEdit
Left = 61 Left = 61
Top = 197 Top = 194
Width = 90 Width = 90
Height = 37 Height = 37
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1569,7 +1570,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object BTPrint: TButton object BTPrint: TButton
Left = 2 Left = 2
Top = 528 Top = 511
Width = 83 Width = 83
Height = 57 Height = 57
Caption = #25552#20132 Caption = #25552#20132
@ -1583,10 +1584,10 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnClick = BTPrintClick OnClick = BTPrintClick
end end
object Button5: TButton object Button5: TButton
Left = 103 Left = 96
Top = 528 Top = 505
Width = 83 Width = 90
Height = 57 Height = 42
Caption = #37325#25171 Caption = #37325#25171
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -1599,7 +1600,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Edit3: TEdit object Edit3: TEdit
Left = 56 Left = 56
Top = 313 Top = 310
Width = 39 Width = 39
Height = 43 Height = 43
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1616,7 +1617,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Edit4: TEdit object Edit4: TEdit
Left = 134 Left = 134
Top = 313 Top = 310
Width = 40 Width = 40
Height = 43 Height = 43
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1649,9 +1650,10 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object MJSJKZ: TEdit object MJSJKZ: TEdit
Left = 55 Left = 55
Top = 484 Top = 471
Width = 90 Width = 90
Height = 41 Height = 33
AutoSize = False
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -32 Font.Height = -32
@ -1664,7 +1666,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object MJQty2: TEdit object MJQty2: TEdit
Left = 61 Left = 61
Top = 235 Top = 232
Width = 90 Width = 90
Height = 37 Height = 37
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1698,7 +1700,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Edit6: TEdit object Edit6: TEdit
Left = 56 Left = 56
Top = 355 Top = 352
Width = 40 Width = 40
Height = 43 Height = 43
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1732,7 +1734,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object MJQty3: TEdit object MJQty3: TEdit
Left = 61 Left = 61
Top = 121 Top = 118
Width = 90 Width = 90
Height = 37 Height = 37
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1749,7 +1751,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object MJQty4: TEdit object MJQty4: TEdit
Left = 61 Left = 61
Top = 159 Top = 156
Width = 90 Width = 90
Height = 37 Height = 37
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1766,7 +1768,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object ComboBox1: TComboBox object ComboBox1: TComboBox
Left = 136 Left = 136
Top = 356 Top = 353
Width = 45 Width = 45
Height = 37 Height = 37
Style = csDropDownList Style = csDropDownList
@ -1789,7 +1791,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object MJStr4: TEdit object MJStr4: TEdit
Left = 61 Left = 61
Top = 44 Top = 42
Width = 90 Width = 90
Height = 37 Height = 37
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1806,7 +1808,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object MJXH: TEdit object MJXH: TEdit
Left = 61 Left = 61
Top = 6 Top = 4
Width = 90 Width = 90
Height = 37 Height = 37
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1821,7 +1823,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object kmxs: TEdit object kmxs: TEdit
Left = 97 Left = 97
Top = 273 Top = 270
Width = 90 Width = 90
Height = 37 Height = 37
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1890,8 +1892,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
TabOrder = 10 TabOrder = 10
end end
object Button7: TButton object Button7: TButton
Left = 90 Left = 94
Top = 592 Top = 551
Width = 94 Width = 94
Height = 37 Height = 37
Caption = #25171#21253#26631#31614 Caption = #25171#21253#26631#31614
@ -1902,12 +1904,11 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Font.Style = [fsBold] Font.Style = [fsBold]
ParentFont = False ParentFont = False
TabOrder = 26 TabOrder = 26
Visible = False
OnClick = Button7Click OnClick = Button7Click
end end
object Edit10: TEdit object Edit10: TEdit
Left = 56 Left = 56
Top = 397 Top = 394
Width = 40 Width = 40
Height = 43 Height = 43
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1923,7 +1924,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object ComboBox2: TComboBox object ComboBox2: TComboBox
Left = 136 Left = 136
Top = 398 Top = 395
Width = 45 Width = 45
Height = 37 Height = 37
Style = csDropDownList Style = csDropDownList
@ -1947,7 +1948,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object ComboBox3: TComboBox object ComboBox3: TComboBox
Left = 4 Left = 4
Top = 276 Top = 273
Width = 93 Width = 93
Height = 28 Height = 28
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -2981,8 +2982,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object DataSource2: TDataSource object DataSource2: TDataSource
DataSet = CDS_MJCD DataSet = CDS_MJCD
Left = 724 Left = 740
Top = 65520
end end
object CDS_MJCD: TClientDataSet object CDS_MJCD: TClientDataSet
Aggregates = <> Aggregates = <>

View File

@ -10,7 +10,20 @@ uses
cxControls, cxGridCustomView, cxGrid, RM_Common, RM_Class, RM_GridReport, cxControls, cxGridCustomView, cxGrid, RM_Common, RM_Class, RM_GridReport,
RM_System, RM_Dataset, ADODB, DBClient, cxGridCustomPopupMenu, cxGridPopupMenu, RM_System, RM_Dataset, ADODB, DBClient, cxGridCustomPopupMenu, cxGridPopupMenu,
ExtCtrls, ComCtrls, ToolWin, cxTextEdit, Buttons, cxSplitter, cxCheckBox, ExtCtrls, ComCtrls, ToolWin, cxTextEdit, Buttons, cxSplitter, cxCheckBox,
MovePanel, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator; MovePanel, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee,
dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven,
dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint,
dxSkinXmas2008Blue, dxSkinscxPCPainter;
type type
TfrmMJManageNewFDNewSF = class(TForm) TfrmMJManageNewFDNewSF = class(TForm)
@ -316,7 +329,7 @@ type
{ Private declarations } { Private declarations }
FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer; FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer;
FColumn, FBanZu, FAPID, FMainId, FSubId, FFFMJID, FFType: string; FColumn, FBanZu, FAPID, FMainId, FSubId, FFFMJID, FFType: string;
fRollType: string; fRollType, fbaotype, fbaosx: string;
isCommopen, IsJsMessage: boolean; isCommopen, IsJsMessage: boolean;
MValue, FCDName: string; MValue, FCDName: string;
fxsws, fxsws1: string; fxsws, fxsws1: string;
@ -332,6 +345,7 @@ type
procedure AddCDNew(Fbtn: TSpeedButton); procedure AddCDNew(Fbtn: TSpeedButton);
procedure SavedataCK(); procedure SavedataCK();
procedure PrtData(FMJID: string); procedure PrtData(FMJID: string);
procedure PrtBaoData(FBaoid: string);
procedure OpenCom(DllName: string); procedure OpenCom(DllName: string);
procedure CloseCom(DllName: string); procedure CloseCom(DllName: string);
procedure On1201(var Message: Tmessage); message 1201; procedure On1201(var Message: Tmessage); message 1201;
@ -353,6 +367,79 @@ uses
U_DataLink, U_Fun, U_ZDYHelp, U_iniParam, U_ClothHCList; U_DataLink, U_Fun, U_ZDYHelp, U_iniParam, U_ClothHCList;
{$R *.dfm} {$R *.dfm}
procedure TfrmMJManageNewFDNewSF.PrtBaoData(FBaoid: string);
var
fPrintFile: string;
Txt, fImagePath: string;
Moudle: THandle;
Makebar: TMakebar;
Mixtext: TMixtext;
i: Integer;
begin
if CDS_MJID.IsEmpty then
exit;
CDS_MJID.First;
with ADOQueryPrint do
begin
Close;
SQL.Clear;
SQL.Add('exec P_Print_Bao @Baoid=''' + Trim(FBaoid) + ''' ');
Open;
end;
if ADOQueryPrint.RecordCount > 1 then
begin
Application.MessageBox('打包错误,请重新打包!', '提示', 0);
Exit;
end;
if ADOQueryPrint.RecordCount < 1 then
begin
Application.MessageBox('此包号还未被保存,请保存数据,在打印条码!', '提示', 0);
Exit;
end;
try
Moudle := LoadLibrary('MakeQRBarcode.dll');
@Makebar := GetProcAddress(Moudle, 'Make');
@Mixtext := GetProcAddress(Moudle, 'MixText');
Txt := trim(FBaoid);
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
if FileExists(fImagePath) then
DeleteFile(fImagePath);
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
except
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
exit;
end;
if Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) <> '' then
begin
ExportFtErpFile(Trim(ADOQueryPrint.fieldbyname('NLBName').AsString), ADOCmd);
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ADOQueryPrint.fieldbyname('NLBName').AsString)
end
else
begin
ExportFtErpFile('包标签.rmf', ADOCmd);
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\包标签.rmf';
end;
if not FileExists(fPrintFile) then
begin
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
Exit;
end;
if FileExists(fPrintFile) then
begin
RMVariables['QRBARCODE'] := fImagePath;
RM2.LoadFromFile(fPrintFile);
RM2.DefaultCopies := 1;
//RM2.ShowReport;
RM2.printReport;
end;
end;
procedure TfrmMJManageNewFDNewSF.On1301(var Message: Tmessage); procedure TfrmMJManageNewFDNewSF.On1301(var Message: Tmessage);
var var
i1, i2: integer; i1, i2: integer;
@ -1047,7 +1134,7 @@ begin
FieldByName('MJStr1').Value := Trim(Label13.Caption); FieldByName('MJStr1').Value := Trim(Label13.Caption);
FieldByName('MBXS').Value := Trim(MBXS.Text); FieldByName('MBXS').Value := Trim(MBXS.Text);
if (MBXS.Text <> '') and (MBXS.Text<>'0') then if (MBXS.Text <> '') and (MBXS.Text <> '0') then
begin begin
FieldByName('MJLen').Value := StrToFloat(format('%.' + trim(fxsws) + 'f', [(StrToFloatdef(trim(MJLen.Text), 0) - StrToFloatdef(trim(MJQty2.Text), 0)) / StrToFloatDef(MBXS.Text, 1)])); FieldByName('MJLen').Value := StrToFloat(format('%.' + trim(fxsws) + 'f', [(StrToFloatdef(trim(MJLen.Text), 0) - StrToFloatdef(trim(MJQty2.Text), 0)) / StrToFloatDef(MBXS.Text, 1)]));
end end
@ -1098,6 +1185,11 @@ begin
FieldByName('MJTypeOther').Value := Trim(Label9.Caption); FieldByName('MJTypeOther').Value := Trim(Label9.Caption);
FieldByName('note').Value := Trim(note.Text); FieldByName('note').Value := Trim(note.Text);
if trim(fbaotype) = '手动打包' then
begin
FieldByName('baoNO').Value := Trim(baono.text);
FieldByName('baoID').Value := Trim(baoID.Text);
end;
// FieldByName('baoNO').Value:=Trim(baono.text); // FieldByName('baoNO').Value:=Trim(baono.text);
// FieldByName('baoID').Value:=Trim(baoID.Text); // FieldByName('baoID').Value:=Trim(baoID.Text);
Post; Post;
@ -1145,7 +1237,6 @@ begin
end; end;
end end
else else
begin begin
with ADOCmd do with ADOCmd do
@ -1241,7 +1332,32 @@ begin
sql.Add('where MJID=''' + Trim(FMJID) + ''' '); sql.Add('where MJID=''' + Trim(FMJID) + ''' ');
execsql; execsql;
end; end;
if (fbaotype = '手动打包') or (fbaotype = '') or (PState = 2) then
begin
end
else
begin
with ADOCmd do
begin
Close;
sql.Clear;
sql.Add('exec P_Update_Bao ''' + trim(FMJID) + ''' ');
if fbaotype = '单卷单包' then
begin
sql.Add(',1 ');
end
else if fbaotype = '多卷单色' then
begin
sql.Add(',2 ');
end
else if fbaotype = '多卷混色' then
begin
sql.Add(',3 ');
end;
execsql;
end;
end;
//SavedataCK(); //SavedataCK();
ADOCmd.Connection.CommitTrans; ADOCmd.Connection.CommitTrans;
Result := True; Result := True;
@ -1500,6 +1616,42 @@ begin
PrtData(FFFMJID); PrtData(FFFMJID);
//end; //end;
end; end;
if Trim(Edit6.Text) = '√' then
begin
if (fbaotype = '手动打包') or (fbaotype = '') then
begin
end
else
begin
with ADOCmd do
begin
Close;
sql.Clear;
sql.Add('exec P_View_Baoid ''' + trim(FFFMJID) + ''' ');
sql.Add(',''' + trim(FMainId) + ''' ,''' + trim(FSubId) + ''' ');
if fbaotype = '单卷单包' then
begin
sql.Add(' ,1 ');
end;
if fbaotype = '多卷单色' then
begin
sql.Add(' ,2 ');
end;
if fbaotype = '多卷混色' then
begin
sql.Add(' ,3 ');
end;
Open;
end;
if trim(ADOCmd.FieldByName('baoid').AsString) <> '' then
begin
PrtBaoData(ADOCmd.fieldbyname('baoid').AsString);
end;
end;
end;
end; end;
end; end;
@ -2249,8 +2401,7 @@ begin
FMainId := Trim(ADOTmp.fieldbyname('MainId').AsString); FMainId := Trim(ADOTmp.fieldbyname('MainId').AsString);
FSubId := Trim(ADOTmp.fieldbyname('SubId').AsString); FSubId := Trim(ADOTmp.fieldbyname('SubId').AsString);
FKJ := ADOTmp.fieldbyname('PRTKJ').AsFloat; FKJ := ADOTmp.fieldbyname('PRTKJ').AsFloat;
AOrdDefNote1.Text := '包装要求:' + #13 + Trim(ADOTmp.fieldbyname('MPRTBZNote').AsString) + #13 AOrdDefNote1.Text := '包装要求:' + #13 + Trim(ADOTmp.fieldbyname('MPRTBZNote').AsString) + #13 //+'封条:'+Trim(ADOTmp.fieldbyname('MPRTYaoFeng').AsString)+#13
//+'封条:'+Trim(ADOTmp.fieldbyname('MPRTYaoFeng').AsString)+#13
//+'烫金:'+Trim(ADOTmp.fieldbyname('MPRTTangJin').AsString)+#13 //+'烫金:'+Trim(ADOTmp.fieldbyname('MPRTTangJin').AsString)+#13
//+'开剪:'+Trim(ADOTmp.fieldbyname('MPRTKaiJian').AsString)+#13 //+'开剪:'+Trim(ADOTmp.fieldbyname('MPRTKaiJian').AsString)+#13
// +'门幅:'+Trim(ADOTmp.fieldbyname('PRTMF').AsString)+#13 // +'门幅:'+Trim(ADOTmp.fieldbyname('PRTMF').AsString)+#13
@ -2264,6 +2415,8 @@ begin
if ADOTmp.FieldByName('PRTKZ').AsFloat > 0 then if ADOTmp.FieldByName('PRTKZ').AsFloat > 0 then
MJSJKZ.Text := Trim(ADOTmp.fieldbyname('PRTKZ').AsString); MJSJKZ.Text := Trim(ADOTmp.fieldbyname('PRTKZ').AsString);
MJXH.Text := inttostr(ADOTmp.fieldbyname('maxMJxh').AsInteger + 1); MJXH.Text := inttostr(ADOTmp.fieldbyname('maxMJxh').AsInteger + 1);
fbaotype := Trim(ADOTmp.fieldbyname('baotype').AsString);
fbaosx := Trim(ADOTmp.fieldbyname('baosx').AsString);
fxsws := Trim(ADOTmp.fieldbyname('xsws').AsString); fxsws := Trim(ADOTmp.fieldbyname('xsws').AsString);
fxsws1 := Trim(ADOTmp.fieldbyname('xsws1').AsString); fxsws1 := Trim(ADOTmp.fieldbyname('xsws1').AsString);
@ -2416,12 +2569,10 @@ begin
MJXH.Text := Trim(fieldbyname('maxRoll').AsString); MJXH.Text := Trim(fieldbyname('maxRoll').AsString);
end; end;
end end
else if fRollType = '无规则生成' then else if fRollType = '无规则生成' then
begin begin
end end
else else
begin begin
with ADOCmd do with ADOCmd do

View File

@ -1,6 +1,6 @@
object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
Left = 141 Left = 147
Top = 88 Top = 196
Width = 1378 Width = 1378
Height = 754 Height = 754
Caption = #26631#31614#35774#32622 Caption = #26631#31614#35774#32622
@ -129,16 +129,24 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
ImageIndex = 60 ImageIndex = 60
OnClick = ToolButton9Click OnClick = ToolButton9Click
end end
object ToolButton7: TToolButton object ToolButton11: TToolButton
Left = 261 Left = 261
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #27599#21253#21367#25968
ImageIndex = 60
OnClick = ToolButton11Click
end
object ToolButton7: TToolButton
Left = 348
Top = 30
AutoSize = True
Caption = #39044#35272#21367#26631#31614 Caption = #39044#35272#21367#26631#31614
ImageIndex = 12 ImageIndex = 12
OnClick = ToolButton7Click OnClick = ToolButton7Click
end end
object ToolButton8: TToolButton object ToolButton8: TToolButton
Left = 360 Left = 447
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #39044#35272#21253#26631#31614 Caption = #39044#35272#21253#26631#31614
@ -146,7 +154,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
OnClick = ToolButton8Click OnClick = ToolButton8Click
end end
object PiZhong: TEdit object PiZhong: TEdit
Left = 459 Left = 546
Top = 30 Top = 30
Width = 121 Width = 121
Height = 30 Height = 30
@ -159,7 +167,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
TabOrder = 0 TabOrder = 0
end end
object TBClose: TToolButton object TBClose: TToolButton
Left = 580 Left = 667
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #20851#38381 Caption = #20851#38381
@ -413,7 +421,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
Align = alTop Align = alTop
TabOrder = 2 TabOrder = 2
object Tv1: TcxGridDBTableView object Tv1: TcxGridDBTableView
NavigatorButtons.ConfirmDelete = False Navigator.Buttons.CustomButtons = <>
OnCellDblClick = Tv1CellDblClick OnCellDblClick = Tv1CellDblClick
DataController.DataSource = DataSource1 DataController.DataSource = DataSource1
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
@ -594,6 +602,34 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
DataBinding.FieldName = 'KJ' DataBinding.FieldName = 'KJ'
HeaderAlignmentHorz = taCenter HeaderAlignmentHorz = taCenter
end end
object Tv1Column1: TcxGridDBColumn
Caption = #25171#21253#26041#24335
DataBinding.FieldName = 'baotype'
PropertiesClassName = 'TcxComboBoxProperties'
Properties.Items.Strings = (
''
#21333#21367#21333#21253
#25163#21160#25171#21253
#22810#21367#21333#33394)
Properties.OnEditValueChanged = Tv1Column1PropertiesEditValueChanged
Width = 60
end
object Tv1Column2: TcxGridDBColumn
Caption = #27599#21253#21367#25968
DataBinding.FieldName = 'JS'
Width = 60
end
object Tv1Column3: TcxGridDBColumn
Caption = #21253#21495#39034#24207
DataBinding.FieldName = 'baosx'
PropertiesClassName = 'TcxComboBoxProperties'
Properties.Items.Strings = (
#25353#39068#33394#29983#25104
#25353#35746#21333#29983#25104
#25353#32568#21495#29983#25104)
Properties.OnEditValueChanged = Tv1Column3PropertiesEditValueChanged
Width = 60
end
end end
object cxGrid1Level1: TcxGridLevel object cxGrid1Level1: TcxGridLevel
GridView = Tv1 GridView = Tv1

View File

@ -10,7 +10,22 @@ uses
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
cxGridDBTableView, cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, cxGridDBTableView, cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter,
RM_Dataset, RM_System, RM_Common, RM_Class, RM_GridReport, RM_e_Xls,StrUtils, RM_Dataset, RM_System, RM_Common, RM_Class, RM_GridReport, RM_e_Xls,StrUtils,
Menus, cxDropDownEdit,cxTextEdit; Menus, cxDropDownEdit,cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters,
dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans,
dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter,
cxNavigator;
type type
TfrmProductOrderLBNameSet = class(TForm) TfrmProductOrderLBNameSet = class(TForm)
@ -95,6 +110,10 @@ type
ToolButton9: TToolButton; ToolButton9: TToolButton;
v1Column7: TcxGridDBColumn; v1Column7: TcxGridDBColumn;
ToolButton10: TToolButton; ToolButton10: TToolButton;
Tv1Column1: TcxGridDBColumn;
Tv1Column2: TcxGridDBColumn;
Tv1Column3: TcxGridDBColumn;
ToolButton11: TToolButton;
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);
@ -131,6 +150,9 @@ type
procedure ToolButton8Click(Sender: TObject); procedure ToolButton8Click(Sender: TObject);
procedure ToolButton9Click(Sender: TObject); procedure ToolButton9Click(Sender: TObject);
procedure ToolButton10Click(Sender: TObject); procedure ToolButton10Click(Sender: TObject);
procedure Tv1Column3PropertiesEditValueChanged(Sender: TObject);
procedure Tv1Column1PropertiesEditValueChanged(Sender: TObject);
procedure ToolButton11Click(Sender: TObject);
private private
DQdate:TDateTime; DQdate:TDateTime;
procedure InitGrid(); procedure InitGrid();
@ -1084,4 +1106,118 @@ begin
end; end;
end; end;
procedure TfrmProductOrderLBNameSet.Tv1Column3PropertiesEditValueChanged(
Sender: TObject);
var
mvalues: string;
begin
mvalues := TCXTextEdit(Sender).Text;
with Order_Main do
begin
edit;
fieldbyname('baosx').Value := mvalues;
post;
end;
tv1.Controller.EditingController.ShowEdit();
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('Update JYOrder_Main Set baosx=''' + trim(mvalues) + ''' ');
sql.Add('where Mainid=''' + Trim(Order_Main.fieldbyname('Mainid').AsString) + '''');
ExecSQL;
end;
end;
procedure TfrmProductOrderLBNameSet.Tv1Column1PropertiesEditValueChanged(
Sender: TObject);
var
mvalues: string;
begin
mvalues := TCXTextEdit(Sender).Text;
with Order_Main do
begin
edit;
fieldbyname('baotype').Value := mvalues;
post;
end;
tv1.Controller.EditingController.ShowEdit();
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('Update JYOrder_Main Set baotype=''' + trim(mvalues) + ''' ');
sql.Add('where Mainid=''' + Trim(Order_Main.fieldbyname('Mainid').AsString) + '''');
ExecSQL;
end;
end;
procedure TfrmProductOrderLBNameSet.ToolButton11Click(Sender: TObject);
var
FPiZhong: string;
FReal: Double;
begin
if Order_Main.IsEmpty then
exit;
if Order_Main.Locate('SSel', True, []) = False then
begin
Application.MessageBox('没有选择数据!', '提示', 0);
Exit;
end;
if Trim(PiZhong.Text) = '' then
begin
Application.MessageBox('每包卷数不能为空!', '提示', 0);
Exit;
end;
if TryStrToFloat(PiZhong.Text, FReal) = False then
begin
Application.MessageBox('每包卷数非法数字!', '提示', 0);
Exit;
end;
with order_Main do
begin
first;
while not Eof do
begin
if order_Main.FieldByName('Ssel').AsBoolean = true then
begin
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('Update JYOrder_Sub Set JS=' + Trim(PiZhong.Text));
sql.Add(' where Subid=''' + Trim(Order_Main.fieldbyname('Subid').AsString) + '''');
ExecSQL;
end;
with Order_Main do
begin
Edit;
FieldByName('JS').Value := PiZhong.Text;
Post;
end;
end;
next;
end;
end;
CheckBox1.Checked := False;
with Order_Main do
begin
DisableControls;
first;
while not Eof do
begin
edit;
fieldbyname('Ssel').AsBoolean := False;
post;
next;
end;
first;
EnableControls;
end;
end;
end. end.