This commit is contained in:
DESKTOP-E401PHE\Administrator 2025-09-29 16:40:01 +08:00
parent 25d7434110
commit 2b9e4b0774
18 changed files with 615 additions and 498 deletions

View File

@ -1,6 +1,6 @@
object frmYMTRKInPut: TfrmYMTRKInPut
Left = -65
Top = 225
Left = 258
Top = 163
Width = 1876
Height = 623
Align = alClient
@ -8,20 +8,20 @@ object frmYMTRKInPut: TfrmYMTRKInPut
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -15
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnClose = FormClose
OnShow = FormShow
PixelsPerInch = 120
TextHeight = 15
PixelsPerInch = 96
TextHeight = 12
object cxGrid2: TcxGrid
Left = 0
Top = 33
Width = 1544
Height = 553
Width = 1609
Height = 559
Align = alClient
TabOrder = 0
object Tv1: TcxGridDBTableView
@ -246,21 +246,19 @@ object frmYMTRKInPut: TfrmYMTRKInPut
Tag = 2
Caption = #25968#37327
DataBinding.FieldName = 'Qty'
PropertiesClassName = 'TcxTextEditProperties'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.DisplayFormat = '0.00;'
Properties.OnEditValueChanged = Tv1PricePropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Width = 85
end
object Tv1Column2: TcxGridDBColumn
Tag = 2
Caption = #21333#20215
DataBinding.FieldName = 'Price'
HeaderAlignmentHorz = taCenter
Width = 63
end
object Tv1Column3: TcxGridDBColumn
Tag = 2
Caption = #37325#37327
DataBinding.FieldName = 'KGQty'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.DisplayFormat = '0.00;'
Properties.OnEditValueChanged = Tv1PricePropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Width = 80
end
@ -277,23 +275,6 @@ object frmYMTRKInPut: TfrmYMTRKInPut
HeaderAlignmentHorz = taCenter
Width = 77
end
object v1Column16: TcxGridDBColumn
Tag = 2
Caption = #26469#33258#24037#21378
DataBinding.FieldName = 'FromFactoryName'
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = True
Properties.OnButtonClick = v1Column16PropertiesButtonClick
Visible = False
HeaderAlignmentHorz = taCenter
VisibleForCustomization = False
Width = 79
end
object v1Column12: TcxGridDBColumn
Tag = 2
Caption = #22791#27880
@ -301,6 +282,47 @@ object frmYMTRKInPut: TfrmYMTRKInPut
HeaderAlignmentHorz = taCenter
Width = 79
end
object Tv1PriceType: TcxGridDBColumn
Tag = 2
Caption = #35745#20215#26041#24335
DataBinding.FieldName = 'PriceType'
PropertiesClassName = 'TcxComboBoxProperties'
Properties.DropDownListStyle = lsFixedList
Properties.Items.Strings = (
#31859
#20844#26020)
Properties.OnEditValueChanged = Tv1PriceTypePropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Width = 70
end
object Tv1IsTax: TcxGridDBColumn
Tag = 2
Caption = #31246#29366
DataBinding.FieldName = 'IsTax'
PropertiesClassName = 'TcxComboBoxProperties'
Properties.DropDownListStyle = lsFixedList
Properties.Items.Strings = (
#21547#31246
#19981#21547#31246)
HeaderAlignmentHorz = taCenter
Width = 70
end
object Tv1Money: TcxGridDBColumn
Tag = 2
Caption = #24635#37329#39069
DataBinding.FieldName = 'Money'
HeaderAlignmentHorz = taCenter
Width = 70
end
object Tv1Price: TcxGridDBColumn
Caption = #21333#20215
DataBinding.FieldName = 'Price'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.DisplayFormat = '0.00;'
Properties.OnEditValueChanged = Tv1PricePropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Width = 70
end
end
object cxGrid2Level1: TcxGridLevel
GridView = Tv1
@ -368,23 +390,23 @@ object frmYMTRKInPut: TfrmYMTRKInPut
end
end
object Panel4: TPanel
Left = 920
Top = 160
Width = 281
Height = 271
Left = 736
Top = 128
Width = 225
Height = 217
TabOrder = 2
Visible = False
object Label14: TLabel
Left = 60
Top = 110
Width = 8
Height = 15
Left = 48
Top = 88
Width = 6
Height = 12
end
object Panel10: TPanel
Left = 1
Top = 1
Width = 279
Height = 29
Width = 223
Height = 23
Align = alTop
Alignment = taLeftJustify
BevelOuter = bvNone
@ -392,16 +414,16 @@ object frmYMTRKInPut: TfrmYMTRKInPut
Color = clSkyBlue
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -22
Font.Height = -19
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 0
object Image2: TImage
Left = 241
Top = 4
Width = 28
Height = 20
Left = 193
Top = 3
Width = 22
Height = 16
ParentShowHint = False
Picture.Data = {
07544269746D617076040000424D760400000000000036000000280000001500
@ -447,117 +469,117 @@ object frmYMTRKInPut: TfrmYMTRKInPut
end
end
object Button1: TButton
Left = 36
Top = 225
Width = 94
Height = 31
Left = 29
Top = 180
Width = 75
Height = 25
Caption = #20840#36873
TabOrder = 1
OnClick = Button1Click
end
object GroupBox1: TGroupBox
Left = 30
Top = 70
Width = 221
Height = 151
Left = 24
Top = 56
Width = 177
Height = 121
Caption = #26367#25442#23383#27573
TabOrder = 2
object CheckBox1: TCheckBox
Left = 14
Top = 20
Width = 91
Height = 21
Left = 11
Top = 16
Width = 73
Height = 17
Caption = #20837#24211#31867#22411
TabOrder = 0
end
object CheckBox2: TCheckBox
Left = 14
Top = 45
Width = 91
Height = 21
Left = 11
Top = 36
Width = 73
Height = 17
Caption = #21152' '#24037' '#21378
TabOrder = 1
end
object CheckBox3: TCheckBox
Left = 14
Top = 70
Width = 91
Height = 21
Left = 11
Top = 56
Width = 73
Height = 17
Caption = #26579#21378#32568#21495
TabOrder = 2
end
object CheckBox4: TCheckBox
Left = 14
Top = 95
Width = 91
Height = 21
Left = 11
Top = 76
Width = 73
Height = 17
Caption = #23384#25918#24037#21378
TabOrder = 3
end
object CheckBox5: TCheckBox
Left = 14
Top = 120
Width = 91
Height = 21
Left = 11
Top = 96
Width = 73
Height = 17
Caption = #24211' '#20301
TabOrder = 4
end
object CheckBox6: TCheckBox
Left = 124
Top = 21
Width = 91
Height = 22
Left = 99
Top = 17
Width = 73
Height = 17
Caption = #21305' '#25968
TabOrder = 5
end
object CheckBox7: TCheckBox
Left = 124
Top = 46
Width = 91
Height = 22
Left = 99
Top = 37
Width = 73
Height = 17
Caption = #25968' '#37327
TabOrder = 6
end
object CheckBox8: TCheckBox
Left = 124
Top = 71
Width = 91
Height = 22
Left = 99
Top = 57
Width = 73
Height = 17
Caption = #25968#37327#21333#20301
TabOrder = 7
end
object CheckBox9: TCheckBox
Left = 124
Top = 96
Width = 91
Height = 22
Left = 99
Top = 77
Width = 73
Height = 17
Caption = #22791' '#27880
TabOrder = 8
end
end
object Button2: TButton
Left = 166
Top = 225
Width = 94
Height = 31
Left = 133
Top = 180
Width = 75
Height = 25
Caption = #30830#23450
TabOrder = 3
OnClick = Button2Click
end
end
object Panel2: TPanel
Left = 1544
Left = 1609
Top = 33
Width = 324
Height = 553
Width = 259
Height = 559
Align = alRight
Caption = 'Panel2'
TabOrder = 3
object cxGrid1: TcxGrid
Left = 1
Top = 1
Width = 322
Height = 551
Width = 257
Height = 557
Align = alClient
TabOrder = 0
object TvMX: TcxGridDBTableView

View File

@ -54,7 +54,6 @@ type
v1Column1: TcxGridDBColumn;
v1Column3: TcxGridDBColumn;
v1Column11: TcxGridDBColumn;
v1Column16: TcxGridDBColumn;
v1Column15: TcxGridDBColumn;
v1Column17: TcxGridDBColumn;
v1Column18: TcxGridDBColumn;
@ -87,9 +86,12 @@ type
TvMXMXQty: TcxGridDBColumn;
cxGridLevel2: TcxGridLevel;
Tv1Column1: TcxGridDBColumn;
Tv1Column2: TcxGridDBColumn;
Tv1Column3: TcxGridDBColumn;
TvMXColumn1: TcxGridDBColumn;
Tv1PriceType: TcxGridDBColumn;
Tv1IsTax: TcxGridDBColumn;
Tv1Money: TcxGridDBColumn;
Tv1Price: TcxGridDBColumn;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBAddClick(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
@ -114,6 +116,8 @@ type
procedure TvMXCustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
procedure TvMXKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure v1Column21PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure Tv1PricePropertiesEditValueChanged(Sender: TObject);
procedure Tv1PriceTypePropertiesEditValueChanged(Sender: TObject);
private
{ Private declarations }
function SaveCKData(): Boolean;
@ -271,6 +275,11 @@ begin
FieldByName('CRTime').Value := Trim(FormatDateTime('yyyy-MM-dd', Now));
FieldByName('QtyUnit').Value := 'M';
FieldByName('ToFactoryName').Value := 'ÔÆÏè²Ö¿â';
FieldByName('PriceType').Value := 'Ã×';
FieldByName('IsTax').Value := 'º¬Ë°';
FieldByName('Price').Value := '0';
FieldByName('Qty').Value := '0';
FieldByName('KGQty').Value := '0';
Post;
end;
end;
@ -898,5 +907,56 @@ begin
end;
procedure TfrmYMTRKInPut.Tv1PricePropertiesEditValueChanged(
Sender: TObject);
var
mvalue,FFieldName: string;
begin
mvalue := TcxCurrencyEdit(Sender).EditingText;
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
with CDS_Sub do
begin
Edit;
FieldByName(FFieldName).Value := mvalue;
Post;
end;
with CDS_Sub do
begin
Edit;
if FieldByName('PriceType').Value = 'Ã×' then
FieldByName('Money').Value := FieldByName('Price').Asfloat * FieldByName('Qty').Asfloat
else
FieldByName('Money').Value := FieldByName('Price').Asfloat * FieldByName('KGQty').Asfloat;
Post;
end;
end;
procedure TfrmYMTRKInPut.Tv1PriceTypePropertiesEditValueChanged(
Sender: TObject);
var
mvalue,FFieldName: string;
begin
mvalue := TcxComboBox(Sender).EditingText;
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
with CDS_Sub do
begin
Edit;
FieldByName(FFieldName).Value := mvalue;
Post;
end;
with CDS_Sub do
begin
Edit;
if FieldByName('PriceType').Value = 'Ã×' then
FieldByName('Money').Value := FieldByName('Price').Asfloat * FieldByName('Qty').Asfloat
else
FieldByName('Money').Value := FieldByName('Price').Asfloat * FieldByName('KGQty').Asfloat;
Post;
end;
end;
end.

View File

@ -7,7 +7,7 @@ object frmYMTRKList: TfrmYMTRKList
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -15
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = False
@ -15,8 +15,8 @@ object frmYMTRKList: TfrmYMTRKList
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 120
TextHeight = 15
PixelsPerInch = 96
TextHeight = 12
object ToolBar1: TToolBar
Left = 0
Top = 0
@ -121,118 +121,118 @@ object frmYMTRKList: TfrmYMTRKList
Left = 0
Top = 33
Width = 1362
Height = 90
Height = 72
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clSkyBlue
TabOrder = 1
object Label1: TLabel
Left = 35
Top = 15
Width = 60
Height = 15
Left = 28
Top = 12
Width = 48
Height = 12
Caption = #26597#35810#26102#38388
end
object Label2: TLabel
Left = 80
Top = 45
Width = 15
Height = 15
Left = 64
Top = 36
Width = 12
Height = 12
Caption = #33267
end
object Label3: TLabel
Left = 398
Top = 15
Width = 30
Height = 15
Left = 318
Top = 12
Width = 24
Height = 12
Caption = #21697#21517
end
object Label4: TLabel
Left = 544
Top = 15
Width = 45
Height = 15
Left = 435
Top = 12
Width = 36
Height = 12
Caption = #21152#24037#21378
end
object Label5: TLabel
Left = 223
Top = 15
Width = 60
Height = 15
Left = 178
Top = 12
Width = 48
Height = 12
Caption = #20837#24211#21333#21495
end
object Label8: TLabel
Left = 398
Top = 45
Width = 30
Height = 15
Left = 318
Top = 36
Width = 24
Height = 12
Caption = #35268#26684
end
object Label6: TLabel
Left = 544
Top = 45
Width = 46
Height = 15
Left = 435
Top = 36
Width = 36
Height = 12
Caption = #25104' '#20998
end
object Label7: TLabel
Left = 701
Top = 45
Width = 61
Height = 15
Left = 561
Top = 36
Width = 48
Height = 12
Caption = #35746' '#21333' '#21495
end
object Label9: TLabel
Left = 701
Top = 15
Width = 60
Height = 15
Left = 561
Top = 12
Width = 48
Height = 12
Caption = #23384#25918#24037#21378
end
object Label12: TLabel
Left = 223
Top = 45
Width = 60
Height = 15
Left = 178
Top = 36
Width = 48
Height = 12
Caption = #20837#24211#31867#22411
end
object Label11: TLabel
Left = 1029
Top = 46
Width = 60
Height = 15
Left = 823
Top = 37
Width = 48
Height = 12
Caption = #26579#21378#32568#21495
end
object Label13: TLabel
Left = 880
Top = 15
Width = 30
Height = 15
Left = 704
Top = 12
Width = 24
Height = 12
Caption = #39068#33394
end
object Label15: TLabel
Left = 880
Top = 46
Width = 30
Height = 15
Left = 704
Top = 37
Width = 24
Height = 12
Caption = #33457#22411
end
object BegDate: TDateTimePicker
Left = 96
Top = 11
Width = 109
Height = 23
Left = 77
Top = 9
Width = 87
Height = 20
Date = 40768.458268587970000000
Time = 40768.458268587970000000
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 0
end
object EndDate: TDateTimePicker
Left = 96
Top = 40
Width = 109
Height = 23
Left = 77
Top = 32
Width = 87
Height = 20
Date = 40768.458268587970000000
Time = 40768.458268587970000000
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
@ -240,83 +240,83 @@ object frmYMTRKList: TfrmYMTRKList
end
object SPName: TEdit
Tag = 2
Left = 431
Top = 11
Width = 100
Height = 23
Left = 345
Top = 9
Width = 80
Height = 20
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 2
OnChange = TBFindClick
end
object FactoryName: TEdit
Tag = 2
Left = 590
Top = 11
Width = 100
Height = 23
Left = 472
Top = 9
Width = 80
Height = 20
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 3
OnChange = FactoryNameChange
end
object SPID: TEdit
Tag = 2
Left = 285
Top = 11
Width = 100
Height = 23
Left = 228
Top = 9
Width = 80
Height = 20
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 1
OnChange = SPIDChange
end
object SPSpec: TEdit
Tag = 2
Left = 431
Top = 40
Width = 100
Height = 23
Left = 345
Top = 32
Width = 80
Height = 20
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 9
OnChange = SPSpecChange
end
object SPCF: TEdit
Tag = 2
Left = 590
Top = 40
Width = 100
Height = 23
Left = 472
Top = 32
Width = 80
Height = 20
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 10
OnChange = FactoryNameChange
end
object OrderNo: TEdit
Tag = 2
Left = 765
Top = 41
Width = 100
Height = 23
Left = 612
Top = 33
Width = 80
Height = 20
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 11
OnChange = FactoryNameChange
end
object ToFactoryName: TEdit
Tag = 2
Left = 765
Top = 11
Width = 100
Height = 23
Left = 612
Top = 9
Width = 80
Height = 20
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 4
OnChange = FactoryNameChange
end
object CRType: TComboBox
Tag = 2
Left = 285
Top = 40
Width = 100
Height = 23
Left = 228
Top = 32
Width = 80
Height = 20
Style = csDropDownList
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
ItemHeight = 15
ItemHeight = 12
TabOrder = 8
OnChange = TBFindClick
Items.Strings = (
@ -331,30 +331,30 @@ object frmYMTRKList: TfrmYMTRKList
end
object RCGangNo: TEdit
Tag = 2
Left = 1093
Top = 43
Width = 100
Height = 23
Left = 874
Top = 34
Width = 80
Height = 20
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 12
OnChange = FactoryNameChange
end
object SPColor: TEdit
Tag = 2
Left = 911
Top = 11
Width = 100
Height = 23
Left = 729
Top = 9
Width = 80
Height = 20
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 5
OnChange = FactoryNameChange
end
object SPHX: TEdit
Tag = 2
Left = 911
Top = 43
Width = 100
Height = 23
Left = 729
Top = 34
Width = 80
Height = 20
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
TabOrder = 6
OnChange = FactoryNameChange
@ -362,9 +362,9 @@ object frmYMTRKList: TfrmYMTRKList
end
object cxGrid2: TcxGrid
Left = 0
Top = 123
Width = 1008
Height = 540
Top = 105
Width = 1078
Height = 564
Align = alClient
TabOrder = 2
object Tv1: TcxGridDBTableView
@ -658,18 +658,18 @@ object frmYMTRKList: TfrmYMTRKList
end
end
object Panel2: TPanel
Left = 1008
Top = 123
Width = 354
Height = 540
Left = 1078
Top = 105
Width = 284
Height = 564
Align = alRight
Caption = 'Panel2'
TabOrder = 3
object cxGrid1: TcxGrid
Left = 1
Top = 82
Width = 352
Height = 457
Top = 71
Width = 282
Height = 492
Align = alClient
TabOrder = 0
object TvMX: TcxGridDBTableView
@ -750,11 +750,11 @@ object frmYMTRKList: TfrmYMTRKList
end
object ToolBar2: TToolBar
Left = 1
Top = 53
Width = 352
Top = 42
Width = 282
Height = 29
ButtonHeight = 30
ButtonWidth = 80
ButtonWidth = 71
Caption = 'ToolBar2'
Images = DataLink_YXYMT.ThreeImgList
List = True
@ -769,7 +769,7 @@ object frmYMTRKList: TfrmYMTRKList
OnClick = TbAddRowClick
end
object TbDeleteRow: TToolButton
Left = 84
Left = 75
Top = 2
AutoSize = True
Caption = #21024#34892
@ -780,30 +780,30 @@ object frmYMTRKList: TfrmYMTRKList
object Panel3: TPanel
Left = 1
Top = 1
Width = 352
Height = 52
Width = 282
Height = 41
Align = alTop
TabOrder = 2
object Label17: TLabel
Left = 8
Top = 15
Width = 45
Height = 15
Left = 6
Top = 12
Width = 36
Height = 12
Caption = #22686#34892#25968
Layout = tlCenter
end
object AddNum: TEdit
Left = 59
Top = 13
Width = 51
Height = 23
Left = 47
Top = 10
Width = 41
Height = 20
TabOrder = 0
end
object Button1: TButton
Left = 123
Top = 5
Width = 93
Height = 38
Left = 98
Top = 4
Width = 75
Height = 30
Caption = #24555#36895#22686#34892
TabOrder = 1
OnClick = Button1Click
@ -811,41 +811,41 @@ object frmYMTRKList: TfrmYMTRKList
end
end
object Panel4: TPanel
Left = 700
Top = 175
Width = 293
Height = 156
Left = 560
Top = 140
Width = 234
Height = 125
Color = clSkyBlue
TabOrder = 4
Visible = False
object Label25: TLabel
Left = 48
Top = 43
Width = 30
Height = 15
Left = 38
Top = 34
Width = 24
Height = 12
Caption = #24211#20301
end
object btnChk: TButton
Left = 35
Top = 101
Width = 75
Height = 32
Left = 28
Top = 81
Width = 60
Height = 25
Caption = #30830#35748
TabOrder = 0
OnClick = btnChkClick
end
object btn1: TButton
Left = 200
Top = 100
Width = 75
Height = 31
Left = 160
Top = 80
Width = 60
Height = 25
Caption = #20851#38381
TabOrder = 1
OnClick = btn1Click
end
object KuWei: TcxButtonEdit
Left = 94
Top = 34
Left = 75
Top = 27
ParentFont = False
Properties.Buttons = <
item
@ -855,12 +855,12 @@ object frmYMTRKList: TfrmYMTRKList
Properties.OnButtonClick = KuWeiPropertiesButtonClick
Style.Font.Charset = GB2312_CHARSET
Style.Font.Color = clWindowText
Style.Font.Height = -22
Style.Font.Height = -19
Style.Font.Name = #23435#20307
Style.Font.Style = [fsBold]
Style.IsFontAssigned = True
TabOrder = 2
Width = 151
Width = 121
end
end
object ADOQueryCmd: TADOQuery

View File

@ -293,8 +293,8 @@ begin
TBDel.Visible := True;
TBEdit.Visible := True;
end;
ReadCxGrid('´ý¼ì²¼Èë¿âÁбí', Tv1, '´ý¼ì²¼²Ö¿â');
ReadCxGrid('´ý¼ì²¼Èë¿âÁбí2', TvMX, '´ý¼ì²¼²Ö¿â');
// ReadCxGrid('´ý¼ì²¼Èë¿âÁбí', Tv1, '´ý¼ì²¼²Ö¿â');
// ReadCxGrid('´ý¼ì²¼Èë¿âÁбí2', TvMX, '´ý¼ì²¼²Ö¿â');
InitGrid();
end;

View File

@ -30,6 +30,7 @@ uses
dxSkinWhiteprint, dxSkinXmas2008Blue;
type
TfrmLLRKInPutMH_PBCG = class(TForm)
ToolBar1: TToolBar;
li: TToolButton;
@ -473,6 +474,7 @@ begin
SCSHDataNew(ADOQuery1, Panel4, 0);
SCSHDataNew(ADOQuery1, Panel5, 2);
SCSHDataNew(ADOQuery1, Panel5, 0);
SCSHDataNew(ADOQuery1, Panel6, 2);
SCSHDataNew(ADOQuery1, Panel15, 2);
MDMFlag.Checked := ADOQuery1.FieldByName('MDMflag').AsBoolean;
MDKGFlag.Checked := ADOQuery1.FieldByName('MDKGFlag').AsBoolean;

View File

@ -21,6 +21,7 @@ object frmMCGRKList: TfrmMCGRKList
Left = 0
Top = 0
Width = 1141
Height = 62
AutoSize = True
ButtonHeight = 30
ButtonWidth = 95
@ -86,11 +87,12 @@ object frmMCGRKList: TfrmMCGRKList
AutoSize = True
Caption = #21367#25968#31995#25968
ImageIndex = 25
Wrap = True
OnClick = ToolButton3Click
end
object labMYType: TLabel
Left = 474
Top = 0
Left = 0
Top = 30
Width = 292
Height = 30
Caption = ' '#36741#26009#37319#36141#20837#24211' '
@ -102,8 +104,8 @@ object frmMCGRKList: TfrmMCGRKList
ParentFont = False
end
object ToolButton4: TToolButton
Left = 766
Top = 0
Left = 292
Top = 30
AutoSize = True
Caption = #25171#21360
ImageIndex = 4
@ -111,16 +113,16 @@ object frmMCGRKList: TfrmMCGRKList
OnClick = ToolButton4Click
end
object TBExport: TToolButton
Left = 835
Top = 0
Left = 361
Top = 30
AutoSize = True
Caption = #23548#20986
ImageIndex = 97
OnClick = TBExportClick
end
object TBClose: TToolButton
Left = 904
Top = 0
Left = 430
Top = 30
AutoSize = True
Caption = #20851#38381
ImageIndex = 21
@ -129,9 +131,9 @@ object frmMCGRKList: TfrmMCGRKList
end
object cxGrid1: TcxGrid
Left = 0
Top = 109
Top = 139
Width = 1141
Height = 536
Height = 506
Align = alClient
PopupMenu = PopupMenu1
TabOrder = 2
@ -328,7 +330,7 @@ object frmMCGRKList: TfrmMCGRKList
end
object Panel1: TPanel
Left = 0
Top = 32
Top = 62
Width = 1141
Height = 77
Align = alTop

View File

@ -13,32 +13,19 @@ uses
cxDropDownEdit, cxPC, Buttons, cxContainer, cxGroupBox, IdBaseComponent,
IdComponent, IdTCPConnection, IdTCPClient, IdFTP, ShellAPI, ImgList, StrUtils,
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
dxSkinDarkRoom,
dxSkinOffice2013White,
dxSkinSharpPlus,
dxSkinSpringTime,
dxSkinsDefaultPainters,
dxSkinscxPCPainter, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
dxSkinCaramel, dxSkinCoffee, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans,
dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
dxSkinDarkRoom, dxSkinOffice2013White, dxSkinSharpPlus, dxSkinSpringTime,
dxSkinsDefaultPainters, dxSkinscxPCPainter, dxSkinBlack, dxSkinBlue,
dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkSide,
dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
dxSkinOffice2013LightGray, dxSkinPumpkin, dxSkinSeven,
dxSkinSevenClassic, dxSkinSharp, dxSkinSilver, dxSkinStardust,
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinValentine, dxSkinVS2010,
dxSkinWhiteprint, dxSkinXmas2008Blue;
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSilver,
dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinValentine,
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue;
type
TfrmMCGRKList = class(TForm)
@ -272,6 +259,7 @@ begin
// ShowMessage(sql.text);
Open;
end;
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS20(ADOQueryMain, Order_Main);
SInitCDSData20(ADOQueryMain, Order_Main);
finally
@ -1027,6 +1015,7 @@ begin
Initimage();
end;
adoqueryCmd.Connection.CommitTrans;
Panel12.Visible := false;
except
adoqueryCmd.Connection.RollbackTrans;
application.MessageBox('文件保存失败!', '提示信息', 0);
@ -1131,9 +1120,10 @@ begin
end;
end;
IdFTP1.Quit;
//Panel2.Visible:=false;
Initimage();
adoqueryCmd.Connection.CommitTrans;
Panel12.Visible := false;
except
adoqueryCmd.Connection.RollbackTrans;
application.MessageBox('文件保存失败!', '提示信息', 0);

View File

@ -26,7 +26,19 @@ uses
dxSkinSharpPlus,
dxSkinSpringTime,
dxSkinsDefaultPainters,
dxSkinscxPCPainter;
dxSkinscxPCPainter, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
dxSkinCaramel, dxSkinCoffee, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans,
dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
dxSkinOffice2013LightGray, dxSkinPumpkin, dxSkinSeven,
dxSkinSevenClassic, dxSkinSharp, dxSkinSilver, dxSkinStardust,
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinValentine, dxSkinVS2010,
dxSkinWhiteprint, dxSkinXmas2008Blue;
type
TfrmMCGRKList_PTCL = class(TForm)
@ -235,6 +247,7 @@ begin
SQL.Add(' and isnull(MYType,'''')=''粒劃第蹋''');
Open;
end;
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
SCreateCDS20(ADOQueryMain,Order_Main);
SInitCDSData20(ADOQueryMain,Order_Main);
finally

View File

@ -14,17 +14,16 @@ uses
cxNavigator, BtnEdit, dxSkinsCore, dxSkinDarkRoom, dxSkinOffice2013White,
dxSkinSharpPlus, dxSkinSpringTime, dxSkinsDefaultPainters, dxSkinscxPCPainter,
dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee,
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle,
dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary,
dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin,
dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
dxSkinOffice2013LightGray, dxSkinPumpkin, dxSkinSeven,
dxSkinSevenClassic, dxSkinSharp, dxSkinSilver, dxSkinStardust,
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinValentine, dxSkinVS2010,
dxSkinWhiteprint, dxSkinXmas2008Blue;
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSilver,
dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinValentine,
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue;
type
TfrmPBCGRKList = class(TForm)
@ -258,6 +257,7 @@ begin
// ShowMessage(sql.text);
Open;
end;
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS20(ADOQueryMain, Order_Main);
SInitCDSData20(ADOQueryMain, Order_Main);
finally

View File

@ -1,7 +1,7 @@
object frmPBCGRKList_RCDJ: TfrmPBCGRKList_RCDJ
Left = 599
Top = 280
Width = 1556
Width = 1044
Height = 781
Caption = #21152#24037#30721#21333#30331#35760
Color = clBtnFace
@ -20,7 +20,7 @@ object frmPBCGRKList_RCDJ: TfrmPBCGRKList_RCDJ
object ToolBar1: TToolBar
Left = 0
Top = 0
Width = 1548
Width = 1036
AutoSize = True
ButtonHeight = 30
ButtonWidth = 65
@ -112,7 +112,7 @@ object frmPBCGRKList_RCDJ: TfrmPBCGRKList_RCDJ
object cxGrid1: TcxGrid
Left = 0
Top = 98
Width = 1548
Width = 1036
Height = 652
Align = alClient
PopupMenu = PopupMenu1
@ -363,7 +363,7 @@ object frmPBCGRKList_RCDJ: TfrmPBCGRKList_RCDJ
object Panel1: TPanel
Left = 0
Top = 32
Width = 1548
Width = 1036
Height = 66
Align = alTop
BevelInner = bvRaised

View File

@ -244,6 +244,7 @@ begin
sql.Add(')AA');
Open;
end;
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS20(ADOQueryMain, Order_Main);
SInitCDSData20(ADOQueryMain, Order_Main);
finally
@ -320,7 +321,6 @@ end;
procedure TfrmPBCGRKList_RCDJ.TBRafreshClick(Sender: TObject);
begin
InitGrid();
TBFind.Click;
end;
procedure TfrmPBCGRKList_RCDJ.TBAddClick(Sender: TObject);

View File

@ -250,7 +250,7 @@ object frmQCRKList: TfrmQCRKList
Left = 62
Top = 39
Width = 125
Height = 24
Height = 23
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -15
@ -297,7 +297,7 @@ object frmQCRKList: TfrmQCRKList
Left = 62
Top = 10
Width = 125
Height = 24
Height = 23
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -15

View File

@ -6,26 +6,25 @@ uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses,
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
cxGridDBTableView, cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter,
RM_Dataset, RM_System, RM_Common, RM_Class, RM_GridReport, RM_e_Xls,
Menus, cxButtonEdit, cxDropDownEdit, cxPC, Buttons, cxLookAndFeels,
cxLookAndFeelPainters, dxSkinsCore,
dxSkinDarkRoom,
dxSkinOffice2013White,
dxSkinSharpPlus,
dxSkinSpringTime,
dxSkinsDefaultPainters,
dxSkinscxPCPainter,
cxNavigator;
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses, cxControls,
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, Menus, cxButtonEdit,
cxDropDownEdit, cxPC, Buttons, cxLookAndFeels, cxLookAndFeelPainters,
dxSkinsCore, dxSkinDarkRoom, dxSkinOffice2013White, dxSkinSharpPlus,
dxSkinSpringTime, dxSkinsDefaultPainters, dxSkinscxPCPainter, cxNavigator,
dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee,
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle,
dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary,
dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin,
dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
dxSkinOffice2013LightGray, dxSkinPumpkin, dxSkinSeven,
dxSkinSevenClassic, dxSkinSharp, dxSkinSilver, dxSkinStardust,
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinValentine, dxSkinVS2010,
dxSkinWhiteprint, dxSkinXmas2008Blue;
type
TfrmQCRKList = class(TForm)
@ -96,9 +95,7 @@ type
procedure ZJStatusChange(Sender: TObject);
procedure ToolButton4Click(Sender: TObject);
procedure TBEditClick(Sender: TObject);
procedure TV2CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
procedure TV2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
procedure TBAddClick(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
@ -109,14 +106,14 @@ type
procedure SpeedButton4Click(Sender: TObject);
procedure SpeedButton5Click(Sender: TObject);
private
canshu1:string;
DQdate:TDateTime;
canshu1: string;
DQdate: TDateTime;
procedure InitGrid();
procedure InitForm();
function DelData():Boolean;
function DelData(): Boolean;
{ Private declarations }
public
FFInt,FCloth:Integer;
FFInt, FCloth: Integer;
{ Public declarations }
end;
@ -125,31 +122,32 @@ var
frmQCRKList: TfrmQCRKList;
implementation
uses
U_DataLink,U_RTFun, U_QCRKInPut,U_ZDYHelp,U_LLRKInPut_SD,U_QCRKInPut_SD,U_QCRKList_CX,
U_ZDYCPName,U_QCRKInPut_CPNo,U_QCRKInPut_TJML,U_QCRKInPut_YHML;
U_DataLink, U_RTFun, U_QCRKInPut, U_ZDYHelp, U_LLRKInPut_SD, U_QCRKInPut_SD,
U_QCRKList_CX, U_ZDYCPName, U_QCRKInPut_CPNo, U_QCRKInPut_TJML,
U_QCRKInPut_YHML;
{$R *.dfm}
procedure TfrmQCRKList.FormDestroy(Sender: TObject);
begin
frmQCRKList:=nil;
frmQCRKList := nil;
end;
procedure TfrmQCRKList.FormClose(Sender: TObject;
var Action: TCloseAction);
procedure TfrmQCRKList.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action:=caFree;
Action := caFree;
end;
procedure TfrmQCRKList.FormCreate(Sender: TObject);
begin
canshu1:=Trim(DParameters1);
canshu1 := Trim(DParameters1);
end;
procedure TfrmQCRKList.TBCloseClick(Sender: TObject);
begin
WriteCxGrid('期初入库RS211',Tv1,'贸易生产管理');
WriteCxGrid('期初入库RS211', Tv1, '贸易生产管理');
Close;
end;
@ -159,81 +157,83 @@ begin
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Filtered:=False;
Filtered := False;
Close;
sql.Clear;
sql.Add(' select convert(varchar(10),A.CRTime,120) CRTime,A.MYCode,A.MYName,Sum(A.GangQty) GangQty ');
sql.Add(',Sum(A.PS) PS,Sum(A.KgQty) KgQty,Sum(A.Qty) Qty');
sql.Add(' from CK_MYSC_CR A ');
sql.Add(' where 1=1 ');
if CheckBox1.Checked=False then
if CheckBox1.Checked = False then
begin
sql.Add(' and A.CRTime>='''+Trim(FormatDateTime('yyyy-MM-dd',now))+'''');
sql.Add(' and A.CRTime<'''+Trim(FormatDateTime('yyyy-MM-dd',now+1))+'''');
BegDate.Visible:=false;
EndDate.Visible:=false;
sql.Add(' and A.CRTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', now)) + '''');
sql.Add(' and A.CRTime<''' + Trim(FormatDateTime('yyyy-MM-dd', now + 1)) + '''');
BegDate.Visible := false;
EndDate.Visible := false;
end
else
begin
sql.Add(' and A.CRTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date))+'''');
sql.Add(' and A.CRTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.Date+1))+'''');
BegDate.Visible:=true;
EndDate.Visible:=true;
sql.Add(' and A.CRTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date)) + '''');
sql.Add(' and A.CRTime<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.Date + 1)) + '''');
BegDate.Visible := true;
EndDate.Visible := true;
end;
sql.Add(' and isnull(CRType,'''')=''ÆÚ³õÈë¿â'' ');
sql.Add('group by convert(varchar(10),A.CRTime,120),A.MYCode,A.MYName');
Open;
end;
SCreateCDS20(ADOQueryMain,Order_Main);
SInitCDSData20(ADOQueryMain,Order_Main);
SCreateCDS20(ADOQueryMain, Order_Main);
SInitCDSData20(ADOQueryMain, Order_Main);
finally
ADOQueryMain.EnableControls;
end;
end;
procedure TfrmQCRKList.InitForm();
begin
BegDate.Date:=SGetServerDateMBeg(ADOQueryTemp);
EndDate.Date:=SGetServerDate(ADOQueryTemp);
ReadCxGrid('期初入库RS211',Tv1,'贸易生产管理');
BegDate.Date := SGetServerDateMBeg(ADOQueryTemp);
EndDate.Date := SGetServerDate(ADOQueryTemp);
ReadCxGrid('期初入库RS211', Tv1, '贸易生产管理');
InitGrid();
end;
procedure TfrmQCRKList.TBFindClick(Sender: TObject);
begin
if ADOQueryMain.Active=False then Exit;
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
SCreateCDS20(ADOQueryMain,Order_Main);
SInitCDSData20(ADOQueryMain,Order_Main);
if ADOQueryMain.Active = False then
Exit;
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS20(ADOQueryMain, Order_Main);
SInitCDSData20(ADOQueryMain, Order_Main);
end;
procedure TfrmQCRKList.TBDelClick(Sender: TObject);
begin
if Order_Main.IsEmpty then Exit;
if Order_Main.IsEmpty then
Exit;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select * from CK_MYSC_CR_MX where MYID='''+Trim(Order_Main.fieldbyname('MYID').AsString)+'''');
sql.Add('select * from CK_MYSC_CR_MX where MYID=''' + Trim(Order_Main.fieldbyname('MYID').AsString) + '''');
Open;
end;
if ADOQueryTemp.IsEmpty=False then
if ADOQueryTemp.IsEmpty = False then
begin
Application.MessageBox('已产生明细数据,不能删除!','提示',0);
Application.MessageBox('已产生明细数据,不能删除!', '提示', 0);
Exit;
end;
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
Exit;
if DelData() then
begin
//Order_Main.Delete;
end;
end;
function TfrmQCRKList.DelData():Boolean;
function TfrmQCRKList.DelData(): Boolean;
begin
try
Result:=false;
Result := false;
ADOQueryCmd.Connection.BeginTrans;
Order_MX.DisableControls;
with Order_MX do
@ -246,10 +246,10 @@ begin
Close;
sql.Clear;
sql.Add(' insert into CK_MYSC_CR_Log ');
sql.Add(' select * from CK_MYSC_CR where MYID='''+Trim(Order_MX.fieldbyname('MYID').AsString)+'''');
sql.Add(' UPdate CK_MYSC_CR_Log Set DelTime=getdate(),DelerCode='''+Trim(DCode)+''',Deler='''+Trim(DName)+'''');
sql.Add(' where MYID='''+Trim(Order_MX.fieldbyname('MYID').AsString)+'''');
sql.Add('Delete CK_MYSC_CR where MYId='''+Trim(Order_MX.fieldbyname('MYId').AsString)+'''');
sql.Add(' select * from CK_MYSC_CR where MYID=''' + Trim(Order_MX.fieldbyname('MYID').AsString) + '''');
sql.Add(' UPdate CK_MYSC_CR_Log Set DelTime=getdate(),DelerCode=''' + Trim(DCode) + ''',Deler=''' + Trim(DName) + '''');
sql.Add(' where MYID=''' + Trim(Order_MX.fieldbyname('MYID').AsString) + '''');
sql.Add('Delete CK_MYSC_CR where MYId=''' + Trim(Order_MX.fieldbyname('MYId').AsString) + '''');
ExecSQL;
end;
Order_MX.Delete;
@ -257,20 +257,20 @@ begin
end;
Order_MX.EnableControls;
ADOQueryCmd.Connection.CommitTrans;
Result:=True;
Result := True;
except
ADOQueryCmd.Connection.RollbackTrans;
Result:=False;
Application.MessageBox('数据删除异常!','提示',0);
Result := False;
Application.MessageBox('数据删除异常!', '提示', 0);
end;
end;
procedure TfrmQCRKList.TBExportClick(Sender: TObject);
begin
if ADOQueryMain.IsEmpty then Exit;
TcxGridToExcel(Self.Caption,cxGrid1);
if ADOQueryMain.IsEmpty then
Exit;
TcxGridToExcel(Self.Caption, cxGrid1);
end;
procedure TfrmQCRKList.TBRafreshClick(Sender: TObject);
@ -295,32 +295,33 @@ end;
procedure TfrmQCRKList.ToolButton1Click(Sender: TObject);
begin
if Order_Main.IsEmpty then Exit;
if Order_Main.IsEmpty then
Exit;
try
frmQCRKList_CX:=TfrmQCRKList_CX.Create(Application);
frmQCRKList_CX := TfrmQCRKList_CX.Create(Application);
with frmQCRKList_CX do
begin
frmQCRKList_CX.MYName.Text:=Trim(Self.Order_Main.fieldbyname('MYName').AsString);
frmQCRKList_CX.MYCode.Text:=Trim(Self.Order_Main.fieldbyname('MYCode').AsString);
frmQCRKList_CX.BegDate.Date:=Self.Order_Main.fieldbyname('CRTime').AsDateTime;
frmQCRKList_CX.EndDate.Date:=Self.Order_Main.fieldbyname('CRTime').AsDateTime;
if self.Order_Main.fieldbyname('KgQty').AsFloat=0 then
frmQCRKList_CX.MYName.Text := Trim(Self.Order_Main.fieldbyname('MYName').AsString);
frmQCRKList_CX.MYCode.Text := Trim(Self.Order_Main.fieldbyname('MYCode').AsString);
frmQCRKList_CX.BegDate.Date := Self.Order_Main.fieldbyname('CRTime').AsDateTime;
frmQCRKList_CX.EndDate.Date := Self.Order_Main.fieldbyname('CRTime').AsDateTime;
if self.Order_Main.fieldbyname('KgQty').AsFloat = 0 then
begin
v1KgQty.Visible:=false;
v1KgQty.Visible := false;
end
else
begin
v1KgQty.Visible:=true;
v1KgQty.Visible := true;
end;
if self.Order_Main.fieldbyname('Qty').AsFloat=0 then
if self.Order_Main.fieldbyname('Qty').AsFloat = 0 then
begin
v1Qty.Visible:=false;
v1Qty.Visible := false;
end
else
begin
v1Qty.Visible:=true;
v1Qty.Visible := true;
end;
if ShowModal=1 then
if ShowModal = 1 then
begin
end;
@ -332,28 +333,31 @@ end;
procedure TfrmQCRKList.CustomerNoNameChange(Sender: TObject);
begin
if ADOQueryMain.Active=False then Exit;
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
SCreateCDS20(ADOQueryMain,Order_Main);
SInitCDSData20(ADOQueryMain,Order_Main);
if ADOQueryMain.Active = False then
Exit;
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS20(ADOQueryMain, Order_Main);
SInitCDSData20(ADOQueryMain, Order_Main);
end;
procedure TfrmQCRKList.N2Click(Sender: TObject);
begin
if Order_MX.IsEmpty then Exit;
if Order_MX.IsEmpty then
Exit;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select * from CK_MYSC_CR_MX where MYID='''+Trim(Order_MX.fieldbyname('MYID').AsString)+'''');
sql.Add('select * from CK_MYSC_CR_MX where MYID=''' + Trim(Order_MX.fieldbyname('MYID').AsString) + '''');
Open;
end;
if ADOQueryTemp.IsEmpty=False then
if ADOQueryTemp.IsEmpty = False then
begin
Application.MessageBox('已产生明细数据,不能删除!','提示',0);
Application.MessageBox('已产生明细数据,不能删除!', '提示', 0);
Exit;
end;
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
Exit;
if DelData() then
begin
//Order_Main.Delete;
@ -362,14 +366,15 @@ end;
procedure TfrmQCRKList.N1Click(Sender: TObject);
begin
if Order_MX.IsEmpty then Exit;
if Order_MX.IsEmpty then
Exit;
try
frmQCRKInPut:=TfrmQCRKInPut.Create(Application);
frmQCRKInPut := TfrmQCRKInPut.Create(Application);
with frmQCRKInPut do
begin
PState:=1;
FMainId:=Trim(Self.Order_MX.fieldbyname('MYId').AsString);
if ShowModal=1 then
PState := 1;
FMainId := Trim(Self.Order_MX.fieldbyname('MYId').AsString);
if ShowModal = 1 then
begin
InitGrid();
end;
@ -391,42 +396,46 @@ end;
procedure TfrmQCRKList.ToolButton4Click(Sender: TObject);
var
fPrintFile:string;
fPrintFile: string;
begin
if Order_Main.IsEmpty then Exit;
if Trim(Order_Main.fieldbyname('Chker').AsString)='' then exit;
fPrintFile:=ExtractFilePath(Application.ExeName)+'Report\检测报告.rmf';
RMXLSExport2:= TRMXLSExport.Create(RMXLSExport2);
if Order_Main.IsEmpty then
Exit;
if Trim(Order_Main.fieldbyname('Chker').AsString) = '' then
exit;
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\检测报告.rmf';
RMXLSExport2 := TRMXLSExport.Create(RMXLSExport2);
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select * from Test_Report where TRId='''+Trim(Order_Main.fieldbyname('TRId').AsString)+'''');
sql.Add('select * from Test_Report where TRId=''' + Trim(Order_Main.fieldbyname('TRId').AsString) + '''');
Open;
end;
SCreateCDS20(ADOQueryTemp,CDS_PRT);
SInitCDSData20(ADOQueryTemp,CDS_PRT);
SCreateCDS20(ADOQueryTemp, CDS_PRT);
SInitCDSData20(ADOQueryTemp, CDS_PRT);
if FileExists(fPrintFile) then
begin
//RMVariables['OrderUnit']:=Order_Main.fieldbyname('OrderUnit').Value;
RM1.LoadFromFile(fPrintFile);
RM1.ShowReport;
end else
end
else
begin
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\检测报告.rmf'),'提示',0);
Application.MessageBox(PChar('没有找' + ExtractFilePath(Application.ExeName) + 'Report\检测报告.rmf'), '提示', 0);
end;
end;
procedure TfrmQCRKList.TBEditClick(Sender: TObject);
begin
if Order_Main.IsEmpty then Exit;
if Order_Main.IsEmpty then
Exit;
try
frmQCRKInPut:=TfrmQCRKInPut.Create(Application);
frmQCRKInPut := TfrmQCRKInPut.Create(Application);
with frmQCRKInPut do
begin
PState:=1;
FMainId:=Trim(Self.Order_Main.fieldbyname('MYId').AsString);
if ShowModal=1 then
PState := 1;
FMainId := Trim(Self.Order_Main.fieldbyname('MYId').AsString);
if ShowModal = 1 then
begin
InitGrid();
end;
@ -436,31 +445,28 @@ begin
end;
end;
procedure TfrmQCRKList.TV2CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
procedure TfrmQCRKList.TV2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
begin
ToolButton1.Click;
end;
procedure TfrmQCRKList.TBAddClick(Sender: TObject);
begin
Panel2.Visible:=true;
Panel2.Visible := true;
end;
procedure TfrmQCRKList.SpeedButton1Click(Sender: TObject);
var
maxno:string;
maxno: string;
begin
try
frmQCRKInPut:=TfrmQCRKInPut.Create(Application);
frmQCRKInPut := TfrmQCRKInPut.Create(Application);
with frmQCRKInPut do
begin
PState:=0;
FMainId:='';
FRead:='';
if ShowModal=1 then
PState := 0;
FMainId := '';
FRead := '';
if ShowModal = 1 then
begin
InitGrid();
end;
@ -472,16 +478,16 @@ end;
procedure TfrmQCRKList.SpeedButton2Click(Sender: TObject);
var
maxno:string;
maxno: string;
begin
try
frmQCRKInPut_CPNo:=TfrmQCRKInPut_CPNo.Create(Application);
frmQCRKInPut_CPNo := TfrmQCRKInPut_CPNo.Create(Application);
with frmQCRKInPut_CPNo do
begin
PState:=0;
FMainId:='';
FRead:='';
if ShowModal=1 then
PState := 0;
FMainId := '';
FRead := '';
if ShowModal = 1 then
begin
InitGrid();
end;
@ -498,20 +504,20 @@ end;
procedure TfrmQCRKList.Image2Click(Sender: TObject);
begin
Panel2.Visible:=false;
Panel2.Visible := false;
end;
procedure TfrmQCRKList.Button1Click(Sender: TObject);
begin
frmZDYCPName:=TfrmZDYCPName.create(self);
frmZDYCPName := TfrmZDYCPName.create(self);
with frmZDYCPName do
begin
flag:='MYName';
flagName:='品名';
V1Code.Visible:=true;
if showmodal=1 then
flag := 'MYName';
flagName := '品名';
V1Code.Visible := true;
if showmodal = 1 then
begin
MYName.text:=Trim(ClientDataSet1.fieldbyname('BPName').AsString);
MYName.text := Trim(ClientDataSet1.fieldbyname('BPName').AsString);
TBFind.Click;
end;
free;
@ -520,16 +526,16 @@ end;
procedure TfrmQCRKList.SpeedButton3Click(Sender: TObject);
var
maxno:string;
maxno: string;
begin
try
frmQCRKInPut_CPNo:=TfrmQCRKInPut_CPNo.Create(Application);
frmQCRKInPut_CPNo := TfrmQCRKInPut_CPNo.Create(Application);
with frmQCRKInPut_CPNo do
begin
PState:=0;
FMainId:='';
FRead:='';
if ShowModal=1 then
PState := 0;
FMainId := '';
FRead := '';
if ShowModal = 1 then
begin
InitGrid();
end;
@ -541,16 +547,16 @@ end;
procedure TfrmQCRKList.SpeedButton4Click(Sender: TObject);
var
maxno:string;
maxno: string;
begin
try
frmQCRKInPut_TJML:=TfrmQCRKInPut_TJML.Create(Application);
frmQCRKInPut_TJML := TfrmQCRKInPut_TJML.Create(Application);
with frmQCRKInPut_TJML do
begin
PState:=0;
FMainId:='';
FRead:='';
if ShowModal=1 then
PState := 0;
FMainId := '';
FRead := '';
if ShowModal = 1 then
begin
InitGrid();
end;
@ -562,16 +568,16 @@ end;
procedure TfrmQCRKList.SpeedButton5Click(Sender: TObject);
var
maxno:string;
maxno: string;
begin
try
frmQCRKInPut_YHML:=TfrmQCRKInPut_YHML.Create(Application);
frmQCRKInPut_YHML := TfrmQCRKInPut_YHML.Create(Application);
with frmQCRKInPut_YHML do
begin
PState:=0;
FMainId:='';
FRead:='';
if ShowModal=1 then
PState := 0;
FMainId := '';
FRead := '';
if ShowModal = 1 then
begin
InitGrid();
end;
@ -583,4 +589,3 @@ end;
end.

View File

@ -458,7 +458,6 @@ begin
programIni.Free;
end;
procedure TfrmZHCPInPut.SaveImage(maxnoWB: string; FIMNO: string);
var
ImagePath, ImagName, MaxNo, MaxNoFile: string;
@ -469,8 +468,6 @@ begin
try
if Trim(FIMNO) = '图片' then
begin
ImagePath := Image2.Hint;
ImagName := ExtractFileName(Image2.Hint);
if lstPat2.Count > 0 then
begin
LocalFileName := lstPat2[0]; // 使用列表中的路径,确保是最新的
@ -481,6 +478,7 @@ begin
Exit;
end;
end;
end;
ImagePath := ExtractFilePath(LocalFileName); // 文件路径
ImagName := ExtractFileName(LocalFileName); // 纯文件名(含扩展名)
AJpeg := TJpegImage.Create();
@ -613,6 +611,7 @@ begin
end;
if IdFTP1.Connected then
IdFTP1.Quit;
except
ADOCmd.Connection.RollbackTrans;
Application.MessageBox('图片保存失败!', '提示', 0);

View File

@ -538,9 +538,9 @@ object frmZHCPList: TfrmZHCPList
Color = clSkyBlue
TabOrder = 1
object Label2: TLabel
Left = 4
Left = 36
Top = 12
Width = 64
Width = 32
Height = 15
Alignment = taRightJustify
BiDiMode = bdLeftToRight
@ -554,9 +554,9 @@ object frmZHCPList: TfrmZHCPList
ParentFont = False
end
object Label6: TLabel
Left = 176
Left = 208
Top = 12
Width = 64
Width = 32
Height = 15
Alignment = taRightJustify
BiDiMode = bdLeftToRight
@ -570,9 +570,9 @@ object frmZHCPList: TfrmZHCPList
ParentFont = False
end
object Label7: TLabel
Left = 536
Left = 584
Top = 12
Width = 80
Width = 32
Height = 15
Alignment = taRightJustify
BiDiMode = bdLeftToRight
@ -586,9 +586,9 @@ object frmZHCPList: TfrmZHCPList
ParentFont = False
end
object Label8: TLabel
Left = 896
Left = 912
Top = 12
Width = 64
Width = 48
Height = 15
Alignment = taRightJustify
BiDiMode = bdLeftToRight
@ -602,9 +602,9 @@ object frmZHCPList: TfrmZHCPList
ParentFont = False
end
object Label1: TLabel
Left = 724
Left = 740
Top = 12
Width = 64
Width = 48
Height = 15
Alignment = taRightJustify
BiDiMode = bdLeftToRight
@ -618,9 +618,9 @@ object frmZHCPList: TfrmZHCPList
ParentFont = False
end
object Label5: TLabel
Left = 1068
Left = 1100
Top = 44
Width = 64
Width = 32
Height = 15
Alignment = taRightJustify
BiDiMode = bdLeftToRight
@ -634,9 +634,9 @@ object frmZHCPList: TfrmZHCPList
ParentFont = False
end
object Label13: TLabel
Left = 1068
Left = 1100
Top = 12
Width = 64
Width = 32
Height = 15
Alignment = taRightJustify
BiDiMode = bdLeftToRight
@ -650,9 +650,9 @@ object frmZHCPList: TfrmZHCPList
ParentFont = False
end
object Label14: TLabel
Left = 348
Left = 396
Top = 12
Width = 80
Width = 32
Height = 15
Alignment = taRightJustify
BiDiMode = bdLeftToRight
@ -666,9 +666,9 @@ object frmZHCPList: TfrmZHCPList
ParentFont = False
end
object Label16: TLabel
Left = 1240
Left = 1272
Top = 44
Width = 64
Width = 32
Height = 15
Alignment = taRightJustify
BiDiMode = bdLeftToRight

View File

@ -526,6 +526,9 @@ begin
TBEdit.Visible := True;
v1ZICost.Visible := False;
v1ZICost.Hidden := True;
labelType.Items.Clear; // 清空现有选项
labelType.Items.Add('客户标签');
labelType.ItemIndex := 0;
end
else if Trim(Self.Caption) = '公司产品查询*' then
begin

View File

@ -571,15 +571,23 @@ object frmZHDJInPut: TfrmZHDJInPut
Options.Editing = False
Width = 141
end
object v1Column4: TcxGridDBColumn
object Tv1ZIMF: TcxGridDBColumn
Tag = 2
Caption = #38376#24133
DataBinding.FieldName = 'ZIMF'
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnChange = Tv1ZIMFPropertiesChange
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Sorting = False
Width = 50
end
object cxgrdbclmnTv1Column6: TcxGridDBColumn
Caption = #33521#23544#38376#24133
DataBinding.FieldName = 'ZIInchMF'
HeaderAlignmentHorz = taCenter
Width = 70
end
object v1Column6: TcxGridDBColumn
Tag = 2
Caption = #20811#37325

View File

@ -64,7 +64,7 @@ type
cxGrid1: TcxGrid;
Tv1: TcxGridDBTableView;
v1Column7: TcxGridDBColumn;
v1Column4: TcxGridDBColumn;
Tv1ZIMF: TcxGridDBColumn;
v1Column6: TcxGridDBColumn;
v1Column1: TcxGridDBColumn;
v1ZICost: TcxGridDBColumn;
@ -114,6 +114,7 @@ type
Tv1Column3: TcxGridDBColumn;
Tv1Column4: TcxGridDBColumn;
Tv1Column5: TcxGridDBColumn;
cxgrdbclmnTv1Column6: TcxGridDBColumn;
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBSaveClick(Sender: TObject);
@ -142,6 +143,7 @@ type
procedure v1Column3CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
procedure Tv1DblClick(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Tv1ZIMFPropertiesChange(Sender: TObject);
private
lstPat, lstPat2: TStringList;
FangXiang1, FangXiang2: string;
@ -2272,5 +2274,16 @@ begin
end;
end;
procedure TfrmZHDJInPut.Tv1ZIMFPropertiesChange(Sender: TObject);
var
Centimeters, Inches: Double;
Inch, ARecordIndex: Integer;
begin
Centimeters := StrToFloat(VarToStr(Tv1ZIMF.EditValue));
Inches := Centimeters * 0.393701;
Inch := strtoint(FormatFloat('0.00', Inches));
Order_Sub.FieldByName('ZIInchMF').Value := IntToStr(Inch - 1) + '"-' + IntToStr(Inch) + '"';
end;
end.