~
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
|
||||
Left = -8
|
||||
Top = -8
|
||||
Left = 247
|
||||
Top = 398
|
||||
Width = 1382
|
||||
Height = 754
|
||||
Height = 655
|
||||
Align = alClient
|
||||
Caption = #22383#24067#20837#24211
|
||||
Color = clBtnFace
|
||||
|
|
@ -21,12 +21,12 @@ object frmSXCKInPut: TfrmSXCKInPut
|
|||
Left = 0
|
||||
Top = 33
|
||||
Width = 1366
|
||||
Height = 683
|
||||
Height = 583
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnMouseDown = Tv1MouseDown
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
|
|
@ -267,7 +267,7 @@ object frmSXCKInPut: TfrmSXCKInPut
|
|||
Width = 1366
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
ButtonWidth = 71
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
|
|
@ -290,16 +290,25 @@ object frmSXCKInPut: TfrmSXCKInPut
|
|||
ImageIndex = 15
|
||||
OnClick = TBSaveClick
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
object ToolButton1: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
ImageIndex = 12
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686#21407
|
||||
ImageIndex = 12
|
||||
Visible = False
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 126
|
||||
Left = 201
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
|
|
@ -307,7 +316,7 @@ object frmSXCKInPut: TfrmSXCKInPut
|
|||
OnClick = TBDelClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 189
|
||||
Left = 264
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
|
|
@ -315,7 +324,7 @@ object frmSXCKInPut: TfrmSXCKInPut
|
|||
OnClick = TBCloseClick
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 252
|
||||
Left = 327
|
||||
Top = 0
|
||||
Width = 797
|
||||
Height = 30
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -12,7 +12,20 @@ uses
|
|||
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, cxCheckBox, RM_Common,
|
||||
RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, Menus,
|
||||
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
|
||||
TfrmSXCKNewList = class(TForm)
|
||||
|
|
@ -315,7 +328,7 @@ begin
|
|||
if ShowModal=1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmSXCKInPut.Free;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ DebugSourceDirs=
|
|||
UsePackages=0
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=D:\Ðì¼ÓÑÞÏîÄ¿´úÂë\ÏîÄ¿´úÂë\¹ð»ª\»ù´¡×ÊÁÏά»¤(BaseInfo.dll)\testDll.exe
|
||||
HostApplication=D:\Dp7Repo\ÏîÄ¿´úÂë\D7wmguihua\»ù´¡×ÊÁÏά»¤(BaseInfo.dll)\testDll.exe
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
|
|
|
|||
|
|
@ -130,13 +130,20 @@ object frmZdyAttachPB: TfrmZdyAttachPB
|
|||
Caption = #20135#21697#32534#21495
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 369
|
||||
Left = 649
|
||||
Top = 13
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #31867#22411
|
||||
Visible = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 368
|
||||
Top = 13
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #25104#21697#36135#21495
|
||||
end
|
||||
object ZdyName: TEdit
|
||||
Tag = 2
|
||||
Left = 241
|
||||
|
|
@ -157,7 +164,7 @@ object frmZdyAttachPB: TfrmZdyAttachPB
|
|||
end
|
||||
object DEFstr5: TComboBox
|
||||
Tag = 1
|
||||
Left = 398
|
||||
Left = 678
|
||||
Top = 8
|
||||
Width = 81
|
||||
Height = 20
|
||||
|
|
@ -171,6 +178,15 @@ object frmZdyAttachPB: TfrmZdyAttachPB
|
|||
#25104#21697
|
||||
'')
|
||||
end
|
||||
object CPhh: TEdit
|
||||
Tag = 2
|
||||
Left = 418
|
||||
Top = 9
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = ZdyNameChange
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
|
|
|
|||
|
|
@ -3,25 +3,38 @@ unit U_ZdyAttachPB;
|
|||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, ComObj,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
ComObj, Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB,
|
||||
ADODB, cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||
cxButtonEdit, cxTextEdit, Menus, cxLookAndFeelPainters, cxButtons,
|
||||
cxLookAndFeels, cxNavigator;
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, Menus, cxLookAndFeelPainters, cxButtons, cxLookAndFeels,
|
||||
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
|
||||
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)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
|
|
@ -74,6 +87,8 @@ type
|
|||
cxButton2: TcxButton;
|
||||
v2Column16: TcxGridDBColumn;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
Label5: TLabel;
|
||||
CPhh: TEdit;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
|
|
@ -92,9 +107,8 @@ type
|
|||
private
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
|
||||
public
|
||||
fkhType:string;
|
||||
fkhType: string;
|
||||
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||
end;
|
||||
|
||||
|
|
@ -102,65 +116,66 @@ var
|
|||
frmZdyAttachPB: TfrmZdyAttachPB;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink,U_Fun,U_ZDYHelp,U_ZdyAttInputPB;
|
||||
U_DataLink, U_Fun, U_ZDYHelp, U_ZdyAttInputPB;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
|
||||
procedure TfrmZdyAttachPB.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
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(' 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 ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmZdyAttachPB.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmZdyAttachPB:=nil;
|
||||
frmZdyAttachPB := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachPB.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachPB.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('产品资料13',Tv2,'客户自定义');
|
||||
WriteCxGrid('产品资料13', Tv2, '客户自定义');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachPB.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_HZ.IsEmpty then Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
if Trim(CDS_HZ.fieldbyname('ATID').AsString)<>'' then
|
||||
if CDS_HZ.IsEmpty then
|
||||
Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
if Trim(CDS_HZ.fieldbyname('ATID').AsString) <> '' then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
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_Attachment where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||
sql.Add('delete KH_Zdy where ZdyNo=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
|
@ -169,7 +184,7 @@ end;
|
|||
|
||||
procedure TfrmZdyAttachPB.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('产品资料13',Tv2,'客户自定义');
|
||||
ReadCxGrid('产品资料13', Tv2, '客户自定义');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
|
|
@ -182,9 +197,9 @@ procedure TfrmZdyAttachPB.ToolButton2Click(Sender: TObject);
|
|||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
@ -193,23 +208,23 @@ begin
|
|||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmZdyAttachPB.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then Exit;
|
||||
TcxGridToExcel(self.Caption,cxgrid2);
|
||||
if ADOQueryMain.IsEmpty then
|
||||
Exit;
|
||||
TcxGridToExcel(self.Caption, cxgrid2);
|
||||
// SelExportData(Tv2,ADOQueryMain,'产品资料列表');
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachPB.ToolButton4Click(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZdyAttInputPB:=TfrmZdyAttInputPB.Create(Application);
|
||||
frmZdyAttInputPB := TfrmZdyAttInputPB.Create(Application);
|
||||
with frmZdyAttInputPB do
|
||||
begin
|
||||
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||
fkhType:=self.fkhType;
|
||||
if ShowModal=1 then
|
||||
FCYID := Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||
fkhType := self.fkhType;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
|
@ -222,12 +237,12 @@ end;
|
|||
procedure TfrmZdyAttachPB.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZdyAttInputPB:=TfrmZdyAttInputPB.Create(Application);
|
||||
frmZdyAttInputPB := TfrmZdyAttInputPB.Create(Application);
|
||||
with frmZdyAttInputPB do
|
||||
begin
|
||||
FCYID:='';
|
||||
fkhType:=self.fkhType;
|
||||
if ShowModal=1 then
|
||||
FCYID := '';
|
||||
fkhType := self.fkhType;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
|
@ -239,99 +254,99 @@ end;
|
|||
|
||||
procedure TfrmZdyAttachPB.ToolButton5Click(Sender: TObject);
|
||||
var
|
||||
excelApp,WorkBook:Variant;
|
||||
i,j,k,ExcelRowCount:integer;
|
||||
maxId:string;
|
||||
excelApp, WorkBook: Variant;
|
||||
i, j, k, ExcelRowCount: integer;
|
||||
maxId: string;
|
||||
begin
|
||||
|
||||
try
|
||||
ExcelApp := CreateOleObject('Excel.Application');
|
||||
openDialog1.Filter:='*.CSV;*.xls';
|
||||
if opendialog1.Execute then
|
||||
excelApp := CreateOleObject('Excel.Application');
|
||||
openDialog1.Filter := '*.CSV;*.xls';
|
||||
if opendialog1.Execute then
|
||||
begin
|
||||
WorkBook :=ExcelApp.WorkBooks.Open(OpenDialog1.FileName);
|
||||
WorkBook := excelApp.WorkBooks.Open(OpenDialog1.FileName);
|
||||
end
|
||||
else
|
||||
exit;
|
||||
|
||||
ExcelApp.Visible := false;
|
||||
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
|
||||
excelApp.Visible := false;
|
||||
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
|
||||
except
|
||||
application.MessageBox('加载EXCEL错误!','错误信息',MB_ICONERROR);
|
||||
application.MessageBox('加载EXCEL错误!', '错误信息', MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
|
||||
try
|
||||
k:=0;
|
||||
for i:=1 to 20 do
|
||||
k := 0;
|
||||
for i := 1 to 20 do
|
||||
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
|
||||
dFdDy[k].inc:=i;
|
||||
dFdDy[k].FDdys:='ZdyCode';
|
||||
dFdDy[k].FdDysName:='产品编号';
|
||||
dFdDy[k].inc := i;
|
||||
dFdDy[k].FDdys := 'ZdyCode';
|
||||
dFdDy[k].FdDysName := '产品编号';
|
||||
end;
|
||||
|
||||
if trim(excelapp.Cells[1,i].value)='产品名称' then
|
||||
if trim(excelApp.Cells[1, i].value) = '产品名称' then
|
||||
begin
|
||||
dFdDy[k].inc:=i;
|
||||
dFdDy[k].FDdys:='ZdyName';
|
||||
dFdDy[k].FdDysName:='产品名称';
|
||||
dFdDy[k].inc := i;
|
||||
dFdDy[k].FDdys := 'ZdyName';
|
||||
dFdDy[k].FdDysName := '产品名称';
|
||||
end;
|
||||
|
||||
if trim(excelapp.Cells[1,i].value)='中文名称' then
|
||||
if trim(excelApp.Cells[1, i].value) = '中文名称' then
|
||||
begin
|
||||
dFdDy[k].inc:=i;
|
||||
dFdDy[k].FDdys:='defNote3';
|
||||
dFdDy[k].FdDysName:='中文名称';
|
||||
dFdDy[k].inc := i;
|
||||
dFdDy[k].FDdys := 'defNote3';
|
||||
dFdDy[k].FdDysName := '中文名称';
|
||||
end;
|
||||
|
||||
if trim(excelapp.Cells[1,i].value)='颜色' then
|
||||
if trim(excelApp.Cells[1, i].value) = '颜色' then
|
||||
begin
|
||||
dFdDy[k].inc:=i;
|
||||
dFdDy[k].FDdys:='DEFstr3';
|
||||
dFdDy[k].FdDysName:='颜色';
|
||||
dFdDy[k].inc := i;
|
||||
dFdDy[k].FDdys := 'DEFstr3';
|
||||
dFdDy[k].FdDysName := '颜色';
|
||||
end;
|
||||
if trim(excelapp.Cells[1,i].value)='中文颜色' then
|
||||
if trim(excelApp.Cells[1, i].value) = '中文颜色' then
|
||||
begin
|
||||
dFdDy[k].inc:=i;
|
||||
dFdDy[k].FDdys:='DEFstr6';
|
||||
dFdDy[k].FdDysName:='中文颜色';
|
||||
dFdDy[k].inc := i;
|
||||
dFdDy[k].FDdys := 'DEFstr6';
|
||||
dFdDy[k].FdDysName := '中文颜色';
|
||||
end;
|
||||
|
||||
|
||||
if trim(excelapp.Cells[1,i].value)='类型' then
|
||||
if trim(excelApp.Cells[1, i].value) = '类型' then
|
||||
begin
|
||||
dFdDy[k].inc:=i;
|
||||
dFdDy[k].FDdys:='DEFstr5';
|
||||
dFdDy[k].FdDysName:='类型';
|
||||
dFdDy[k].inc := i;
|
||||
dFdDy[k].FDdys := 'DEFstr5';
|
||||
dFdDy[k].FdDysName := '类型';
|
||||
end;
|
||||
if trim(excelapp.Cells[1,i].value)='规格' then
|
||||
if trim(excelApp.Cells[1, i].value) = '规格' then
|
||||
begin
|
||||
dFdDy[k].inc:=i;
|
||||
dFdDy[k].FDdys:='DEFstr1';
|
||||
dFdDy[k].FdDysName:='规格';
|
||||
dFdDy[k].inc := i;
|
||||
dFdDy[k].FDdys := 'DEFstr1';
|
||||
dFdDy[k].FdDysName := '规格';
|
||||
end;
|
||||
if trim(excelapp.Cells[1,i].value)='成份' then
|
||||
if trim(excelApp.Cells[1, i].value) = '成份' then
|
||||
begin
|
||||
dFdDy[k].inc:=i;
|
||||
dFdDy[k].FDdys:='DEFstr2';
|
||||
dFdDy[k].FdDysName:='成份';
|
||||
dFdDy[k].inc := i;
|
||||
dFdDy[k].FDdys := 'DEFstr2';
|
||||
dFdDy[k].FdDysName := '成份';
|
||||
end;
|
||||
k:=k+1;
|
||||
k := k + 1;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
try
|
||||
for i := 2 to excelrowcount do
|
||||
for i := 2 to ExcelRowCount do
|
||||
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
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!','提示',0);
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
|
|
@ -343,83 +358,84 @@ begin
|
|||
open;
|
||||
end;
|
||||
ADOQueryCmd.Append;
|
||||
for j:=0 to k-1 do
|
||||
for j := 0 to k - 1 do
|
||||
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;
|
||||
ADOQueryCmd.FieldByName('ATID').Value:=Trim(maxId);
|
||||
ADOQueryCmd.FieldByName('zdyCode').Value:=Trim(maxId);
|
||||
ADOQueryCmd.FieldByName('khType').Value:=Trim(fkhType);
|
||||
ADOQueryCmd.FieldByName('Type').Value:='CP';
|
||||
ADOQueryCmd.FieldByName('Filler').Value:=Trim(DName);
|
||||
ADOQueryCmd.FieldByName('ATID').Value := Trim(maxId);
|
||||
ADOQueryCmd.FieldByName('zdyCode').Value := Trim(maxId);
|
||||
ADOQueryCmd.FieldByName('khType').Value := Trim(fkhType);
|
||||
ADOQueryCmd.FieldByName('Type').Value := 'CP';
|
||||
ADOQueryCmd.FieldByName('Filler').Value := Trim(DName);
|
||||
ADOQueryCmd.Post;
|
||||
|
||||
end;
|
||||
WorkBook.Close;
|
||||
ExcelApp.Quit;
|
||||
ExcelApp := Unassigned;
|
||||
excelApp.Quit;
|
||||
excelApp := Unassigned;
|
||||
WorkBook := Unassigned;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
InitGrid();
|
||||
except
|
||||
WorkBook.Close;
|
||||
ExcelApp.Quit;
|
||||
ExcelApp := Unassigned;
|
||||
excelApp.Quit;
|
||||
excelApp := Unassigned;
|
||||
WorkBook := Unassigned;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachPB.cxButton2Click(Sender: TObject);
|
||||
begin
|
||||
Panel2.Visible:=false;
|
||||
Panel2.Visible := false;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachPB.cxButton1Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
Txt,fImagePath:string;
|
||||
Moudle: THandle;
|
||||
Makebar:TMakebar;
|
||||
Mixtext:TMixtext;
|
||||
fPrintFile: string;
|
||||
Txt, fImagePath: string;
|
||||
Moudle: THandle;
|
||||
Makebar: TMakebar;
|
||||
Mixtext: TMixtext;
|
||||
begin
|
||||
IF CDS_HZ.IsEmpty then exit;
|
||||
try
|
||||
Moudle:=LoadLibrary('MakeQRBarcode.dll');
|
||||
@Makebar:=GetProcAddress(Moudle,'Make');
|
||||
@Mixtext:=GetProcAddress(Moudle,'MixText');
|
||||
Txt:=Trim(CDS_HZ.fieldbyname('ZDYCODE').AsString);
|
||||
fImagePath:=ExtractFilePath(Application.ExeName)+'image\temp.bmp' ;
|
||||
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName)+'image')) then
|
||||
CreateDirectory(pchar(ExtractFilePath(Application.ExeName)+'image'),nil);
|
||||
if FileExists(fImagePath) then DeleteFile(fImagePath);
|
||||
Makebar(pchar(Txt),Length(Txt),3,3,0,PChar(fImagePath),3);
|
||||
except
|
||||
application.MessageBox('条形码生成失败!','提示信息',MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
if CDS_HZ.IsEmpty then
|
||||
exit;
|
||||
try
|
||||
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||
Txt := Trim(CDS_HZ.fieldbyname('ZDYCODE').AsString);
|
||||
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||
if FileExists(fImagePath) then
|
||||
DeleteFile(fImagePath);
|
||||
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||
except
|
||||
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
|
||||
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
|
||||
begin
|
||||
RMVariables['QRBARCODE']:=fImagePath;
|
||||
RMVariables['QRBARCODE'] := fImagePath;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
// Rm2.DefaultCopies:=strtointdef(trim(ComboBox1.Text),1);
|
||||
// RM1.ShowReport;
|
||||
RM1.PrintReport;
|
||||
end
|
||||
else
|
||||
Application.MessageBox(PChar('没有找到文件'+fPrintFile),'提示',0);
|
||||
Application.MessageBox(PChar('没有找到文件' + fPrintFile), '提示', 0);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachPB.ToolButton6Click(Sender: TObject);
|
||||
begin
|
||||
Panel2.Left:=(self.Width-Panel2.Width) div 2;
|
||||
Panel2.Top:=(self.Height-Panel2.Height) div 2 -100;
|
||||
Panel2.Visible:=true;
|
||||
Panel2.Left := (self.Width - Panel2.Width) div 2;
|
||||
Panel2.Top := (self.Height - Panel2.Height) div 2 - 100;
|
||||
Panel2.Visible := true;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user