This commit is contained in:
DESKTOP-E401PHE\Administrator 2025-07-10 16:28:49 +08:00
parent 9cd0bad875
commit 39d4199a39
10 changed files with 958 additions and 106 deletions

View File

@ -115,9 +115,9 @@ object frmClothHCList: TfrmClothHCList
object Label9: TLabel object Label9: TLabel
Left = 384 Left = 384
Top = 22 Top = 22
Width = 53 Width = 47
Height = 12 Height = 12
Caption = #21512' '#21516' '#21495 Caption = #23458' '#25143
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -12 Font.Height = -12
@ -230,7 +230,7 @@ object frmClothHCList: TfrmClothHCList
TabOrder = 4 TabOrder = 4
OnChange = OrderNoMChange OnChange = OrderNoMChange
end end
object conNo: TEdit object CustomerNoName: TEdit
Tag = 2 Tag = 2
Left = 440 Left = 440
Top = 18 Top = 18

View File

@ -1,8 +1,8 @@
unit U_ClothHCList; unit U_ClothHCList;
interface interface
uses uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData, Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB, cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
@ -11,7 +11,20 @@ uses
cxGridDBTableView, cxGrid, DBClient, cxCalendar, cxButtonEdit, cxSplitter, cxGridDBTableView, cxGrid, DBClient, cxCalendar, cxButtonEdit, cxSplitter,
RM_Common, RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, RM_Common, RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport,
cxTextEdit, cxDropDownEdit, cxCheckBox, cxLookAndFeels, cxTextEdit, cxDropDownEdit, cxCheckBox, cxLookAndFeels,
cxLookAndFeelPainters, cxNavigator; 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
TfrmClothHCList = class(TForm) TfrmClothHCList = class(TForm)
@ -43,7 +56,7 @@ type
V2KHOrderNo: TcxGridDBColumn; V2KHOrderNo: TcxGridDBColumn;
V2Column14: TcxGridDBColumn; V2Column14: TcxGridDBColumn;
SubID: TEdit; SubID: TEdit;
conNo: TEdit; CustomerNoName: TEdit;
Label9: TLabel; Label9: TLabel;
V2Column15: TcxGridDBColumn; V2Column15: TcxGridDBColumn;
V2Column16: TcxGridDBColumn; V2Column16: TcxGridDBColumn;

View File

@ -1,7 +1,7 @@
unit U_GetDllForm; unit U_GetDllForm;
interface interface
uses uses
Windows, Messages, forms, OleCtnrs, DateUtils, SysUtils, ADODB, inifiles, Windows, Messages, forms, OleCtnrs, DateUtils, SysUtils, ADODB, inifiles,
dxCore, ActiveX; dxCore, ActiveX;

View File

@ -243,13 +243,14 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
object ToolButton12: TToolButton object ToolButton12: TToolButton
Left = 785 Left = 785
Top = 30 Top = 30
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 = 904 Left = 872
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #24322#24120#25968#25454 Caption = #24322#24120#25968#25454
@ -257,7 +258,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
OnClick = ToolButton9Click OnClick = ToolButton9Click
end end
object TBExport: TToolButton object TBExport: TToolButton
Left = 991 Left = 959
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #23548#20986 Caption = #23548#20986
@ -265,13 +266,21 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
OnClick = TBExportClick OnClick = TBExportClick
end end
object TBClose: TToolButton object TBClose: TToolButton
Left = 1054 Left = 1022
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #20851#38381 Caption = #20851#38381
ImageIndex = 55 ImageIndex = 55
OnClick = TBCloseClick OnClick = TBCloseClick
end end
object ToolButton15: TToolButton
Left = 1085
Top = 30
AutoSize = True
Caption = #25209#37327#20462#25913
ImageIndex = 56
OnClick = ToolButton15Click
end
end end
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
@ -1173,6 +1182,12 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
HeaderAlignmentHorz = taCenter HeaderAlignmentHorz = taCenter
Width = 70 Width = 70
end end
object Tv1Column8: TcxGridDBColumn
Caption = #24037#33402
DataBinding.FieldName = 'GY'
HeaderAlignmentHorz = taCenter
Width = 60
end
end end
object cxGrid1Level1: TcxGridLevel object cxGrid1Level1: TcxGridLevel
GridView = Tv1 GridView = Tv1
@ -2006,6 +2021,240 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
OnClick = Edit6Click OnClick = Edit6Click
end end
end end
object Panel15: TPanel
Left = 784
Top = 208
Width = 425
Height = 305
Color = clSkyBlue
TabOrder = 15
Visible = False
object Label40: TLabel
Left = 45
Top = 37
Width = 34
Height = 16
Caption = #23458#25143
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
Visible = False
end
object Label41: TLabel
Left = 45
Top = 76
Width = 34
Height = 16
Caption = #21697#21517
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label42: TLabel
Left = 53
Top = 117
Width = 34
Height = 16
Caption = #39068#33394
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label44: TLabel
Left = 54
Top = 156
Width = 34
Height = 16
Caption = #24037#33402
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label45: TLabel
Left = 51
Top = 200
Width = 34
Height = 16
Caption = #33394#21495
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Button17: TButton
Left = 64
Top = 246
Width = 76
Height = 41
Caption = #30830#23450
TabOrder = 0
OnClick = Button17Click
end
object Button18: TButton
Left = 264
Top = 246
Width = 81
Height = 41
Caption = #20851#38381
TabOrder = 1
OnClick = Button18Click
end
object FKH: TEdit
Left = 93
Top = 32
Width = 187
Height = 24
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = []
ParentFont = False
TabOrder = 2
Visible = False
end
object FPM: TEdit
Left = 93
Top = 71
Width = 187
Height = 24
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = []
ParentFont = False
TabOrder = 3
end
object FYS: TEdit
Left = 93
Top = 113
Width = 187
Height = 24
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = []
ParentFont = False
TabOrder = 4
end
object Button19: TButton
Left = 283
Top = 27
Width = 101
Height = 35
Caption = #36873#25321#23458#25143
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = 20
Font.Name = #24494#36719#38597#40657
Font.Style = [fsBold]
ParentFont = False
TabOrder = 5
Visible = False
end
object Button20: TButton
Left = 283
Top = 68
Width = 101
Height = 35
Caption = #36873#25321#21697#21517
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = 20
Font.Name = #24494#36719#38597#40657
Font.Style = [fsBold]
ParentFont = False
TabOrder = 6
OnClick = Button20Click
end
object Button21: TButton
Left = 283
Top = 108
Width = 101
Height = 35
Caption = #36873#25321#39068#33394
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = 20
Font.Name = #24494#36719#38597#40657
Font.Style = [fsBold]
ParentFont = False
TabOrder = 7
OnClick = Button21Click
end
object FGY: TEdit
Left = 93
Top = 152
Width = 187
Height = 24
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = []
ParentFont = False
TabOrder = 8
end
object Button22: TButton
Left = 283
Top = 147
Width = 101
Height = 35
Caption = #36873#25321#24037#33402
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = 20
Font.Name = #24494#36719#38597#40657
Font.Style = [fsBold]
ParentFont = False
TabOrder = 9
OnClick = Button22Click
end
object FSH: TEdit
Left = 90
Top = 196
Width = 187
Height = 24
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = []
ParentFont = False
TabOrder = 10
end
object Button23: TButton
Left = 280
Top = 191
Width = 101
Height = 35
Caption = #36873#25321#33394#21495
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = 20
Font.Name = #24494#36719#38597#40657
Font.Style = [fsBold]
ParentFont = False
TabOrder = 11
OnClick = Button23Click
end
end
object cxGridPopupMenu1: TcxGridPopupMenu object cxGridPopupMenu1: TcxGridPopupMenu
Grid = cxGrid1 Grid = cxGrid1
PopupMenus = <> PopupMenus = <>

View File

@ -238,6 +238,26 @@ type
Tv1Column5: TcxGridDBColumn; Tv1Column5: TcxGridDBColumn;
Tv1Column6: TcxGridDBColumn; Tv1Column6: TcxGridDBColumn;
Tv1Column7: TcxGridDBColumn; Tv1Column7: TcxGridDBColumn;
Tv1Column8: TcxGridDBColumn;
ToolButton15: TToolButton;
Panel15: TPanel;
Label40: TLabel;
Label41: TLabel;
Label42: TLabel;
Label44: TLabel;
Label45: TLabel;
Button17: TButton;
Button18: TButton;
FKH: TEdit;
FPM: TEdit;
FYS: TEdit;
Button19: TButton;
Button20: TButton;
Button21: TButton;
FGY: TEdit;
Button22: TButton;
FSH: TEdit;
Button23: TButton;
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 +323,13 @@ type
procedure Button16Click(Sender: TObject); procedure Button16Click(Sender: TObject);
procedure Button15Click(Sender: TObject); procedure Button15Click(Sender: TObject);
procedure Edit6Click(Sender: TObject); procedure Edit6Click(Sender: TObject);
procedure ToolButton15Click(Sender: TObject);
procedure Button17Click(Sender: TObject);
procedure Button20Click(Sender: TObject);
procedure Button21Click(Sender: TObject);
procedure Button22Click(Sender: TObject);
procedure Button23Click(Sender: TObject);
procedure Button18Click(Sender: TObject);
// procedure Edit5Click(Sender: TObject); // procedure Edit5Click(Sender: TObject);
// procedure CheckBox3Click(Sender: TObject); // procedure CheckBox3Click(Sender: TObject);
private private
@ -328,7 +355,7 @@ var
implementation implementation
uses uses
U_DataLink, U_OrderInPut, U_Fun, U_MJEdit, U_CPDBAO, U_MJSJFX; U_DataLink, U_OrderInPut, U_Fun, U_MJEdit, U_CPDBAO, U_MJSJFX, U_SCPersonColor;
{$R *.dfm} {$R *.dfm}
procedure TfrmJYOrderCDOne.JSbaoNum(); procedure TfrmJYOrderCDOne.JSbaoNum();
@ -1643,7 +1670,7 @@ begin
with ADOQueryTemp do with ADOQueryTemp do
begin begin
Close; Close;
sql.Clear; sql.Clear;
sql.add('exec P_Print_CKMDYDL_L '); sql.add('exec P_Print_CKMDYDL_L ');
sql.add('@DName=' + quotedstr(Trim(DCode))); sql.add('@DName=' + quotedstr(Trim(DCode)));
Open; Open;
@ -2370,5 +2397,151 @@ 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);
begin
if Order_Main.IsEmpty then
Exit;
if Order_Main.Locate('SSel', True, []) = False 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
with ADOQueryCmd do
begin
Close;
sql.Clear;
// if trim(Fkh.text) <> '' then
// begin
// sql.Add('Update WFB_MJJY Set CustomerNoName=''' + trim(FKH.Text) + ''' ');
// sql.Add('where MJID=''' + Trim(Order_Main.fieldbyname('MJID').AsString) + '''');
// end;
if trim(FPM.text) <> '' then
begin
sql.Add('Update WFB_MJJY Set PRTCodeName=''' + trim(FPM.Text) + ''' ');
sql.Add('where MJID=''' + Trim(Order_Main.fieldbyname('MJID').AsString) + '''');
end;
if trim(FYS.text) <> '' then
begin
sql.Add('Update WFB_MJJY Set PRTColor=''' + trim(FYS.Text) + ''' ');
sql.Add('where MJID=''' + Trim(Order_Main.fieldbyname('MJID').AsString) + '''');
end;
if trim(FGY.text) <> '' then
begin
sql.Add('Update WFB_MJJY Set GY=''' + trim(FGY.Text) + ''' ');
sql.Add('where MJID=''' + Trim(Order_Main.fieldbyname('MJID').AsString) + '''');
end;
if trim(FSH.text) <> '' then
begin
sql.Add('Update WFB_MJJY Set SH=''' + trim(FSH.Text) + ''' ');
sql.Add('where MJID=''' + Trim(Order_Main.fieldbyname('MJID').AsString) + '''');
end;
ExecSQL;
end;
end;
Next;
end;
end;
ADOQueryCmd.Connection.CommitTrans;
Order_Main.EnableControls;
application.MessageBox('数据保存成功!', '提示信息');
Panel15.Visible := false;
TBRafresh.Click;
except
ADOQueryCmd.Connection.RollbackTrans;
Order_Main.EnableControls;
application.MessageBox('数据保存失败!', '提示信息', 0);
end;
end;
procedure TfrmJYOrderCDOne.Button20Click(Sender: TObject);
begin
try
frmSCPersonColor := TfrmSCPersonColor.Create(self);
with frmSCPersonColor do
begin
FTYPE := 'PM';
if ShowModal = 1 then
begin
FPM.Text := FName;
end;
end;
finally
frmSCPersonColor.close;
end;
end;
procedure TfrmJYOrderCDOne.Button21Click(Sender: TObject);
begin
try
frmSCPersonColor := TfrmSCPersonColor.Create(self);
with frmSCPersonColor do
begin
FTYPE := 'YS';
if ShowModal = 1 then
begin
FYS.Text := FName;
end;
end;
finally
frmSCPersonColor.close;
end;
end;
procedure TfrmJYOrderCDOne.Button22Click(Sender: TObject);
begin
try
frmSCPersonColor := TfrmSCPersonColor.Create(self);
with frmSCPersonColor do
begin
FTYPE := 'GY';
if ShowModal = 1 then
begin
FGY.Text := FName;
end;
end;
finally
frmSCPersonColor.close;
end;
end;
procedure TfrmJYOrderCDOne.Button23Click(Sender: TObject);
begin
try
frmSCPersonColor := TfrmSCPersonColor.Create(self);
with frmSCPersonColor do
begin
FTYPE := 'SH';
if ShowModal = 1 then
begin
FSH.Text := FName;
end;
end;
finally
frmSCPersonColor.close;
end;
end;
procedure TfrmJYOrderCDOne.Button18Click(Sender: TObject);
begin
Panel15.Visible := false;
end;
end. end.

View File

@ -1,6 +1,6 @@
object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Left = 540 Left = 143
Top = 169 Top = 200
Width = 1368 Width = 1368
Height = 754 Height = 754
Caption = #25104#21697#26816#39564 Caption = #25104#21697#26816#39564
@ -1177,8 +1177,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Visible = False Visible = False
end end
object Label14: TLabel object Label14: TLabel
Left = 291 Left = 395
Top = 426 Top = 362
Width = 60 Width = 60
Height = 23 Height = 23
Caption = #21407#25968#37327 Caption = #21407#25968#37327
@ -1205,7 +1205,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label22: TLabel object Label22: TLabel
Left = 144 Left = 144
Top = 424 Top = 416
Width = 36 Width = 36
Height = 22 Height = 22
Caption = 'g/'#13217 Caption = 'g/'#13217
@ -1218,7 +1218,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label23: TLabel object Label23: TLabel
Left = 8 Left = 8
Top = 423 Top = 415
Width = 42 Width = 42
Height = 20 Height = 20
Caption = #20811#37325 Caption = #20811#37325
@ -1230,8 +1230,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
ParentFont = False ParentFont = False
end end
object Label27: TLabel object Label27: TLabel
Left = 227 Left = 331
Top = 549 Top = 381
Width = 40 Width = 40
Height = 23 Height = 23
Caption = #36192#36865 Caption = #36192#36865
@ -1257,8 +1257,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
ParentFont = False ParentFont = False
end end
object Label29: TLabel object Label29: TLabel
Left = 300 Left = 404
Top = 414 Top = 350
Width = 58 Width = 58
Height = 23 Height = 23
Caption = #26588' '#21495 Caption = #26588' '#21495
@ -1375,8 +1375,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
ParentFont = False ParentFont = False
end end
object Label40: TLabel object Label40: TLabel
Left = 216 Left = 320
Top = 487 Top = 423
Width = 80 Width = 80
Height = 22 Height = 22
Caption = #26579#21378#32568#21495 Caption = #26579#21378#32568#21495
@ -1389,8 +1389,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Visible = False Visible = False
end end
object Label28: TLabel object Label28: TLabel
Left = 202 Left = 354
Top = 404 Top = 572
Width = 42 Width = 42
Height = 20 Height = 20
Caption = #21253#21495 Caption = #21253#21495
@ -1403,8 +1403,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Visible = False Visible = False
end end
object Label53: TLabel object Label53: TLabel
Left = 151 Left = 165
Top = 8 Top = 14
Width = 105 Width = 105
Height = 20 Height = 20
Caption = #25351#31034#21333#23458#25143 Caption = #25351#31034#21333#23458#25143
@ -1416,8 +1416,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
ParentFont = False ParentFont = False
end end
object Label55: TLabel object Label55: TLabel
Left = 208 Left = 223
Top = 175 Top = 213
Width = 42 Width = 42
Height = 20 Height = 20
Caption = #39068#33394 Caption = #39068#33394
@ -1429,8 +1429,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
ParentFont = False ParentFont = False
end end
object Label57: TLabel object Label57: TLabel
Left = 208 Left = 222
Top = 83 Top = 89
Width = 42 Width = 42
Height = 20 Height = 20
Caption = #24037#33402 Caption = #24037#33402
@ -1442,8 +1442,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
ParentFont = False ParentFont = False
end end
object Label58: TLabel object Label58: TLabel
Left = 208 Left = 223
Top = 131 Top = 174
Width = 42 Width = 42
Height = 20 Height = 20
Caption = #27454#21495 Caption = #27454#21495
@ -1455,8 +1455,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
ParentFont = False ParentFont = False
end end
object Label59: TLabel object Label59: TLabel
Left = 208 Left = 223
Top = 263 Top = 296
Width = 42 Width = 42
Height = 20 Height = 20
Caption = #26631#31614 Caption = #26631#31614
@ -1468,8 +1468,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
ParentFont = False ParentFont = False
end end
object Label60: TLabel object Label60: TLabel
Left = 208 Left = 223
Top = 223 Top = 256
Width = 42 Width = 42
Height = 20 Height = 20
Caption = #33394#21495 Caption = #33394#21495
@ -1507,8 +1507,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
ParentFont = False ParentFont = False
end end
object Label45: TLabel object Label45: TLabel
Left = 160 Left = 174
Top = 47 Top = 53
Width = 84 Width = 84
Height = 20 Height = 20
Caption = #26631#31614#23458#25143 Caption = #26631#31614#23458#25143
@ -1519,11 +1519,25 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Font.Style = [fsBold] Font.Style = [fsBold]
ParentFont = False ParentFont = False
end end
object Label62: TLabel
Left = 223
Top = 130
Width = 42
Height = 20
Caption = #21697#21517
Font.Charset = ANSI_CHARSET
Font.Color = clBlue
Font.Height = -20
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object MJFK: TEdit object MJFK: TEdit
Left = 51 Left = 51
Top = 377 Top = 377
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
@ -1568,10 +1582,10 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnKeyPress = MJstr3KeyPress OnKeyPress = MJstr3KeyPress
end end
object BTPrint: TButton object BTPrint: TButton
Left = 10 Left = 6
Top = 460 Top = 443
Width = 171 Width = 163
Height = 93 Height = 56
Caption = #25552#20132 Caption = #25552#20132
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -1616,8 +1630,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnKeyPress = MJstr3KeyPress OnKeyPress = MJstr3KeyPress
end end
object MJQty1: TEdit object MJQty1: TEdit
Left = 361 Left = 465
Top = 417 Top = 353
Width = 90 Width = 90
Height = 41 Height = 41
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1634,9 +1648,10 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object MJSJKZ: TEdit object MJSJKZ: TEdit
Left = 51 Left = 51
Top = 418 Top = 410
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
@ -1648,8 +1663,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnKeyPress = MJstr3KeyPress OnKeyPress = MJstr3KeyPress
end end
object MJQty2: TEdit object MJQty2: TEdit
Left = 281 Left = 385
Top = 548 Top = 380
Width = 90 Width = 90
Height = 36 Height = 36
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1683,8 +1698,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnKeyPress = MJstr3KeyPress OnKeyPress = MJstr3KeyPress
end end
object MJstr3: TEdit object MJstr3: TEdit
Left = 369 Left = 473
Top = 409 Top = 345
Width = 90 Width = 90
Height = 41 Height = 41
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1805,8 +1820,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnKeyPress = MJstr3KeyPress OnKeyPress = MJstr3KeyPress
end end
object MJstr5: TEdit object MJstr5: TEdit
Left = 301 Left = 405
Top = 478 Top = 414
Width = 90 Width = 90
Height = 41 Height = 41
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1822,8 +1837,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnKeyPress = MJstr3KeyPress OnKeyPress = MJstr3KeyPress
end end
object baoNo: TEdit object baoNo: TEdit
Left = 249 Left = 393
Top = 397 Top = 573
Width = 90 Width = 90
Height = 36 Height = 36
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1838,8 +1853,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnKeyPress = MJstr3KeyPress OnKeyPress = MJstr3KeyPress
end end
object BaoID: TEdit object BaoID: TEdit
Left = 275 Left = 395
Top = 384 Top = 552
Width = 121 Width = 121
Height = 20 Height = 20
TabOrder = 10 TabOrder = 10
@ -1861,8 +1876,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnClick = Button7Click OnClick = Button7Click
end end
object KH: TBtnEditA object KH: TBtnEditA
Left = 256 Left = 270
Top = 0 Top = 6
Width = 145 Width = 145
Height = 37 Height = 37
AutoSize = False AutoSize = False
@ -1875,9 +1890,9 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
TabOrder = 21 TabOrder = 21
OnBtnClick = KHBtnClick OnBtnClick = KHBtnClick
end end
object PM: TBtnEditA object GY: TBtnEditA
Left = 256 Left = 270
Top = 78 Top = 84
Width = 145 Width = 145
Height = 37 Height = 37
AutoSize = False AutoSize = False
@ -1892,8 +1907,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnBtnClick = V1PRTCodeNameBtnClick OnBtnClick = V1PRTCodeNameBtnClick
end end
object YS: TBtnEditA object YS: TBtnEditA
Left = 256 Left = 271
Top = 166 Top = 204
Width = 145 Width = 145
Height = 37 Height = 37
AutoSize = False AutoSize = False
@ -1908,8 +1923,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnBtnClick = YSBtnClick OnBtnClick = YSBtnClick
end end
object kuanno: TBtnEditA object kuanno: TBtnEditA
Left = 256 Left = 271
Top = 122 Top = 165
Width = 145 Width = 145
Height = 37 Height = 37
AutoSize = False AutoSize = False
@ -1924,8 +1939,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnBtnClick = kuannoBtnClick OnBtnClick = kuannoBtnClick
end end
object SH: TBtnEditA object SH: TBtnEditA
Left = 256 Left = 271
Top = 210 Top = 243
Width = 145 Width = 145
Height = 37 Height = 37
AutoSize = False AutoSize = False
@ -1940,8 +1955,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnBtnClick = SHBtnClick OnBtnClick = SHBtnClick
end end
object SLbName: TFTComboBox object SLbName: TFTComboBox
Left = 256 Left = 271
Top = 254 Top = 287
Width = 185 Width = 185
Height = 32 Height = 32
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -1963,8 +1978,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
#20869#38144#26631#31614'5') #20869#38144#26631#31614'5')
end end
object Button9: TButton object Button9: TButton
Left = 384 Left = 398
Top = 0 Top = 6
Width = 65 Width = 65
Height = 38 Height = 38
Caption = #36873#25321#23458#25143 Caption = #36873#25321#23458#25143
@ -1978,8 +1993,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnClick = Button9Click OnClick = Button9Click
end end
object Button10: TButton object Button10: TButton
Left = 384 Left = 398
Top = 74 Top = 80
Width = 65 Width = 65
Height = 38 Height = 38
Caption = #36873#25321#24037#33402 Caption = #36873#25321#24037#33402
@ -1993,8 +2008,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnClick = Button10Click OnClick = Button10Click
end end
object Button11: TButton object Button11: TButton
Left = 384 Left = 399
Top = 162 Top = 203
Width = 65 Width = 65
Height = 38 Height = 38
Caption = #36873#25321#39068#33394 Caption = #36873#25321#39068#33394
@ -2008,8 +2023,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnClick = Button11Click OnClick = Button11Click
end end
object Button12: TButton object Button12: TButton
Left = 384 Left = 399
Top = 210 Top = 245
Width = 65 Width = 65
Height = 38 Height = 38
Caption = #36873#25321#33394#21495 Caption = #36873#25321#33394#21495
@ -2023,8 +2038,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnClick = Button12Click OnClick = Button12Click
end end
object Button13: TButton object Button13: TButton
Left = 384 Left = 399
Top = 122 Top = 162
Width = 65 Width = 65
Height = 38 Height = 38
Caption = #36873#25321#27454#21495 Caption = #36873#25321#27454#21495
@ -2054,8 +2069,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnKeyPress = MJstr3KeyPress OnKeyPress = MJstr3KeyPress
end end
object bqkh: TBtnEditA object bqkh: TBtnEditA
Left = 256 Left = 270
Top = 40 Top = 46
Width = 145 Width = 145
Height = 37 Height = 37
AutoSize = False AutoSize = False
@ -2069,8 +2084,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnBtnClick = KHBtnClick OnBtnClick = KHBtnClick
end end
object Button5: TButton object Button5: TButton
Left = 384 Left = 398
Top = 40 Top = 46
Width = 65 Width = 65
Height = 38 Height = 38
Caption = #36873#25321#23458#25143 Caption = #36873#25321#23458#25143
@ -2083,6 +2098,67 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
TabOrder = 34 TabOrder = 34
OnClick = Button5Click OnClick = Button5Click
end end
object PM: TBtnEditA
Left = 271
Top = 125
Width = 145
Height = 37
AutoSize = False
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -28
Font.Name = #23435#20307
Font.Style = []
ParentFont = False
TabOrder = 35
OnKeyPress = MJstr3KeyPress
OnBtnClick = V1PRTCodeNameBtnClick
end
object Button14: TButton
Left = 399
Top = 121
Width = 65
Height = 38
Caption = #36873#25321#21697#21517
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = 20
Font.Name = #24494#36719#38597#40657
Font.Style = [fsBold]
ParentFont = False
TabOrder = 36
OnClick = Button14Click
end
object Button15: TButton
Left = 98
Top = 500
Width = 88
Height = 53
Caption = #25552#20132#37325#37327
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 37
OnClick = Button15Click
end
object Button16: TButton
Left = 4
Top = 501
Width = 86
Height = 50
Caption = #25552#20132#31859#25968
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 38
OnClick = Button16Click
end
end end
object MovePanel1: TMovePanel object MovePanel1: TMovePanel
Left = 910 Left = 910
@ -2486,8 +2562,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
end end
object Panel3: TPanel object Panel3: TPanel
Left = 610 Left = 595
Top = 332 Top = 308
Width = 353 Width = 353
Height = 334 Height = 334
BevelInner = bvRaised BevelInner = bvRaised
@ -3890,4 +3966,11 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Top = 544 Top = 544
ReportData = {} ReportData = {}
end end
object ADOQuery1: TADOQuery
Connection = DataLink_TradeManage.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 224
Top = 372
end
end end

View File

@ -265,7 +265,7 @@ type
KH: TBtnEditA; KH: TBtnEditA;
Label54: TLabel; Label54: TLabel;
Label55: TLabel; Label55: TLabel;
PM: TBtnEditA; GY: TBtnEditA;
Label56: TLabel; Label56: TLabel;
Label57: TLabel; Label57: TLabel;
YS: TBtnEditA; YS: TBtnEditA;
@ -320,6 +320,12 @@ type
bqkh: TBtnEditA; bqkh: TBtnEditA;
Button5: TButton; Button5: TButton;
Tv3Column6: TcxGridDBColumn; Tv3Column6: TcxGridDBColumn;
Label62: TLabel;
PM: TBtnEditA;
Button14: TButton;
Button15: TButton;
Button16: TButton;
ADOQuery1: TADOQuery;
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);
@ -394,12 +400,15 @@ type
procedure SpeedButton19DblClick(Sender: TObject); procedure SpeedButton19DblClick(Sender: TObject);
procedure Button13Click(Sender: TObject); procedure Button13Click(Sender: TObject);
procedure Button5Click(Sender: TObject); procedure Button5Click(Sender: TObject);
procedure Button14Click(Sender: TObject);
procedure Button15Click(Sender: TObject);
procedure Button16Click(Sender: TObject);
private private
{ Private declarations } { Private declarations }
FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer; FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer;
FColumn, FBanZu, FAPID, FMainId, FSubId, FFFMJID: string; FColumn, FBanZu, FAPID, FMainId, FSubId, FFFMJID, FFFMJID1, Fzlmjid, Fzlmjxh: string;
FJZ, FJC, FDC: Double; FJZ, FJC, FDC: Double;
fRollType, fRollType1, fbaotype, fbaosx: string; fRollType, fRollType1, fbaotype, fbaosx, Ftj: string;
isCommopen, IsJsMessage: boolean; isCommopen, IsJsMessage: boolean;
MValue, FCDName, MggCDFalg: string; MValue, FCDName, MggCDFalg: string;
fxsws, fxsws1: string; fxsws, fxsws1: string;
@ -680,7 +689,7 @@ procedure TfrmMJManageNewFDNewSF.InitCDGridID();
begin begin
with ADOQueryMain do with ADOQueryMain do
begin begin
Close; Close;
SQL.Clear; SQL.Clear;
sql.Add('select '); sql.Add('select ');
//sql.Add('Case when isnull(MJType,'''')=''次品'' then ''B''+RTrim(Cast(MJXH as varchar(20))) else Cast(MJXH as varchar(20)) end as MJXH ,'); //sql.Add('Case when isnull(MJType,'''')=''次品'' then ''B''+RTrim(Cast(MJXH as varchar(20))) else Cast(MJXH as varchar(20)) end as MJXH ,');
@ -979,6 +988,8 @@ begin
FMJID := '' FMJID := ''
else if PState = 2 then else if PState = 2 then
FMJID := Trim(CDS_MJID.fieldbyname('MJID').AsString) FMJID := Trim(CDS_MJID.fieldbyname('MJID').AsString)
else if PState = 33 then
FMJID := Trim(Fzlmjid)
else if PState < 1 then else if PState < 1 then
Exit; Exit;
@ -1108,11 +1119,21 @@ begin
FieldByName('MJstr3').Value := Trim(MJstr3.Text); FieldByName('MJstr3').Value := Trim(MJstr3.Text);
FieldByName('MJstr4').Value := Trim(MJstr4.Text); FieldByName('MJstr4').Value := Trim(MJstr4.Text);
FieldByName('MJstr5').Value := Trim(MJstr5.Text); FieldByName('MJstr5').Value := Trim(MJstr5.Text);
FieldByName('mjxh').Value := Trim(mjxh.Text); // FieldByName('mjxh').Value := Trim(mjxh.Text);
if (PState = 33) then
begin
FieldByName('mjxh').value := Trim(Fzlmjxh);
end
else
begin
FieldByName('mjxh').value := Trim(mjxh.Text);
end;
// FieldByName('BaoNO').Value := Trim(BaoNO.Text); // FieldByName('BaoNO').Value := Trim(BaoNO.Text);
FieldByName('MJTypeOther').Value := Trim(Label9.Caption); FieldByName('MJTypeOther').Value := Trim(Label9.Caption);
FieldByName('MJStr1').Value := Trim(Label13.Caption); FieldByName('MJStr1').Value := Trim(Label13.Caption);
FieldByName('GY').Value := Trim(GY.Text);
FieldByName('PM').Value := Trim(PM.Text); FieldByName('PM').Value := Trim(PM.Text);
FieldByName('KH').Value := Trim(KH.Text); FieldByName('KH').Value := Trim(KH.Text);
FieldByName('BQKH').Value := Trim(bqkh.Text); FieldByName('BQKH').Value := Trim(bqkh.Text);
@ -1142,15 +1163,23 @@ begin
FieldByName('MJQty1').Value := StrToFloatdef(trim(MJQty1.Text), 0); FieldByName('MJQty1').Value := StrToFloatdef(trim(MJQty1.Text), 0);
FieldByName('MJQty2').Value := StrToFloatdef(trim(MJQty2.Text), 0); FieldByName('MJQty2').Value := StrToFloatdef(trim(MJQty2.Text), 0);
FieldByName('MJQty3').Value := StrToFloatdef(trim(MJQty3.Text), 0); FieldByName('MJQty3').Value := StrToFloatdef(trim(MJQty3.Text), 0);
FieldByName('MJQty4').Value := StrToFloatdef(trim(MJQty4.Text), 0) + fjZ; if (PState = 2) or (Ftj = '提交') or (PState = 33) then
begin
FieldByName('MJQty4').value := StrToFloatdef(trim(MJQty4.Text), 0) + fjZ;
if Trim(MJMaoZ.Text) <> '' then
begin
FieldByName('MJMaoZ').value := StrToFloat(MJMaoZ.Text) + fjz;
end;
end;
// FieldByName('MJQty4').Value := StrToFloatdef(trim(MJQty4.Text), 0) + fjZ;
if Trim(MJFK.Text) <> '' then if Trim(MJFK.Text) <> '' then
begin begin
FieldByName('MJFK').Value := MJFK.Text; FieldByName('MJFK').Value := MJFK.Text;
end; end;
if Trim(MJMaoZ.Text) <> '' then // if Trim(MJMaoZ.Text) <> '' then
begin // begin
FieldByName('MJMaoZ').Value := StrToFloat(MJMaoZ.Text) + fjz; // FieldByName('MJMaoZ').Value := StrToFloat(MJMaoZ.Text) + fjz;
end; // end;
if Trim(MJSJKZ.Text) <> '' then if Trim(MJSJKZ.Text) <> '' then
begin begin
FieldByName('MJSJKZ').Value := MJSJKZ.Text; FieldByName('MJSJKZ').Value := MJSJKZ.Text;
@ -1638,6 +1667,7 @@ begin
ADOCmd.Connection.RollbackTrans; ADOCmd.Connection.RollbackTrans;
Application.MessageBox('保存失败!', '提示', 0); Application.MessageBox('保存失败!', '提示', 0);
end; end;
Ftj := '';
end; end;
procedure TfrmMJManageNewFDNewSF.BTAddClick(Sender: TObject); procedure TfrmMJManageNewFDNewSF.BTAddClick(Sender: TObject);
@ -1666,7 +1696,7 @@ var
mvalue1: integer; mvalue1: integer;
i: Integer; i: Integer;
begin begin
Ftj := '提交';
if (strtofloatdef(trim(MJLen.Text), 0) = 0) and (strtofloatdef(trim(mjqty4.Text), 0) = 0) then if (strtofloatdef(trim(MJLen.Text), 0) = 0) and (strtofloatdef(trim(mjqty4.Text), 0) = 0) then
begin begin
application.MessageBox('长度或者重量不能都为零!', '提示信息', 0); application.MessageBox('长度或者重量不能都为零!', '提示信息', 0);
@ -1843,7 +1873,7 @@ var
Moudle: THandle; Moudle: THandle;
Makebar: TMakebar; Makebar: TMakebar;
Mixtext: TMixtext; Mixtext: TMixtext;
begin begin
with ADOQueryPrint do with ADOQueryPrint do
begin begin
@ -2543,6 +2573,7 @@ begin
Label2.Caption := '花型:' + Trim(ADOTmp.fieldbyname('PRTHX').AsString); Label2.Caption := '花型:' + Trim(ADOTmp.fieldbyname('PRTHX').AsString);
end; end;
PM.Text := Trim(ADOTmp.fieldbyname('PRTCodeName').AsString); PM.Text := Trim(ADOTmp.fieldbyname('PRTCodeName').AsString);
GY.Text := Trim(ADOTmp.fieldbyname('PRTgy').AsString);
KH.Text := Trim(ADOTmp.fieldbyname('CustomerNoName').AsString); KH.Text := Trim(ADOTmp.fieldbyname('CustomerNoName').AsString);
bqkh.Text := Trim(ADOTmp.fieldbyname('BQCustomer').AsString); bqkh.Text := Trim(ADOTmp.fieldbyname('BQCustomer').AsString);
YS.Text := Trim(ADOTmp.fieldbyname('PRTColor').AsString); YS.Text := Trim(ADOTmp.fieldbyname('PRTColor').AsString);
@ -3194,10 +3225,10 @@ begin
frmSCPersonColor := TfrmSCPersonColor.Create(self); frmSCPersonColor := TfrmSCPersonColor.Create(self);
with frmSCPersonColor do with frmSCPersonColor do
begin begin
FTYPE := 'PM'; FTYPE := 'GY';
if ShowModal = 1 then if ShowModal = 1 then
begin begin
PM.Text := FName; GY.Text := FName;
end; end;
end; end;
finally finally
@ -3403,5 +3434,270 @@ begin
end; end;
end; end;
procedure TfrmMJManageNewFDNewSF.Button14Click(Sender: TObject);
begin
try
frmSCPersonColor := TfrmSCPersonColor.Create(self);
with frmSCPersonColor do
begin
FTYPE := 'PM';
if ShowModal = 1 then
begin
PM.Text := FName;
end;
end;
finally
frmSCPersonColor.close;
end;
end;
procedure TfrmMJManageNewFDNewSF.Button15Click(Sender: TObject);
var
FMJID1: string;
mzlen, jzlen: Double;
fPrintFile: string;
mvalue: Double;
mvalue1: integer;
i: Integer;
begin
begin
// Y1 := false;
PState := 33;
if Edit9.text <> '' then
begin
if (strtofloatdef(trim(MJMaoZ.Text), 0) = 0) then
begin
application.MessageBox('重量不能为零!', '提示信息', 0);
exit;
end;
end;
with ADOQuery1 do
begin
Close;
sql.Clear;
// SQL.Add('select mjid from WFB_MJJY where mainID=''' + Trim(FmainID) + ''' and subID=''' + Trim(FAPID) + ''' and MJQTY4=0 and mjstr4=''' + Trim(mjstr4.text) + ''' and MJxh= (select DISTINCT min(MJXH) from WFB_MJJY where mainID=''' + Trim(FmainID) + ''' and subID=''' + Trim(FAPID) + ''' and MJQTY4=0 and mjstr4=''' + Trim(mjstr4.text) + ''')');
SQL.Add('select mjid,mjxh from WFB_MJJY where mainID=''' + Trim(FmainID) + ''' and subID=''' + Trim(FAPID) + ''' and MJQTY4=0 ');
SQL.Add('and isnull(mjstr4,'''')=''' + Trim(mjstr4.text) + ''' ');
if Trim(Edit13.Text) <> '' then
begin
sql.Add('and FillTime>=getdate()-1');
end;
SQL.Add(' and MJxh= (select DISTINCT min(MJXH) from WFB_MJJY where mainID=''' + Trim(FmainID) + ''' and subID=''' + Trim(FAPID) + ''' ');
if Trim(Edit13.Text) <> '' then
begin
sql.Add('and FillTime>=getdate()-1');
end;
SQL.Add(' and MJQTY4=0 and isnull(mjstr4,'''')=''' + Trim(mjstr4.text) + ''')');
Open;
// showmessage(sql.text);
end;
if Trim(ADOQuery1.fieldbyname('MJID').AsString) = '' then
begin
PState := 1;
application.MessageBox('没有净重为0的数据', '提示');
exit;
end;
FMJID1 := Trim(ADOQuery1.fieldbyname('MJID').AsString);
FFFMJID1 := Trim(ADOQuery1.fieldbyname('MJID').AsString);
Fzlmjid := Trim(ADOQuery1.fieldbyname('MJID').AsString);
Fzlmjxh := Trim(ADOQuery1.fieldbyname('MJXH').AsString);
Button16.Click;
end;
end;
procedure TfrmMJManageNewFDNewSF.Button16Click(Sender: TObject);
var
fPrintFile: string;
mvalue: Double;
mvalue1: integer;
i: Integer;
begin
if Trim(FAPID) = '' then
Exit;
if (strtofloatdef(trim(MJLen.Text), 0) = 0) and (strtofloatdef(trim(mjqty4.Text), 0) = 0) then
begin
application.MessageBox('长度或者重量不能都为零!', '提示信息', 0);
exit;
end;
if trim(MJXH.text) = '' then
begin
application.MessageBox('卷号不能为空', '提示');
exit;
end;
if trim(MJXH.text) = '0' then
begin
application.MessageBox('卷号不能为0', '提示');
exit;
end;
if trim(Label9.Caption) = '' then
begin
Application.MessageBox('长度单位不能为空!', '提示', 0);
Exit;
end;
if Trim(MJQty1.Text) <> '' then
begin
if TryStrToFloat(MJQty1.Text, mvalue) = False then
begin
Application.MessageBox('原码录入错误!', '提示', 0);
Exit;
end;
end;
if Trim(MJMaoZ.Text) <> '' then
begin
if TryStrToFloat(MJMaoZ.Text, mvalue) = False then
begin
Application.MessageBox('重量录入错误!', '提示', 0);
Exit;
end;
end;
if Trim(MJQty2.Text) <> '' then
begin
if TryStrToFloat(MJQty2.Text, mvalue) = False then
begin
Application.MessageBox('赠送米数录入错误!', '提示', 0);
Exit;
end;
end;
// if (strtofloatdef(trim(MJLen.Text), 0) > 200) then
// begin
// application.MessageBox('长度不能大于200', '提示信息', 0);
// exit;
// end;
if Trim(Edit6.Text) <> '' then
begin
with ADOTmp do
begin
Close;
sql.Clear;
sql.Add('select * from JYorder_Sub where Subid=''' + Trim(FSubId) + ''' and isnull(Slbname,'''')<>'''' ');
Open;
end;
if ADOTmp.IsEmpty then
begin
PlaySound('wav\没有设置标签.wav', 0, SND_FILENAME or SND_ASYNC);
Application.MessageBox('没有设置标签', '提示', 0);
Exit;
end
else
begin
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ADOTmp.fieldbyname('Slbname').AsString);
if FileExists(fPrintFile) then
begin
end
else
begin
PlaySound('wav\标签没有找到.wav', 0, SND_FILENAME or SND_ASYNC);
Application.MessageBox('标签没有找到,请尝试重新登录,有可能标签没有上传', '提示', 0);
Exit;
end;
end;
end;
BTPrint.Enabled := False;
Timer1.Enabled := True;
if SaveData() then
begin
MJMaoZ.Text := '';
MJQty1.Text := '';
// MJQty2.Text := '';
// MJQty5.Text := '';
Label15.Caption := '';
MJQty4.Text := '';
if edit10.Text = '√' then
begin
MJXH.Text := inttostr(strTointdef(trim(MJXH.Text), 0) - 1);
end
else
begin
MJXH.Text := inttostr(strTointdef(trim(MJXH.Text), 0) + 1);
end;
if PState = 1 then
begin
PlaySound('wav\正确.wav', 0, SND_FILENAME or SND_ASYNC);
end
else if PState = 2 then
begin
PlaySound('wav\修改成功.wav', 0, SND_FILENAME or SND_ASYNC);
end;
if PState = 2 then
begin
apid.Text := FAPID;
Button3.Click;
end;
end
else
exit;
if ((Trim(Edit7.text) = '√') and (Trim(Edit9.text) = '')) or (PState = 2) or (PState = 33) then
begin
if Trim(Edit6.Text) = '√' then
begin
PrtData(FFFMJID);
end;
end;
// if (Trim(Edit6.Text) = '√') and (PState='33') then
// begin
// PrtData(FFFMJID);
// 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 ADOCmd.FieldByName('baoid').AsString <> '' then
begin
baoNo.Text := inttostr(ADOCmd.fieldbyname('baoNo').AsInteger + 1);
PrtBaoData(ADOCmd.fieldbyname('baoid').AsString);
end;
end;
end;
Label16.Caption := '';
// if (PState <> 33) then
// begin
// if trim(JCYDLL) <> '' then
// clearCom(JCYDLL);
// end;
BTAdd.Click;
MJLen.SetFocus;
MJQty4.OnClick(MJQty4);
end;
end. end.

View File

@ -1717,6 +1717,19 @@ object frmOrderInPut: TfrmOrderInPut
HeaderAlignmentHorz = taCenter HeaderAlignmentHorz = taCenter
Width = 79 Width = 79
end end
object Tv1Column2: TcxGridDBColumn
Caption = #24037#33402
DataBinding.FieldName = 'PRTgy'
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.OnButtonClick = Tv1Column2PropertiesButtonClick
HeaderAlignmentHorz = taCenter
Width = 60
end
object v1Column4: TcxGridDBColumn object v1Column4: TcxGridDBColumn
Caption = #21697#21517#33521#25991 Caption = #21697#21517#33521#25991
DataBinding.FieldName = 'Sorddefstr5' DataBinding.FieldName = 'Sorddefstr5'

View File

@ -192,6 +192,7 @@ type
Tv1Column1: TcxGridDBColumn; Tv1Column1: TcxGridDBColumn;
Label56: TLabel; Label56: TLabel;
BQCustomer: TBtnEditC; BQCustomer: TBtnEditC;
Tv1Column2: TcxGridDBColumn;
procedure TBCloseClick(Sender: TObject); procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure TBSaveClick(Sender: TObject); procedure TBSaveClick(Sender: TObject);
@ -225,6 +226,7 @@ type
procedure v1PRTHXPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer); procedure v1PRTHXPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure v1Column5PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer); procedure v1Column5PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure BQCustomerBtnUpClick(Sender: TObject); procedure BQCustomerBtnUpClick(Sender: TObject);
procedure Tv1Column2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
private private
procedure InitData(); procedure InitData();
procedure ZDYHelp(FButn: TcxButtonEdit; LType: string); procedure ZDYHelp(FButn: TcxButtonEdit; LType: string);
@ -1799,5 +1801,24 @@ begin
end; end;
end; end;
procedure TfrmOrderInPut.Tv1Column2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := 'PRTgy';
flagname := '¹¤ÒÕ';
if ShowModal = 1 then
begin
Self.Order_Sub.Edit;
Self.Order_Sub.FieldByName('PRTgy').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
end;
end;
finally
frmZDYHelp.Free;
end;
end;
end. end.

View File

@ -76,9 +76,9 @@ var
i, j: Integer; i, j: Integer;
begin begin
with ADOTmp do with ADOTmp do
begin begin
Close; Close;
sql.Clear; sql.Clear;
if FTYPE = 'KH' then if FTYPE = 'KH' then
begin begin
sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT zdyname as name,note from kh_zdy where type=''CustomerNoName'')AA'); sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT zdyname as name,note from kh_zdy where type=''CustomerNoName'')AA');
@ -92,6 +92,10 @@ begin
begin begin
sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT zdyname as name,note from kh_zdy where type=''PRTCodeName'')AA'); sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT zdyname as name,note from kh_zdy where type=''PRTCodeName'')AA');
end end
else if FTYPE = 'GY' then
begin
sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT zdyname as name,note from kh_zdy where type=''PRTgy'')AA');
end
else if FTYPE = 'YS' then else if FTYPE = 'YS' then
begin begin
sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT zdyname as name,note from kh_zdy where type=''PRTColor'')AA'); sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT zdyname as name,note from kh_zdy where type=''PRTColor'')AA');