~
This commit is contained in:
parent
aada1fb524
commit
41b8787afa
535
坯布码单待检(PBMDDJ.dll)/U_ClothContractList_CG_help.dfm
Normal file
535
坯布码单待检(PBMDDJ.dll)/U_ClothContractList_CG_help.dfm
Normal file
|
|
@ -0,0 +1,535 @@
|
||||||
|
object frmClothContractList_CG_help: TfrmClothContractList_CG_help
|
||||||
|
Left = 669
|
||||||
|
Top = 237
|
||||||
|
Width = 1217
|
||||||
|
Height = 738
|
||||||
|
Caption = #22383#24067#37319#36141#35745#21010#20449#24687
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1201
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_PBMDDJ.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 0
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 20
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 441
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 21
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1201
|
||||||
|
Height = 53
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #30331#35760#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 161
|
||||||
|
Top = 22
|
||||||
|
Width = 6
|
||||||
|
Height = 12
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 267
|
||||||
|
Top = 22
|
||||||
|
Width = 78
|
||||||
|
Height = 12
|
||||||
|
Caption = #37319#36141#35745#21010#21333#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 440
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 592
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268#26684
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 720
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#26041
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 18
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 167
|
||||||
|
Top = 18
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object ConNoM: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 349
|
||||||
|
Top = 18
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
OnKeyPress = conPress
|
||||||
|
end
|
||||||
|
object C_CodeNameM: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 493
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
object C_Spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 624
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
object FactoryNoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 756
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 0
|
||||||
|
Top = 85
|
||||||
|
Width = 1201
|
||||||
|
Height = 497
|
||||||
|
Align = alTop
|
||||||
|
BorderStyle = bsNone
|
||||||
|
TabOrder = 2
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1201
|
||||||
|
Height = 497
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnMouseDown = Tv1MouseDown
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
OnCellDblClick = Tv1CellDblClick
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1PRTOrderQty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column1
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1PRTQty
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Inactive = DataLink_PBMDDJ.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_PBMDDJ.SHuangSe
|
||||||
|
Styles.Selection = DataLink_PBMDDJ.SHuangSe
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
object v1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #37319#36141#35745#21010#21333#21495
|
||||||
|
DataBinding.FieldName = 'ConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 98
|
||||||
|
end
|
||||||
|
object v1DeliveryDate: TcxGridDBColumn
|
||||||
|
Caption = #20132#36135#26085#26399
|
||||||
|
DataBinding.FieldName = 'DeliveryDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.SaveTime = False
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #31614#35746#26085#26399
|
||||||
|
DataBinding.FieldName = 'QDTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1FactoryNo1Name: TcxGridDBColumn
|
||||||
|
Caption = #20379#26041
|
||||||
|
DataBinding.FieldName = 'FactoryNoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 108
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1PRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'C_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1PRTMF: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133'(cm)'
|
||||||
|
DataBinding.FieldName = 'MFQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325'(g/'#13217')'
|
||||||
|
DataBinding.FieldName = 'KZQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v1Qty1: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 46
|
||||||
|
end
|
||||||
|
object v1PRTOrderQty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'C_Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1OrderUnit: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'C_Unit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 47
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 57
|
||||||
|
end
|
||||||
|
object v1PRTUnit: TcxGridDBColumn
|
||||||
|
Caption = #35745#20215#21333#20301
|
||||||
|
DataBinding.FieldName = 'PriceUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1PRTQty: TcxGridDBColumn
|
||||||
|
Caption = #24635#20215
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'C_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'LXPerson'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#26041#24335
|
||||||
|
DataBinding.FieldName = 'LXTel'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #31614#35746#22320#22336
|
||||||
|
DataBinding.FieldName = 'QDPalce'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_PBMDDJ.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 1128
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_PBMDDJ.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 936
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_PBMDDJ.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1000
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_PBMDDJ.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1040
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 1168
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 1096
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ClientDataSet3: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 1112
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = ClientDataSet2
|
||||||
|
Left = 880
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object DataSource3: TDataSource
|
||||||
|
DataSet = ClientDataSet3
|
||||||
|
Left = 1112
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object ClientDataSet2: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 920
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDBMain
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 352
|
||||||
|
Top = 192
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDBMain: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_PRT
|
||||||
|
Left = 400
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 416
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object CDS_PRT: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 32
|
||||||
|
end
|
||||||
|
end
|
||||||
592
坯布码单待检(PBMDDJ.dll)/U_ClothContractList_CG_help.pas
Normal file
592
坯布码单待检(PBMDDJ.dll)/U_ClothContractList_CG_help.pas
Normal file
|
|
@ -0,0 +1,592 @@
|
||||||
|
unit U_ClothContractList_CG_help;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
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, cxCalendar, cxButtonEdit, cxSplitter,
|
||||||
|
RM_Common, RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport,
|
||||||
|
cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore,
|
||||||
|
dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee,
|
||||||
|
dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
|
||||||
|
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans,
|
||||||
|
dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
|
||||||
|
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||||
|
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||||
|
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||||
|
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||||
|
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||||
|
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
|
||||||
|
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
||||||
|
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
||||||
|
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
|
||||||
|
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter,
|
||||||
|
cxNavigator;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmClothContractList_CG_help = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Label3: TLabel;
|
||||||
|
ConNoM: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
C_CodeNameM: TEdit;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
Label4: TLabel;
|
||||||
|
C_Spec: TEdit;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1OrderNo: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1DeliveryDate: TcxGridDBColumn;
|
||||||
|
v1FactoryNo1Name: TcxGridDBColumn;
|
||||||
|
v1PRTSpec: TcxGridDBColumn;
|
||||||
|
v1PRTMF: TcxGridDBColumn;
|
||||||
|
v1PRTKZ: TcxGridDBColumn;
|
||||||
|
v1PRTOrderQty: TcxGridDBColumn;
|
||||||
|
v1OrderUnit: TcxGridDBColumn;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1PRTUnit: TcxGridDBColumn;
|
||||||
|
v1PRTQty: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
ClientDataSet3: TClientDataSet;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
DataSource3: TDataSource;
|
||||||
|
ClientDataSet2: TClientDataSet;
|
||||||
|
v1Qty1: TcxGridDBColumn;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDBMain: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
v1Column7: TcxGridDBColumn;
|
||||||
|
CDS_PRT: TClientDataSet;
|
||||||
|
Label6: TLabel;
|
||||||
|
FactoryNoName: TEdit;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBFindClick(Sender: TObject);
|
||||||
|
procedure TBEditClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure ConNoMChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure Tv2MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column3PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure conPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
private
|
||||||
|
FInt,PFInt:Integer;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData():Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmClothContractList_CG_help: TfrmClothContractList_CG_help;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp; //U_ClothContractInPut_CG, U_ProductOrderList,
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmClothContractList_CG_help:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ScrollBox1.Align:=alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid(self.Caption,Tv1,'指示单管理');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * ');
|
||||||
|
sql.Add('from Contract_Main A');
|
||||||
|
sql.Add('inner join Contract_sub B on B.MainID=A.mainID ');
|
||||||
|
sql.Add('where A.FillTime>= '''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+''' ');
|
||||||
|
sql.Add('and A.FillTime< '''+Trim(FormatDateTime('yyyy-MM-dd',endDate.DateTime+1))+''' ');
|
||||||
|
sql.Add('and A.conType=''坯布采购计划'' ');
|
||||||
|
sql.Add('and Isnull(B.C_status,''0'')=''0'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.InitForm();
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption,Tv1,'指示单管理');
|
||||||
|
BegDate.DateTime:=SGetServerDate10(ADOQueryTemp)-7;
|
||||||
|
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBFindClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active=False then Exit;
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
// if Order_Main.IsEmpty then Exit;
|
||||||
|
// try
|
||||||
|
// frmClothContractInPut_CG:=TfrmClothContractInPut_CG.Create(Application);
|
||||||
|
// with frmClothContractInPut_CG do
|
||||||
|
// begin
|
||||||
|
// PState:=1;
|
||||||
|
// FMainId:=Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
// if ShowModal=1 then
|
||||||
|
// begin
|
||||||
|
//
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
// finally
|
||||||
|
// frmClothContractInPut_CG.Free;
|
||||||
|
// end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
if ClientDataSet2.IsEmpty=false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已到坯,不能删除坯布合同!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if trim(Order_Main.FieldByName('mainID').AsString)='CM001' then exit;
|
||||||
|
if DelData() then
|
||||||
|
begin
|
||||||
|
Order_Main.Delete;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmClothContractList_CG_help.DelData():Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result:=false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete YF_Money_CR where MainID='''+Trim(Order_Main.fieldbyname('MainID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
// sql.Add(' where CRID='+CRID);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub where SubId='''+Trim(Order_Main.fieldbyname('SubId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Trim(Order_Main.fieldbyname('SubId').AsString)='' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result:=False;
|
||||||
|
Application.MessageBox('数据删除异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel('坯布合同订单列表',cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile,FConNoM:string;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\坯布订购合同.rmf' ;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec ClothContract_QryList :MainId,:WSql');
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and FillTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+''''
|
||||||
|
+' and FillTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''';
|
||||||
|
Parameters.ParamByName('MainId').Value:=Trim(Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
Parameters.ParamByName('WSql').Value:='';
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp,CDS_PRT);
|
||||||
|
SInitCDSData20(ADOQueryTemp,CDS_PRT);
|
||||||
|
FConNoM:=Trim(CDS_PRT.fieldbyname('ConNoM').AsString);
|
||||||
|
//SDofilter(ADOQueryMain,' ConNoM='''+Trim(Order_Main.fieldbyname('ConNoM').AsString)+'''');
|
||||||
|
//SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
//SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
//RMVariables['begindate']:=begindate.DateTime;
|
||||||
|
//RMVariables['enddate']:=enddate.DateTime;
|
||||||
|
//RMVariables['printtime']:=Now;
|
||||||
|
//RMVariables['printer']:=Trim(gUserName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\坯布订购合同.rmf'),'提示',0);
|
||||||
|
end;
|
||||||
|
//SDofilter(ADOQueryMain,'');
|
||||||
|
//SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
//SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
//Order_Main.Locate('ConNoM',FConNoM,[]);
|
||||||
|
//SelPrintData(TV4,ADOQueryMain,'合同查询报表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBAddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
// try
|
||||||
|
// frmClothContractInPut_CG:=TfrmClothContractInPut_CG.Create(Application);
|
||||||
|
// with frmClothContractInPut_CG do
|
||||||
|
// begin
|
||||||
|
// PState:=0;
|
||||||
|
// FMainId:='';
|
||||||
|
// if ShowModal=1 then
|
||||||
|
// begin
|
||||||
|
//
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
// finally
|
||||||
|
// frmClothContractInPut_CG.Free;
|
||||||
|
// end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.ConNoMChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active=False then Exit;
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.Tv2MouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt:=2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.Tv1MouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno:string;
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then Exit;
|
||||||
|
if ClientDataSet2.IsEmpty then Exit;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MXId').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('到货数量未确定!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ClientDataSet3.Locate('OrderNo',null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('指定订单编号不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
BegDate.SetFocus;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
//保存去向表
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxno,'To','Contract_Sub_MxTo',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取去向流水号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxno:=Trim(ClientDataSet3.fieldbyname('ToId').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub_MxTo where ToId='''+Trim(ClientDataSet3.fieldbyname('ToId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString)='' then
|
||||||
|
Append
|
||||||
|
else
|
||||||
|
Edit;
|
||||||
|
FieldByName('MxId').Value:=Trim(ClientDataSet2.fieldbyname('MxId').AsString);
|
||||||
|
FieldByName('ToId').Value:=Trim(maxno);
|
||||||
|
FieldByName('OrdSubId').Value:=Trim(ClientDataSet3.fieldbyname('OrdSubId').AsString);
|
||||||
|
FieldByName('TPDate').Value:=ClientDataSet3.fieldbyname('TPDate').Value;
|
||||||
|
FieldByName('TPPerson').Value:=ClientDataSet3.fieldbyname('TPPerson').Value;
|
||||||
|
FieldByName('TPNote').Value:=ClientDataSet3.fieldbyname('TPNote').Value;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('TPQty').AsString)<>'' then
|
||||||
|
FieldByName('TPQty').Value:=ClientDataSet3.fieldbyname('TPQty').Value
|
||||||
|
else
|
||||||
|
FieldByName('TPQty').Value:=0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty1').AsString)<>'' then
|
||||||
|
FieldByName('Qty1').Value:=ClientDataSet3.fieldbyname('Qty1').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty1').Value:=0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty2').AsString)<>'' then
|
||||||
|
FieldByName('Qty2').Value:=ClientDataSet3.fieldbyname('Qty2').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty2').Value:=0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty3').AsString)<>'' then
|
||||||
|
FieldByName('Qty3').Value:=ClientDataSet3.fieldbyname('Qty3').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty3').Value:=0;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ToId').Value:=Trim(maxno);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('操作成功!','提示',0);
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('操作异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FInt=2 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet2.IsEmpty then Exit;
|
||||||
|
if ClientDataSet3.IsEmpty=false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生坯布领料数据,不能删除到坯记录!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MxId').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_Mx where MxId='''+Trim(ClientDataSet2.fieldbyname('MxId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet2.Delete;
|
||||||
|
end else
|
||||||
|
if FInt=3 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then Exit;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_MxTo where ToId='''+Trim(ClientDataSet3.fieldbyname('ToId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet3.Delete;
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
if ClientDataSet3.IsEmpty=False then
|
||||||
|
// FieldByName('KCSL').Value:=ClientDataSet2.fieldbyname('MxQty').Value-tv3.DataController.Summary.FooterSummaryValues[0]
|
||||||
|
else
|
||||||
|
FieldByName('KCSL').Value:=ClientDataSet2.fieldbyname('MxQty').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.v2Column3PropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='RKPlace';
|
||||||
|
flagname:='入库地点';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('RKPlace').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.conPress(Sender: TObject;
|
||||||
|
var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key=#13 then
|
||||||
|
begin
|
||||||
|
if Length(Trim(ConNoM.Text))<4 then Exit;
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec ClothContract_QryList :MainId,:WSql');
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and OM.conNo like '''+'%'+Trim(ConNoM.Text)+'%'+'''';
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.Tv1CellDblClick(
|
||||||
|
Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
IF Order_Main.IsEmpty then exit;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
object frmSXCKInPut: TfrmSXCKInPut
|
object frmSXCKInPut: TfrmSXCKInPut
|
||||||
Left = -8
|
Left = 247
|
||||||
Top = -8
|
Top = 398
|
||||||
Width = 1382
|
Width = 1382
|
||||||
Height = 754
|
Height = 655
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Caption = #22383#24067#20837#24211
|
Caption = #22383#24067#20837#24211
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
|
|
@ -21,12 +21,12 @@ object frmSXCKInPut: TfrmSXCKInPut
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 33
|
Top = 33
|
||||||
Width = 1366
|
Width = 1366
|
||||||
Height = 683
|
Height = 583
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
OnMouseDown = Tv1MouseDown
|
OnMouseDown = Tv1MouseDown
|
||||||
NavigatorButtons.ConfirmDelete = False
|
Navigator.Buttons.CustomButtons = <>
|
||||||
OnCellClick = Tv1CellClick
|
OnCellClick = Tv1CellClick
|
||||||
DataController.DataSource = DataSource3
|
DataController.DataSource = DataSource3
|
||||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
|
@ -267,7 +267,7 @@ object frmSXCKInPut: TfrmSXCKInPut
|
||||||
Width = 1366
|
Width = 1366
|
||||||
Height = 33
|
Height = 33
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 59
|
ButtonWidth = 71
|
||||||
Caption = 'ToolBar1'
|
Caption = 'ToolBar1'
|
||||||
Color = clSkyBlue
|
Color = clSkyBlue
|
||||||
Flat = True
|
Flat = True
|
||||||
|
|
@ -290,16 +290,25 @@ object frmSXCKInPut: TfrmSXCKInPut
|
||||||
ImageIndex = 15
|
ImageIndex = 15
|
||||||
OnClick = TBSaveClick
|
OnClick = TBSaveClick
|
||||||
end
|
end
|
||||||
object TBAdd: TToolButton
|
object ToolButton1: TToolButton
|
||||||
Left = 63
|
Left = 63
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #26032#22686
|
Caption = #26032#22686
|
||||||
ImageIndex = 12
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686#21407
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
OnClick = TBAddClick
|
OnClick = TBAddClick
|
||||||
end
|
end
|
||||||
object TBDel: TToolButton
|
object TBDel: TToolButton
|
||||||
Left = 126
|
Left = 201
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #21024#38500
|
Caption = #21024#38500
|
||||||
|
|
@ -307,7 +316,7 @@ object frmSXCKInPut: TfrmSXCKInPut
|
||||||
OnClick = TBDelClick
|
OnClick = TBDelClick
|
||||||
end
|
end
|
||||||
object TBClose: TToolButton
|
object TBClose: TToolButton
|
||||||
Left = 189
|
Left = 264
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20851#38381
|
Caption = #20851#38381
|
||||||
|
|
@ -315,7 +324,7 @@ object frmSXCKInPut: TfrmSXCKInPut
|
||||||
OnClick = TBCloseClick
|
OnClick = TBCloseClick
|
||||||
end
|
end
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 252
|
Left = 327
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 797
|
Width = 797
|
||||||
Height = 30
|
Height = 30
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -12,7 +12,20 @@ uses
|
||||||
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, cxCheckBox, RM_Common,
|
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, cxCheckBox, RM_Common,
|
||||||
RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, Menus,
|
RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, Menus,
|
||||||
cxCalendar, cxButtonEdit, cxTextEdit, cxLookAndFeels,
|
cxCalendar, cxButtonEdit, cxTextEdit, 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
|
||||||
TfrmSXCKNewList = class(TForm)
|
TfrmSXCKNewList = class(TForm)
|
||||||
|
|
@ -315,7 +328,7 @@ begin
|
||||||
if ShowModal=1 then
|
if ShowModal=1 then
|
||||||
begin
|
begin
|
||||||
Self.InitGrid();
|
Self.InitGrid();
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
frmSXCKInPut.Free;
|
frmSXCKInPut.Free;
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ DebugSourceDirs=
|
||||||
UsePackages=0
|
UsePackages=0
|
||||||
[Parameters]
|
[Parameters]
|
||||||
RunParams=
|
RunParams=
|
||||||
HostApplication=D:\Ðì¼ÓÑÞÏîÄ¿´úÂë\ÏîÄ¿´úÂë\¹ð»ª\»ù´¡×ÊÁÏά»¤(BaseInfo.dll)\testDll.exe
|
HostApplication=D:\Dp7Repo\ÏîÄ¿´úÂë\D7wmguihua\»ù´¡×ÊÁÏά»¤(BaseInfo.dll)\testDll.exe
|
||||||
Launcher=
|
Launcher=
|
||||||
UseLauncher=0
|
UseLauncher=0
|
||||||
DebugCWD=
|
DebugCWD=
|
||||||
|
|
|
||||||
|
|
@ -130,13 +130,20 @@ object frmZdyAttachPB: TfrmZdyAttachPB
|
||||||
Caption = #20135#21697#32534#21495
|
Caption = #20135#21697#32534#21495
|
||||||
end
|
end
|
||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
Left = 369
|
Left = 649
|
||||||
Top = 13
|
Top = 13
|
||||||
Width = 24
|
Width = 24
|
||||||
Height = 12
|
Height = 12
|
||||||
Caption = #31867#22411
|
Caption = #31867#22411
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 368
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #25104#21697#36135#21495
|
||||||
|
end
|
||||||
object ZdyName: TEdit
|
object ZdyName: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 241
|
Left = 241
|
||||||
|
|
@ -157,7 +164,7 @@ object frmZdyAttachPB: TfrmZdyAttachPB
|
||||||
end
|
end
|
||||||
object DEFstr5: TComboBox
|
object DEFstr5: TComboBox
|
||||||
Tag = 1
|
Tag = 1
|
||||||
Left = 398
|
Left = 678
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 81
|
Width = 81
|
||||||
Height = 20
|
Height = 20
|
||||||
|
|
@ -171,6 +178,15 @@ object frmZdyAttachPB: TfrmZdyAttachPB
|
||||||
#25104#21697
|
#25104#21697
|
||||||
'')
|
'')
|
||||||
end
|
end
|
||||||
|
object CPhh: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 418
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object cxGrid2: TcxGrid
|
object cxGrid2: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
|
|
|
||||||
|
|
@ -3,25 +3,38 @@ unit U_ZdyAttachPB;
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, ComObj,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
ComObj, Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB,
|
||||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
ADODB, cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||||
cxButtonEdit, cxTextEdit, Menus, cxLookAndFeelPainters, cxButtons,
|
cxTextEdit, Menus, cxLookAndFeelPainters, cxButtons, cxLookAndFeels,
|
||||||
cxLookAndFeels, cxNavigator;
|
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
|
||||||
|
FdDy = record
|
||||||
|
inc: integer; //客户端套接字句柄
|
||||||
|
FDdys: string[32]; //客户端套接字
|
||||||
|
FdDysName: string[32]; //客户端套接字
|
||||||
|
end;
|
||||||
|
|
||||||
FdDy=record
|
|
||||||
inc: integer; //客户端套接字句柄
|
|
||||||
FDdys:string[32]; //客户端套接字
|
|
||||||
FdDysName:string[32]; //客户端套接字
|
|
||||||
end;
|
|
||||||
TfrmZdyAttachPB = class(TForm)
|
TfrmZdyAttachPB = class(TForm)
|
||||||
ToolBar1: TToolBar;
|
ToolBar1: TToolBar;
|
||||||
TBRafresh: TToolButton;
|
TBRafresh: TToolButton;
|
||||||
|
|
@ -74,6 +87,8 @@ type
|
||||||
cxButton2: TcxButton;
|
cxButton2: TcxButton;
|
||||||
v2Column16: TcxGridDBColumn;
|
v2Column16: TcxGridDBColumn;
|
||||||
Tv2Column1: TcxGridDBColumn;
|
Tv2Column1: TcxGridDBColumn;
|
||||||
|
Label5: TLabel;
|
||||||
|
CPhh: TEdit;
|
||||||
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);
|
||||||
|
|
@ -92,9 +107,8 @@ type
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
|
|
||||||
public
|
public
|
||||||
fkhType:string;
|
fkhType: string;
|
||||||
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -102,65 +116,66 @@ var
|
||||||
frmZdyAttachPB: TfrmZdyAttachPB;
|
frmZdyAttachPB: TfrmZdyAttachPB;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
U_DataLink,U_Fun,U_ZDYHelp,U_ZdyAttInputPB;
|
U_DataLink, U_Fun, U_ZDYHelp, U_ZdyAttInputPB;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.InitGrid();
|
procedure TfrmZdyAttachPB.InitGrid();
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
ADOQueryMain.DisableControls;
|
ADOQueryMain.DisableControls;
|
||||||
with ADOQueryMain do
|
with ADOQueryMain do
|
||||||
begin
|
begin
|
||||||
Filtered:=False;
|
Filtered := False;
|
||||||
Close;
|
Close;
|
||||||
SQL.Clear;
|
SQL.Clear;
|
||||||
sql.Add(' select ATID,ZdyName,ZdyCode,DEFstr1,DEFstr2,defNote1,Mrate,defNote2,defNote3,DEFstr3,DEFstr5,DEFstr4,');
|
sql.Add(' select ATID,ZdyName,ZdyCode,DEFstr1,DEFstr2,defNote1,Mrate,defNote2,defNote3,DEFstr3,DEFstr5,DEFstr4,');
|
||||||
sql.Add(' DEFstr6,DEFstr7,DEFstr8,Note,DEFstr4,DEFstr5,defflt1,CPhh,Filler,FillTime ');
|
sql.Add(' DEFstr6,DEFstr7,DEFstr8,Note,DEFstr4,DEFstr5,defflt1,CPhh,Filler,FillTime ');
|
||||||
sql.Add(' from KH_Zdy_Attachment where Type=''CP'' and DEFstr5=''坯布'' ');
|
sql.Add(' from KH_Zdy_Attachment where Type=''CP'' and DEFstr5=''坯布'' ');
|
||||||
sql.Add(' and isnull(khType,'''')='+quotedstr(trim(fkhType)));
|
sql.Add(' and isnull(khType,'''')=' + quotedstr(trim(fkhType)));
|
||||||
sql.Add(' order by zdyName,dbo.getNum(Defstr3) ');
|
sql.Add(' order by zdyName,dbo.getNum(Defstr3) ');
|
||||||
// sql.Add(' order by zdyName ');
|
// sql.Add(' order by zdyName ');
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||||
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||||
finally
|
finally
|
||||||
ADOQueryMain.EnableControls;
|
ADOQueryMain.EnableControls;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.FormDestroy(Sender: TObject);
|
procedure TfrmZdyAttachPB.FormDestroy(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
frmZdyAttachPB:=nil;
|
frmZdyAttachPB := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure TfrmZdyAttachPB.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
begin
|
begin
|
||||||
Action:=caFree;
|
Action := caFree;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.TBCloseClick(Sender: TObject);
|
procedure TfrmZdyAttachPB.TBCloseClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
WriteCxGrid('产品资料13',Tv2,'客户自定义');
|
WriteCxGrid('产品资料13', Tv2, '客户自定义');
|
||||||
Close;
|
Close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.TBDelClick(Sender: TObject);
|
procedure TfrmZdyAttachPB.TBDelClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if CDS_HZ.IsEmpty then Exit;
|
if CDS_HZ.IsEmpty then
|
||||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
Exit;
|
||||||
if Trim(CDS_HZ.fieldbyname('ATID').AsString)<>'' then
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('ATID').AsString) <> '' then
|
||||||
begin
|
begin
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
SQL.Clear;
|
SQL.Clear;
|
||||||
sql.Add('delete KH_Zdy_Attachment where ATID='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
sql.Add('delete KH_Zdy_Attachment where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
sql.Add('delete KH_Zdy where ZdyNo='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
sql.Add('delete KH_Zdy where ZdyNo=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
ExecSQL;
|
ExecSQL;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
@ -169,7 +184,7 @@ end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.FormShow(Sender: TObject);
|
procedure TfrmZdyAttachPB.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ReadCxGrid('产品资料13',Tv2,'客户自定义');
|
ReadCxGrid('产品资料13', Tv2, '客户自定义');
|
||||||
InitGrid();
|
InitGrid();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -182,9 +197,9 @@ procedure TfrmZdyAttachPB.ToolButton2Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ADOQueryMain.Active then
|
if ADOQueryMain.Active then
|
||||||
begin
|
begin
|
||||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||||
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -193,23 +208,23 @@ begin
|
||||||
ToolButton2.Click;
|
ToolButton2.Click;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.ToolButton1Click(Sender: TObject);
|
procedure TfrmZdyAttachPB.ToolButton1Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ADOQueryMain.IsEmpty then Exit;
|
if ADOQueryMain.IsEmpty then
|
||||||
TcxGridToExcel(self.Caption,cxgrid2);
|
Exit;
|
||||||
|
TcxGridToExcel(self.Caption, cxgrid2);
|
||||||
// SelExportData(Tv2,ADOQueryMain,'产品资料列表');
|
// SelExportData(Tv2,ADOQueryMain,'产品资料列表');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.ToolButton4Click(Sender: TObject);
|
procedure TfrmZdyAttachPB.ToolButton4Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
frmZdyAttInputPB:=TfrmZdyAttInputPB.Create(Application);
|
frmZdyAttInputPB := TfrmZdyAttInputPB.Create(Application);
|
||||||
with frmZdyAttInputPB do
|
with frmZdyAttInputPB do
|
||||||
begin
|
begin
|
||||||
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
FCYID := Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
fkhType:=self.fkhType;
|
fkhType := self.fkhType;
|
||||||
if ShowModal=1 then
|
if ShowModal = 1 then
|
||||||
begin
|
begin
|
||||||
TBRafresh.Click;
|
TBRafresh.Click;
|
||||||
end;
|
end;
|
||||||
|
|
@ -222,12 +237,12 @@ end;
|
||||||
procedure TfrmZdyAttachPB.ToolButton3Click(Sender: TObject);
|
procedure TfrmZdyAttachPB.ToolButton3Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
frmZdyAttInputPB:=TfrmZdyAttInputPB.Create(Application);
|
frmZdyAttInputPB := TfrmZdyAttInputPB.Create(Application);
|
||||||
with frmZdyAttInputPB do
|
with frmZdyAttInputPB do
|
||||||
begin
|
begin
|
||||||
FCYID:='';
|
FCYID := '';
|
||||||
fkhType:=self.fkhType;
|
fkhType := self.fkhType;
|
||||||
if ShowModal=1 then
|
if ShowModal = 1 then
|
||||||
begin
|
begin
|
||||||
TBRafresh.Click;
|
TBRafresh.Click;
|
||||||
end;
|
end;
|
||||||
|
|
@ -239,99 +254,99 @@ end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.ToolButton5Click(Sender: TObject);
|
procedure TfrmZdyAttachPB.ToolButton5Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
excelApp,WorkBook:Variant;
|
excelApp, WorkBook: Variant;
|
||||||
i,j,k,ExcelRowCount:integer;
|
i, j, k, ExcelRowCount: integer;
|
||||||
maxId:string;
|
maxId: string;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
try
|
try
|
||||||
ExcelApp := CreateOleObject('Excel.Application');
|
excelApp := CreateOleObject('Excel.Application');
|
||||||
openDialog1.Filter:='*.CSV;*.xls';
|
openDialog1.Filter := '*.CSV;*.xls';
|
||||||
if opendialog1.Execute then
|
if opendialog1.Execute then
|
||||||
begin
|
begin
|
||||||
WorkBook :=ExcelApp.WorkBooks.Open(OpenDialog1.FileName);
|
WorkBook := excelApp.WorkBooks.Open(OpenDialog1.FileName);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
ExcelApp.Visible := false;
|
excelApp.Visible := false;
|
||||||
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
|
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
|
||||||
except
|
except
|
||||||
application.MessageBox('加载EXCEL错误!','错误信息',MB_ICONERROR);
|
application.MessageBox('加载EXCEL错误!', '错误信息', MB_ICONERROR);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
try
|
try
|
||||||
k:=0;
|
k := 0;
|
||||||
for i:=1 to 20 do
|
for i := 1 to 20 do
|
||||||
begin
|
begin
|
||||||
if trim(excelapp.Cells[1,i].value)='' then break;
|
if trim(excelApp.Cells[1, i].value) = '' then
|
||||||
if trim(excelapp.Cells[1,i].value)='产品编号' then
|
break;
|
||||||
|
if trim(excelApp.Cells[1, i].value) = '产品编号' then
|
||||||
begin
|
begin
|
||||||
dFdDy[k].inc:=i;
|
dFdDy[k].inc := i;
|
||||||
dFdDy[k].FDdys:='ZdyCode';
|
dFdDy[k].FDdys := 'ZdyCode';
|
||||||
dFdDy[k].FdDysName:='产品编号';
|
dFdDy[k].FdDysName := '产品编号';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if trim(excelapp.Cells[1,i].value)='产品名称' then
|
if trim(excelApp.Cells[1, i].value) = '产品名称' then
|
||||||
begin
|
begin
|
||||||
dFdDy[k].inc:=i;
|
dFdDy[k].inc := i;
|
||||||
dFdDy[k].FDdys:='ZdyName';
|
dFdDy[k].FDdys := 'ZdyName';
|
||||||
dFdDy[k].FdDysName:='产品名称';
|
dFdDy[k].FdDysName := '产品名称';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if trim(excelapp.Cells[1,i].value)='中文名称' then
|
if trim(excelApp.Cells[1, i].value) = '中文名称' then
|
||||||
begin
|
begin
|
||||||
dFdDy[k].inc:=i;
|
dFdDy[k].inc := i;
|
||||||
dFdDy[k].FDdys:='defNote3';
|
dFdDy[k].FDdys := 'defNote3';
|
||||||
dFdDy[k].FdDysName:='中文名称';
|
dFdDy[k].FdDysName := '中文名称';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if trim(excelapp.Cells[1,i].value)='颜色' then
|
if trim(excelApp.Cells[1, i].value) = '颜色' then
|
||||||
begin
|
begin
|
||||||
dFdDy[k].inc:=i;
|
dFdDy[k].inc := i;
|
||||||
dFdDy[k].FDdys:='DEFstr3';
|
dFdDy[k].FDdys := 'DEFstr3';
|
||||||
dFdDy[k].FdDysName:='颜色';
|
dFdDy[k].FdDysName := '颜色';
|
||||||
end;
|
end;
|
||||||
if trim(excelapp.Cells[1,i].value)='中文颜色' then
|
if trim(excelApp.Cells[1, i].value) = '中文颜色' then
|
||||||
begin
|
begin
|
||||||
dFdDy[k].inc:=i;
|
dFdDy[k].inc := i;
|
||||||
dFdDy[k].FDdys:='DEFstr6';
|
dFdDy[k].FDdys := 'DEFstr6';
|
||||||
dFdDy[k].FdDysName:='中文颜色';
|
dFdDy[k].FdDysName := '中文颜色';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if trim(excelApp.Cells[1, i].value) = '类型' then
|
||||||
if trim(excelapp.Cells[1,i].value)='类型' then
|
|
||||||
begin
|
begin
|
||||||
dFdDy[k].inc:=i;
|
dFdDy[k].inc := i;
|
||||||
dFdDy[k].FDdys:='DEFstr5';
|
dFdDy[k].FDdys := 'DEFstr5';
|
||||||
dFdDy[k].FdDysName:='类型';
|
dFdDy[k].FdDysName := '类型';
|
||||||
end;
|
end;
|
||||||
if trim(excelapp.Cells[1,i].value)='规格' then
|
if trim(excelApp.Cells[1, i].value) = '规格' then
|
||||||
begin
|
begin
|
||||||
dFdDy[k].inc:=i;
|
dFdDy[k].inc := i;
|
||||||
dFdDy[k].FDdys:='DEFstr1';
|
dFdDy[k].FDdys := 'DEFstr1';
|
||||||
dFdDy[k].FdDysName:='规格';
|
dFdDy[k].FdDysName := '规格';
|
||||||
end;
|
end;
|
||||||
if trim(excelapp.Cells[1,i].value)='成份' then
|
if trim(excelApp.Cells[1, i].value) = '成份' then
|
||||||
begin
|
begin
|
||||||
dFdDy[k].inc:=i;
|
dFdDy[k].inc := i;
|
||||||
dFdDy[k].FDdys:='DEFstr2';
|
dFdDy[k].FDdys := 'DEFstr2';
|
||||||
dFdDy[k].FdDysName:='成份';
|
dFdDy[k].FdDysName := '成份';
|
||||||
end;
|
end;
|
||||||
k:=k+1;
|
k := k + 1;
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ADOQueryCmd.Connection.BeginTrans;
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
try
|
try
|
||||||
for i := 2 to excelrowcount do
|
for i := 2 to ExcelRowCount do
|
||||||
begin
|
begin
|
||||||
if GetLSNo(ADOQueryCmd,maxId,'AT','KH_Zdy_Attachment',4,1)=False then
|
if GetLSNo(ADOQueryCmd, maxId, 'AT', 'KH_Zdy_Attachment', 4, 1) = False then
|
||||||
begin
|
begin
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
Application.MessageBox('取最大号失败!','提示',0);
|
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -343,83 +358,84 @@ begin
|
||||||
open;
|
open;
|
||||||
end;
|
end;
|
||||||
ADOQueryCmd.Append;
|
ADOQueryCmd.Append;
|
||||||
for j:=0 to k-1 do
|
for j := 0 to k - 1 do
|
||||||
begin
|
begin
|
||||||
ADOQueryCmd.fieldbyname(dFdDy[j].FDdys).Value:=excelapp.Cells[i,dFdDy[j].inc].Value;
|
ADOQueryCmd.fieldbyname(dFdDy[j].FDdys).Value := excelApp.Cells[i, dFdDy[j].inc].Value;
|
||||||
end;
|
end;
|
||||||
ADOQueryCmd.FieldByName('ATID').Value:=Trim(maxId);
|
ADOQueryCmd.FieldByName('ATID').Value := Trim(maxId);
|
||||||
ADOQueryCmd.FieldByName('zdyCode').Value:=Trim(maxId);
|
ADOQueryCmd.FieldByName('zdyCode').Value := Trim(maxId);
|
||||||
ADOQueryCmd.FieldByName('khType').Value:=Trim(fkhType);
|
ADOQueryCmd.FieldByName('khType').Value := Trim(fkhType);
|
||||||
ADOQueryCmd.FieldByName('Type').Value:='CP';
|
ADOQueryCmd.FieldByName('Type').Value := 'CP';
|
||||||
ADOQueryCmd.FieldByName('Filler').Value:=Trim(DName);
|
ADOQueryCmd.FieldByName('Filler').Value := Trim(DName);
|
||||||
ADOQueryCmd.Post;
|
ADOQueryCmd.Post;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
WorkBook.Close;
|
WorkBook.Close;
|
||||||
ExcelApp.Quit;
|
excelApp.Quit;
|
||||||
ExcelApp := Unassigned;
|
excelApp := Unassigned;
|
||||||
WorkBook := Unassigned;
|
WorkBook := Unassigned;
|
||||||
ADOQueryCmd.Connection.CommitTrans;
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
InitGrid();
|
InitGrid();
|
||||||
except
|
except
|
||||||
WorkBook.Close;
|
WorkBook.Close;
|
||||||
ExcelApp.Quit;
|
excelApp.Quit;
|
||||||
ExcelApp := Unassigned;
|
excelApp := Unassigned;
|
||||||
WorkBook := Unassigned;
|
WorkBook := Unassigned;
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.cxButton2Click(Sender: TObject);
|
procedure TfrmZdyAttachPB.cxButton2Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Panel2.Visible:=false;
|
Panel2.Visible := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.cxButton1Click(Sender: TObject);
|
procedure TfrmZdyAttachPB.cxButton1Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
fPrintFile:string;
|
fPrintFile: string;
|
||||||
Txt,fImagePath:string;
|
Txt, fImagePath: string;
|
||||||
Moudle: THandle;
|
Moudle: THandle;
|
||||||
Makebar:TMakebar;
|
Makebar: TMakebar;
|
||||||
Mixtext:TMixtext;
|
Mixtext: TMixtext;
|
||||||
begin
|
begin
|
||||||
IF CDS_HZ.IsEmpty then exit;
|
if CDS_HZ.IsEmpty then
|
||||||
try
|
exit;
|
||||||
Moudle:=LoadLibrary('MakeQRBarcode.dll');
|
try
|
||||||
@Makebar:=GetProcAddress(Moudle,'Make');
|
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||||
@Mixtext:=GetProcAddress(Moudle,'MixText');
|
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||||
Txt:=Trim(CDS_HZ.fieldbyname('ZDYCODE').AsString);
|
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||||
fImagePath:=ExtractFilePath(Application.ExeName)+'image\temp.bmp' ;
|
Txt := Trim(CDS_HZ.fieldbyname('ZDYCODE').AsString);
|
||||||
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName)+'image')) then
|
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||||
CreateDirectory(pchar(ExtractFilePath(Application.ExeName)+'image'),nil);
|
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||||
if FileExists(fImagePath) then DeleteFile(fImagePath);
|
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||||
Makebar(pchar(Txt),Length(Txt),3,3,0,PChar(fImagePath),3);
|
if FileExists(fImagePath) then
|
||||||
except
|
DeleteFile(fImagePath);
|
||||||
application.MessageBox('条形码生成失败!','提示信息',MB_ICONERROR);
|
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||||
exit;
|
except
|
||||||
end;
|
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
fPrintFile:=ExtractFilePath(Application.ExeName)+'Report\'+trim(RadioGroup1.Items[RadioGroup1.ItemIndex])+'.rmf' ;
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + trim(RadioGroup1.Items[RadioGroup1.ItemIndex]) + '.rmf';
|
||||||
if FileExists(fPrintFile) then
|
if FileExists(fPrintFile) then
|
||||||
begin
|
begin
|
||||||
RMVariables['QRBARCODE']:=fImagePath;
|
RMVariables['QRBARCODE'] := fImagePath;
|
||||||
RM1.LoadFromFile(fPrintFile);
|
RM1.LoadFromFile(fPrintFile);
|
||||||
// Rm2.DefaultCopies:=strtointdef(trim(ComboBox1.Text),1);
|
// Rm2.DefaultCopies:=strtointdef(trim(ComboBox1.Text),1);
|
||||||
// RM1.ShowReport;
|
// RM1.ShowReport;
|
||||||
RM1.PrintReport;
|
RM1.PrintReport;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Application.MessageBox(PChar('没有找到文件'+fPrintFile),'提示',0);
|
Application.MessageBox(PChar('没有找到文件' + fPrintFile), '提示', 0);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmZdyAttachPB.ToolButton6Click(Sender: TObject);
|
procedure TfrmZdyAttachPB.ToolButton6Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Panel2.Left:=(self.Width-Panel2.Width) div 2;
|
Panel2.Left := (self.Width - Panel2.Width) div 2;
|
||||||
Panel2.Top:=(self.Height-Panel2.Height) div 2 -100;
|
Panel2.Top := (self.Height - Panel2.Height) div 2 - 100;
|
||||||
Panel2.Visible:=true;
|
Panel2.Visible := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user